Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > store javascript value from window.open in session variable

Reply
Thread Tools

store javascript value from window.open in session variable

 
 
=?Utf-8?B?TWljaGVsbGUgU3RvbmU=?=
Guest
Posts: n/a
 
      02-04-2004
hi al

i have "variab1 = window.open ("a.aspx", "helloworld");

i do this inside a RegisterStartupScrict ("key", "<script language=javascript>******</script>"); where ***** is hte javascript comman

i need to access variab1 from some other forms (to close it from another link from the parent's parent's parent's page). i figured out that the best way to do this is to store this javascript variable in a session variable

now comes the golden question. "How can I save a javascript variable in a session variable?

thanks
 
Reply With Quote
 
 
 
 
Arthur Nesterovsky
Guest
Posts: n/a
 
      02-04-2004
Hi,

> i have "variab1 = window.open ("a.aspx", "helloworld");"
> i do this inside a RegisterStartupScrict ("key",
> "<script language=javascript>******</script>");
> where ***** is hte javascript command
>
> i need to access variab1 from some other forms (to close it from another
> link from the parent's parent's parent's page). i figured out that the

best
> way to do this is to store this javascript variable in a session variable.
>
> now comes the golden question. "How can I save a javascript variable in
> a session variable?"


It seems that you mix server- and client-side code in your discourse.
A javasript code will be executed on client-side, whereas the session
variable accessible mainly on server-side.

--
______________________________
With best wishes, Arthur Nesterovsky
Please visit my home page:
http://www.nesterovsky-bros.com



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      02-04-2004
use a hidden frame to post the value back., though keeping the handle valid
will be difficult if any of the pages in the chain postback.

a better approach is to have each child window register itself with its
parent, who regiters the window with its parent, etc.

-- bruce (sqlwork.com)




"Michelle Stone" <> wrote in message
news:48E07D28-00F7-43CB-A2FB-...
> hi all
>
> i have "variab1 = window.open ("a.aspx", "helloworld");"
>
> i do this inside a RegisterStartupScrict ("key", "<script

language=javascript>******</script>"); where ***** is hte javascript command
>
> i need to access variab1 from some other forms (to close it from another

link from the parent's parent's parent's page). i figured out that the best
way to do this is to store this javascript variable in a session variable.
>
> now comes the golden question. "How can I save a javascript variable in a

session variable?"
>
> thanks



 
Reply With Quote
 
=?Utf-8?B?TWljaGVsbGUgU3RvbmU=?=
Guest
Posts: n/a
 
      02-04-2004
Thanks for the response..

I just need to close all child windows (and all grandchildren windows if i may put it that way) when i click on a button the FIRST window that is the head of all the child windows. What I had thought of was putting all the handles of all the child windows in an array stored in a session variable, and then later writing a loop that will close the windows represented by the elements of the array

I understand from your message that handles themselves are valid only till a postback, and in my application, every page goes through lots of postback before hte parent will close them, which implies that my method will not work

I will appreciate it if anyone can suggest some way I can implement what I want

You said something about registering a child with its parent by itself. What did you mean? Please elaborate. Thanks..

----- bruce barker wrote: ----

use a hidden frame to post the value back., though keeping the handle vali
will be difficult if any of the pages in the chain postback

a better approach is to have each child window register itself with it
parent, who regiters the window with its parent, etc

-- bruce (sqlwork.com




"Michelle Stone" <> wrote in messag
news:48E07D28-00F7-43CB-A2FB-..
> hi al
>> i have "variab1 = window.open ("a.aspx", "helloworld");
>> i do this inside a RegisterStartupScrict ("key", "<scrip

language=javascript>******</script>"); where ***** is hte javascript comman
>> i need to access variab1 from some other forms (to close it from anothe

link from the parents parents parents page). i figured out that the bes
way to do this is to store this javascript variable in a session variable
>> now comes the golden question. "How can I save a javascript variable in

session variable?
>> thank




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System Session Variable VS. Own-declared 'Session' Variable chowchho ASP .Net 7 03-28-2008 02:38 PM
possible to store javascript document.forms[0].value to ASP session? bonnie.tangyn@gmail.com Javascript 2 07-03-2006 02:57 PM
Possible to store javascript document.forms[0].value to ASP session? bonnie.tangyn@gmail.com ASP General 1 06-30-2006 06:32 PM
Store shell session/cmd.exe session in some object? Zach Dennis Ruby 2 01-08-2004 10:07 PM
Store variable in (servlet) session from JavaScript Kai Grossjohann Javascript 0 11-10-2003 05:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57