Question subject: How can I pass a PHP variable to a window.onload event funct
Posted: Wed Apr 21, 2010 8:34 pm
Joined: Wed Apr 21, 2010 8:29 pm Posts: 1 Has thanked: 0 time Have thanks: 0 time
How do I pass a PHP variable into a window.onload event function? I have a URL that I need to pass to the JavaScript file that has this function in it. The JavaScript file itself is being linked from the PHP file that will pass the variable and I've seen many examples of how this is done via embedded JavaScript, but none where someone is linking to an external JavaScript file. I suppose this is probably a trivial matter to most of you, but I've never done this before and could use some guidance!
msi_333
Question subject: Re: How can I pass a PHP variable to a window.onload event funct
Posted: Wed Apr 21, 2010 8:47 pm
Joined: Tue Mar 27, 2007 10:55 pm Posts: 2103 Location: Earth Has thanked: 39 time Have thanks: 57 time
why don't you use
Code:
document.getElementById("ID").value
to get the value and use it as a parameter in the URL .
_________________ Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )