Thursday, March 29, 2012

Passing Values By javascript

I have two webforms with the names frm1 and frm2. When user hits a button at
the frm1, frm2 opens in a new window. After clicking one row in frm2, this
form is closing.. But i can't pass the values to the frm1 without
postingback frm1. Is ther anyway to pass the values from one WebForm to
another without postingback especially in Javascript?Yes we can use hidden field for that.
sample code
window.opener.document.getElementById("hdAddedSpots").value += ',' +
songId;
window.opener is frm1 that has a hidden field in the name of
"hdAddedSpots".
thanks,
PB
"Alper OZGUR" <alpozgur@.gmail.com> wrote in message
news:OCwAFiTPGHA.668@.TK2MSFTNGP11.phx.gbl...
>I have two webforms with the names frm1 and frm2. When user hits a button
>at the frm1, frm2 opens in a new window. After clicking one row in frm2,
>this form is closing.. But i can't pass the values to the frm1 without
>postingback frm1. Is ther anyway to pass the values from one WebForm to
>another without postingback especially in Javascript?
>
>
Here's an article with links to five different tutorials on how to do what
you need:
http://www.webdevelopersjournal.com...ass_values.html
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Alper OZGUR" <alpozgur@.gmail.com> wrote in message
news:OCwAFiTPGHA.668@.TK2MSFTNGP11.phx.gbl...
>I have two webforms with the names frm1 and frm2. When user hits a button
>at the frm1, frm2 opens in a new window. After clicking one row in frm2,
>this form is closing.. But i can't pass the values to the frm1 without
>postingback frm1. Is ther anyway to pass the values from one WebForm to
>another without postingback especially in Javascript?
>
>
Lot's of thanks to both of you.
"S. Justin Gengo [MCP]" <justin@.[no_spam_please]aboutfortunate.com>, haber
iletisinde unlar yazd:u7Rj1uTPGHA.1696@.TK2MSFTNGP14.phx.gbl...
> Here's an article with links to five different tutorials on how to do what
> you need:
> http://www.webdevelopersjournal.com...ass_values.html
> --
> Sincerely,
> S. Justin Gengo, MCP
> Web Developer / Programmer
> www.aboutfortunate.com
> "Out of chaos comes order."
> Nietzsche
> "Alper OZGUR" <alpozgur@.gmail.com> wrote in message
> news:OCwAFiTPGHA.668@.TK2MSFTNGP11.phx.gbl...
>

0 comments:

Post a Comment