send variables to function in new window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marco Alting

    send variables to function in new window

    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


  • Erwin Moller

    #2
    Re: send variables to function in new window

    Marco Alting wrote:
    [color=blue]
    > 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[/color]

    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.win2fun c("hello!");

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

    Comment

    • Marco Alting

      #3
      Re: send variables to function in new window

      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"
      <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> schreef in
      bericht news:3f6193ab$0 $58711$e4fe514c @news.xs4all.nl ...[color=blue]
      > Marco Alting wrote:
      >[color=green]
      > > 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[/color][/color]
      question[color=blue][color=green]
      > > is, how can I send the variable values from one function to another in a
      > > new window?
      > >
      > > Thanks,
      > > Marco[/color]
      >
      > 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.win2fun c("hello!");
      >
      > Of course you'll have to replace "hello!" by some value from one of your
      > formfields.[/color]


      Comment

      • son3mendo

        #4
        Re: send variables to function in new window

        On Fri, 12 Sep 2003 09:41:30 +0000, Marco Alting wrote:
        [color=blue]
        > 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.
        >[/color]

        You could use window.opener.

        ciao

        gpaolini

        [color=blue]
        >
        > "Erwin Moller"
        > <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> schreef in[/color]


        Comment

        Working...