|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
passing a variable back from a popup
Hi all,
I am sure this is one of those question you lots can answer in a heart beat but i have been chewing it over for a while. I am doing a file upload script which opens in a popup off the main submit form. I have it uploading files fine but what i want is for the pop up window to pass the path of the file it has just uploaded back to the original form. any help would be greatly appreciated thank toby |
|
#2
|
||||
|
||||
|
You'd more than likely want to do this with a server-side technology (either passing the values via a form or querystring). Although I have heard of people passing and receiving querystring data using JS. Have a poke around on google for some JS querystring functions (if you really have to do it via JS).
|
|
#3
|
||||
|
||||
|
You should be able to do something like the following:
Code:
window.opener.document.formName.fieldName.value='b lah'; |
|
#4
|
|||
|
|||
|
dhouston,
that looks very familar i'll give it a go let you know if i get it working. thanks |
|
#5
|
||||
|
||||
|
But when would you do that? After the file is uploaded (i.e. you submit the form), you loose the details. You would then have to create a new page, and load the saved files attributes into the form, which can only be done from the server side.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > passing a variable back from a popup |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|