Switch to full style
Dynamic open source server-side web development
Post a reply

How can I pass a PHP variable to a window.onload event funct

Wed Apr 21, 2010 8:34 pm

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!



Re: How can I pass a PHP variable to a window.onload event funct

Wed Apr 21, 2010 8:47 pm

why don't you use

Code:


document
.getElementById("ID").value


to get the value and use it as a parameter in the URL .

Post a reply
  Related Posts  to : How can I pass a PHP variable to a window.onload event funct
 advantage of the event delegation model over event-inherit     -  
 relationship an event-listener interface & event handler     -  
 different between Local variable and Global variable     -  
 pass parameter     -  
 pass CompTIA LX0-101 & LX0-102 Exam quickly     -  
 Pass class instance as parameter in php     -  
 All 4 CCNA semesters in power point pass?     -  
 pass parameters to main method args[] variables     -  
 What is Event Handling?     -  
 AWT event hierarchy     -