Insurance Quotes - Property in Spain - Self Improvement Articles Directory - Bob's Free Stuff Forum - Sciences in 2007

PDA

View Full Version : Some javascript help needed


Nick_Mayhem
Jul 2nd 2008, 4:58 am
I have a code here

<script language="javascript"><!--//
var hello_id = 1234;
//--></script>
<script type="text/javascript" src="http://www.examplesite.com/show.php">
</script>

What I want to do is get the value of var hello_id to be accessed in the show.php file.

Can someone tell me how to access that variable in the PHP code.

Thanks.

Nick_Mayhem
Jul 2nd 2008, 7:04 am
Sorry my bad.

Have found the solution :)

Thanks.

MMJ
Jul 2nd 2008, 8:06 am
Either put that value in the cookie or in the query string. Google is your friend.

edit; nvm, seems like you found your solution.

realmahbub
Jul 2nd 2008, 8:11 am
You can use xmlhttprequest object to use java script variable value in php pages. Or you can also set cookie to be available the variable to other pages

thanks