store javascript value from window.open in session variable

Discussion in 'ASP .Net' started by =?Utf-8?B?TWljaGVsbGUgU3RvbmU=?=, Feb 4, 2004.

  1. 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
     
    =?Utf-8?B?TWljaGVsbGUgU3RvbmU=?=, Feb 4, 2004
    #1
    1. Advertising

  2. 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
     
    Arthur Nesterovsky, Feb 4, 2004
    #2
    1. Advertising

  3. =?Utf-8?B?TWljaGVsbGUgU3RvbmU=?=

    bruce barker Guest

    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:...
    > 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
     
    bruce barker, Feb 4, 2004
    #3
  4. 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:..
    > 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
     
    =?Utf-8?B?TWljaGVsbGUgU3RvbmU=?=, Feb 4, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. raj
    Replies:
    8
    Views:
    563
    J. Baute
    Apr 9, 2004
  2. Replies:
    1
    Views:
    208
  3. Kai Grossjohann

    Store variable in (servlet) session from JavaScript

    Kai Grossjohann, Nov 10, 2003, in forum: Javascript
    Replies:
    0
    Views:
    109
    Kai Grossjohann
    Nov 10, 2003
  4. PC HUA
    Replies:
    2
    Views:
    427
    PC HUA
    May 19, 2004
  5. Replies:
    2
    Views:
    166
Loading...

Share This Page