By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,717 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,717 IT Pros & Developers. It's quick & easy.

send variables to function in new window

P: n/a
hi

I have a javascript function, which gets parameters from a form and then
opens a new form in another window.
The new window also has a javascript function with parameters. My question
is, how can I send the variable values from one function to another in a new
window?

Thanks,
Marco
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Marco Alting wrote:
hi

I have a javascript function, which gets parameters from a form and then
opens a new form in another window.
The new window also has a javascript function with parameters. My question
is, how can I send the variable values from one function to another in a
new window?

Thanks,
Marco


simply by adressing the window first.
You have 2 windows, named window1 and window2.

so if you have a function win2func in window2 and want to call that from
window 1 use:
window2.win2func("hello!");

Of course you'll have to replace "hello!" by some value from one of your
formfields.
Jul 20 '05 #2

P: n/a
It's not exactly what I want, I want to pass the variable from window 1 to
window 2 and use it there in a function.
"Erwin Moller"
<si******************************************@spam yourself.com> schreef in
bericht news:3f***********************@news.xs4all.nl...
Marco Alting wrote:
hi

I have a javascript function, which gets parameters from a form and then
opens a new form in another window.
The new window also has a javascript function with parameters. My question is, how can I send the variable values from one function to another in a
new window?

Thanks,
Marco


simply by adressing the window first.
You have 2 windows, named window1 and window2.

so if you have a function win2func in window2 and want to call that from
window 1 use:
window2.win2func("hello!");

Of course you'll have to replace "hello!" by some value from one of your
formfields.

Jul 20 '05 #3

P: n/a
On Fri, 12 Sep 2003 09:41:30 +0000, Marco Alting wrote:
It's not exactly what I want, I want to pass the variable from window 1 to
window 2 and use it there in a function.

You could use window.opener.

ciao

gpaolini


"Erwin Moller"
<si******************************************@spam yourself.com> schreef in

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.