hi all

for some reason this code wont work

i have written some javascript before with php but this one is not doing any thing at all.

i checked the source in the browser and it seems the passed values are coming up correctly but on pressing the button the location of the browser wont change.


echo  '<script type=text/javascript>';
						echo  '<!-- Begin';
						echo 'alert("click") ';
							echo	'function goToURL() { ';

							echo "window.location = 'show_statement.php?HiddenLandlordID=$nextLandlordID&Type=$Type'; }";

						echo '	//  End -->';
						echo '	</script>';

					$link ='<form><input type=button name=next2 value="Next Record" onClick="goToURL()"></form>';

// link is 'returned' a bit later 

    try changing

    echo '<script type=text/javascript>';

    to

    echo '<script language=javascript>';

    and if possible try to place the javascript within the <head> tags.

      or even echo '<script language="javascript">';

        tried both things but it still doesnt do anything when i click on it

        any more ideas??

        thanks

          Write a Reply...