Reiss
02-08-2008, 08:10 AM
Hi guys
I really don't know javascript at all (php is my thing), have been relying on dreamweaver to insert the correct script for me.
Anyway, I have animated a div tag using DW timeline, and have moved my javascript functions to an external php file hoping I could do a $_get to extract variables
<?php include("include/javascript_functions.php");?>
I have the same piece of script that scrolls the div tag up, and then goes to a new url when finished. I want to be able to use the same script but change the url accordingly. here's my call -
<td><a href="#" onclick="MM_timelinePlay('Timeline2')">Link 1</a></td>
and heres the piece of script that does the url change -
document.MM_Time[1][1].value = "MM_goToURL('parent','index.php')";
what I want to do is have the url dynamic and pass it to the javascript function
eg.. $link = index.php
<td><a href="#" onclick="MM_timelinePlay('Timeline2', $link)">Link 1</a></td>
and the script -
document.MM_Time[1][1].value = "MM_goToURL('parent',$link)";
I could do this easily with php using a get or something, but with javascript im stumped.
cheers
I really don't know javascript at all (php is my thing), have been relying on dreamweaver to insert the correct script for me.
Anyway, I have animated a div tag using DW timeline, and have moved my javascript functions to an external php file hoping I could do a $_get to extract variables
<?php include("include/javascript_functions.php");?>
I have the same piece of script that scrolls the div tag up, and then goes to a new url when finished. I want to be able to use the same script but change the url accordingly. here's my call -
<td><a href="#" onclick="MM_timelinePlay('Timeline2')">Link 1</a></td>
and heres the piece of script that does the url change -
document.MM_Time[1][1].value = "MM_goToURL('parent','index.php')";
what I want to do is have the url dynamic and pass it to the javascript function
eg.. $link = index.php
<td><a href="#" onclick="MM_timelinePlay('Timeline2', $link)">Link 1</a></td>
and the script -
document.MM_Time[1][1].value = "MM_goToURL('parent',$link)";
I could do this easily with php using a get or something, but with javascript im stumped.
cheers