Total members 11894 |It is currently Thu Nov 21, 2024 11:07 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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!




Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

why don't you use

Code:


document
.getElementById("ID").value


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

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 2 posts ] 

  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     -  
 AWT event hierarchy     -  
 What is Event Handling?     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com