Posting form into a new window

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

    Posting form into a new window

    How can I POST a form into a new window where I control the size and
    other attributes of the new window?

    Also. Are there any implications, perhaps due to browser security
    (Interne Explorer?) that could cause problems if I try to post a form
    at www.mydomain.com to www.anotherdomain.com?

  • Frances Del Rio

    #2
    Re: Posting form into a new window


    Eli wrote:
    [color=blue]
    > How can I POST a form into a new window where I control the size and
    > other attributes of the new window?
    >
    > Also. Are there any implications, perhaps due to browser security
    > (Interne Explorer?) that could cause problems if I try to post a form
    > at www.mydomain.com to www.anotherdomain.com?[/color]

    not sure what you mean, but I've done forms in pop-ups a lot.. go here
    and click at the bottom where it says "form":





    Comment

    • Eli

      #3
      Re: Posting form into a new window

      On Sat, 25 Sep 2004 18:30:21 -0400, Frances Del Rio <fdr58@yahoo.co m>
      wrote:
      [color=blue]
      >Eli wrote:
      >[color=green]
      >> How can I POST a form into a new window where I control the size and
      >> other attributes of the new window?
      >>
      >> Also. Are there any implications, perhaps due to browser security
      >> (Interne Explorer?) that could cause problems if I try to post a form
      >> at www.mydomain.com to www.anotherdomain.com?[/color]
      >
      >not sure what you mean, but I've done forms in pop-ups a lot.. go here
      >and click at the bottom where it says "form":
      >
      >http://www.francesdelrio.com/hbl/[/color]


      No, that's not what I meant.

      I wish to post from a form that appears on a web page (it's a visitor
      poll) to an action= page that will appear in a newly opened window.
      Using only target= in the <form> tag doesn't give you the ability to
      control the window's size and attributes.

      Comment

      • Randy Webb

        #4
        Re: Posting form into a new window

        Frances Del Rio wrote:[color=blue]
        >
        > Eli wrote:
        >[color=green]
        >> How can I POST a form into a new window where I control the size and
        >> other attributes of the new window?[/color][/color]

        You don't. It's *my* browser, stop trying to change it's size.
        [color=blue][color=green]
        >> Also. Are there any implications, perhaps due to browser security
        >> (Interne Explorer?) that could cause problems if I try to post a form
        >> at www.mydomain.com to www.anotherdomain.com?[/color][/color]

        Ummm, why not test it? Hmmm.
        [color=blue]
        >
        > not sure what you mean, but I've done forms in pop-ups a lot.. go here
        > and click at the bottom where it says "form":
        >
        > http://www.francesdelrio.com/hbl/[/color]

        What I get from that URL, when clicking "form", is navigated to


        so, before you quote a page as a reference, maybe you should validate
        the page and test it in something besides IE.

        But looking at the source of that page, you should ditch it, start over,
        and end up (maybe) with something decent enough to use as an example?

        --
        Randy
        comp.lang.javas cript FAQ - http://jibbering.com/faq

        Comment

        • fox

          #5
          Re: Posting form into a new window

          Eli wrote:[color=blue]
          > On Sat, 25 Sep 2004 18:30:21 -0400, Frances Del Rio <fdr58@yahoo.co m>
          > wrote:
          >
          >[color=green]
          >>Eli wrote:
          >>
          >>[color=darkred]
          >>>How can I POST a form into a new window where I control the size and
          >>>other attributes of the new window?
          >>>
          >>>Also. Are there any implications, perhaps due to browser security
          >>>(Interne Explorer?) that could cause problems if I try to post a form
          >>>at www.mydomain.com to www.anotherdomain.com?[/color]
          >>
          >>not sure what you mean, but I've done forms in pop-ups a lot.. go here
          >>and click at the bottom where it says "form":
          >>
          >>http://www.francesdelrio.com/hbl/[/color]
          >
          >
          >
          > No, that's not what I meant.
          >
          > I wish to post from a form that appears on a web page (it's a visitor
          > poll) to an action= page that will appear in a newly opened window.
          > Using only target= in the <form> tag doesn't give you the ability to
          > control the window's size and attributes.
          >[/color]

          Just create a "named" window with window open and submit the form to it
          by setting the target to the newly created window name [there actually
          *IS* a purpose for the second argument to window.open!]:

          <form onsubmit = "return handleSubmit(th is)">
          .....

          // the JS:

          function
          handleSubmit(f)
          {
          // f => form reference

          // you can set these attributes in the form tag if you want
          f.action = "script2call.ex t";
          f.method = "POST or GET"; // one OR the other
          f.target = "myFormWind ow";

          // create your named window:
          var w = window.open("", "myFormWindow", "AttributesList ");

          f.submit();
          return false; // or navigate to another page...
          }


          I tested this in Mozilla with "Block unrequested popup windows" checked
          -- and it still worked, but if the user has JS turned off, then this is
          toast.. so:

          <noscript>
          <h3>This site requires JavaScript...</h3>

          </noscript>

          Comment

          • Randy Webb

            #6
            Re: Posting form into a new window

            fox wrote:

            <--snip-->
            [color=blue]
            > I tested this in Mozilla with "Block unrequested popup windows" checked
            > -- and it still worked, but if the user has JS turned off, then this is
            > toast.. so:[/color]

            Why not just have a normal form, with an action attribute set, and let
            it remain in the main window? The noscript element is not the best
            place to explain that "I am too incompetent to make my site non-JS
            dependent so you must use a browser that supports it and has it enabled"



            --
            Randy
            comp.lang.javas cript FAQ - http://jibbering.com/faq

            Comment

            • Eli

              #7
              Re: Posting form into a new window

              On Sat, 25 Sep 2004 18:58:46 -0500, fox <fox@fxmahoney. com> wrote:
              [color=blue]
              >Eli wrote:[color=green]
              >> On Sat, 25 Sep 2004 18:30:21 -0400, Frances Del Rio <fdr58@yahoo.co m>
              >> wrote:
              >>
              >>[color=darkred]
              >>>Eli wrote:
              >>>
              >>>
              >>>>How can I POST a form into a new window where I control the size and
              >>>>other attributes of the new window?
              >>>>
              >>>>Also. Are there any implications, perhaps due to browser security
              >>>>(Interne Explorer?) that could cause problems if I try to post a form
              >>>>at www.mydomain.com to www.anotherdomain.com?
              >>>
              >>>not sure what you mean, but I've done forms in pop-ups a lot.. go here
              >>>and click at the bottom where it says "form":
              >>>
              >>>http://www.francesdelrio.com/hbl/[/color]
              >>
              >>
              >>
              >> No, that's not what I meant.
              >>
              >> I wish to post from a form that appears on a web page (it's a visitor
              >> poll) to an action= page that will appear in a newly opened window.
              >> Using only target= in the <form> tag doesn't give you the ability to
              >> control the window's size and attributes.
              >>[/color]
              >
              >Just create a "named" window with window open and submit the form to it
              >by setting the target to the newly created window name [there actually
              >*IS* a purpose for the second argument to window.open!]:
              >
              ><form onsubmit = "return handleSubmit(th is)">
              >....
              >
              >// the JS:
              >
              >function
              >handleSubmit(f )
              >{
              > // f => form reference
              >
              > // you can set these attributes in the form tag if you want
              > f.action = "script2call.ex t";
              > f.method = "POST or GET"; // one OR the other
              > f.target = "myFormWind ow";
              >
              > // create your named window:
              > var w = window.open("", "myFormWindow", "AttributesList ");
              >
              > f.submit();
              > return false; // or navigate to another page...
              >}
              >
              >
              >I tested this in Mozilla with "Block unrequested popup windows" checked
              >-- and it still worked, but if the user has JS turned off, then this is
              >toast.. so:
              >
              ><noscript>
              ><h3>This site requires JavaScript...</h3>
              >
              ></noscript>[/color]

              Hey, thanks a lot!

              I found some code elsewhere that was very similar to what you've
              posted, with the action, method and target set in the form tag (as you
              note is possible). A couple of questions:

              - Instead of "f.submit() " and "return false", would the single
              statement "return true" accomplish the same thing, or is there a
              difference?

              - What is the difference between open() and window.open()? The other
              code used open(), which I'd never used before.

              Comment

              • Eli

                #8
                Re: Posting form into a new window

                On Sat, 25 Sep 2004 20:40:06 -0400, Randy Webb
                [color=blue]
                >Why not just have a normal form, with an action attribute set, and let
                >it remain in the main window? The noscript element is not the best
                >place to explain that "I am too incompetent to make my site non-JS
                >dependent so you must use a browser that supports it and has it enabled"[/color]

                Why not go do something useful for somebody?

                Comment

                • Frances Del Rio

                  #9
                  Re: Posting form into a new window


                  Randy Webb wrote:
                  [color=blue]
                  > Frances Del Rio wrote:
                  >[color=green]
                  >>
                  >> Eli wrote:
                  >>[color=darkred]
                  >>> How can I POST a form into a new window where I control the size and
                  >>> other attributes of the new window?[/color][/color]
                  >
                  >
                  > You don't. It's *my* browser, stop trying to change it's size.
                  >[color=green][color=darkred]
                  >>> Also. Are there any implications, perhaps due to browser security
                  >>> (Interne Explorer?) that could cause problems if I try to post a form
                  >>> at www.mydomain.com to www.anotherdomain.com?[/color][/color]
                  >
                  >
                  > Ummm, why not test it? Hmmm.
                  >[color=green]
                  >>
                  >> not sure what you mean, but I've done forms in pop-ups a lot.. go here
                  >> and click at the bottom where it says "form":
                  >>
                  >> http://www.francesdelrio.com/hbl/[/color]
                  >
                  >
                  > What I get from that URL, when clicking "form", is navigated to
                  > http://www.francesdelrio.com/hbl/#
                  >
                  > so, before you quote a page as a reference, maybe you should validate
                  > the page and test it in something besides IE.
                  >
                  > But looking at the source of that page, you should ditch it, start over,
                  > and end up (maybe) with something decent enough to use as an example?[/color]

                  gees, thanks... I guess some of us are more tolerant of mistakes than
                  others.. ;) it's working on netscape now.. in both English and Spanish..
                  (I test everything on IE and netscape.. this was an inadvertent
                  mistake... and whaddayaknow... it even works in that very quirky
                  broswer called 'Opera'...)
                  would have been nice if you had said what browser it's not working on
                  for you..





                  Comment

                  • Randy Webb

                    #10
                    Re: Posting form into a new window

                    Frances Del Rio wrote:[color=blue]
                    >
                    > Randy Webb wrote:
                    >[color=green]
                    >> Frances Del Rio wrote:
                    >>[color=darkred]
                    >>>
                    >>> Eli wrote:
                    >>>
                    >>>> How can I POST a form into a new window where I control the size and
                    >>>> other attributes of the new window?[/color]
                    >>
                    >>
                    >>
                    >> You don't. It's *my* browser, stop trying to change it's size.
                    >>[color=darkred]
                    >>>> Also. Are there any implications, perhaps due to browser security
                    >>>> (Interne Explorer?) that could cause problems if I try to post a form
                    >>>> at www.mydomain.com to www.anotherdomain.com?[/color]
                    >>
                    >>
                    >>
                    >> Ummm, why not test it? Hmmm.
                    >>[color=darkred]
                    >>>
                    >>> not sure what you mean, but I've done forms in pop-ups a lot.. go
                    >>> here and click at the bottom where it says "form":
                    >>>
                    >>> http://www.francesdelrio.com/hbl/[/color]
                    >>
                    >>
                    >>
                    >> What I get from that URL, when clicking "form", is navigated to
                    >> http://www.francesdelrio.com/hbl/#
                    >>
                    >> so, before you quote a page as a reference, maybe you should validate
                    >> the page and test it in something besides IE.
                    >>
                    >> But looking at the source of that page, you should ditch it, start
                    >> over, and end up (maybe) with something decent enough to use as an
                    >> example?[/color]
                    >
                    >
                    > gees, thanks... I guess some of us are more tolerant of mistakes than
                    > others.. ;) it's working on netscape now.. in both English and Spanish..
                    > (I test everything on IE and netscape.. this was an inadvertent
                    > mistake... and whaddayaknow... it even works in that very quirky
                    > broswer called 'Opera'...)
                    > would have been nice if you had said what browser it's not working on
                    > for you..
                    >
                    > http://www.francesdelrio.com/hbl/index.html[/color]

                    Of course, you are right. But it didn't work in Mozilla, and nicely, it
                    works now.

                    Still not sure why you use all the un-needed evals though.

                    --
                    Randy
                    comp.lang.javas cript FAQ - http://jibbering.com/faq

                    Comment

                    • Randy Webb

                      #11
                      Re: Posting form into a new window

                      Eli wrote:
                      [color=blue]
                      > On Sat, 25 Sep 2004 20:40:06 -0400, Randy Webb
                      >
                      >[color=green]
                      >>Why not just have a normal form, with an action attribute set, and let
                      >>it remain in the main window? The noscript element is not the best
                      >>place to explain that "I am too incompetent to make my site non-JS
                      >>dependent so you must use a browser that supports it and has it enabled"[/color]
                      >
                      >
                      > Why not go do something useful for somebody?
                      >[/color]

                      Since you seem to have missed the point, its not worth the bother.

                      --
                      Randy
                      comp.lang.javas cript FAQ - http://jibbering.com/faq

                      Comment

                      • Frances Del Rio

                        #12
                        Re: Posting form into a new window



                        Randy Webb wrote:
                        [color=blue]
                        > Frances Del Rio wrote:
                        >[color=green]
                        >>
                        >> Randy Webb wrote:
                        >>[color=darkred]
                        >>> Frances Del Rio wrote:
                        >>>
                        >>>>
                        >>>> Eli wrote:
                        >>>>
                        >>>>> How can I POST a form into a new window where I control the size and
                        >>>>> other attributes of the new window?
                        >>>
                        >>>
                        >>>
                        >>>
                        >>> You don't. It's *my* browser, stop trying to change it's size.
                        >>>
                        >>>>> Also. Are there any implications, perhaps due to browser security
                        >>>>> (Interne Explorer?) that could cause problems if I try to post a form
                        >>>>> at www.mydomain.com to www.anotherdomain.com?
                        >>>
                        >>>
                        >>>
                        >>>
                        >>> Ummm, why not test it? Hmmm.
                        >>>
                        >>>>
                        >>>> not sure what you mean, but I've done forms in pop-ups a lot.. go
                        >>>> here and click at the bottom where it says "form":
                        >>>>
                        >>>> http://www.francesdelrio.com/hbl/
                        >>>
                        >>>
                        >>>
                        >>>
                        >>> What I get from that URL, when clicking "form", is navigated to
                        >>> http://www.francesdelrio.com/hbl/#
                        >>>
                        >>> so, before you quote a page as a reference, maybe you should validate
                        >>> the page and test it in something besides IE.
                        >>>
                        >>> But looking at the source of that page, you should ditch it, start
                        >>> over, and end up (maybe) with something decent enough to use as an
                        >>> example?[/color]
                        >>
                        >>
                        >>
                        >> gees, thanks... I guess some of us are more tolerant of mistakes than
                        >> others.. ;) it's working on netscape now.. in both English and
                        >> Spanish.. (I test everything on IE and netscape.. this was an
                        >> inadvertent mistake... and whaddayaknow... it even works in that very
                        >> quirky broswer called 'Opera'...)
                        >> would have been nice if you had said what browser it's not working on
                        >> for you..
                        >>
                        >> http://www.francesdelrio.com/hbl/index.html[/color]
                        >
                        >
                        > Of course, you are right. But it didn't work in Mozilla, and nicely, it
                        > works now.
                        >
                        > Still not sure why you use all the un-needed evals though.[/color]

                        you know, this is sthg I learned in a book a few years ago (don't
                        remember if it was the JS Bible or a DHTML book I used a few years ago
                        called "DHTML for the World Wide Web: Visual Quickstart Guide" by Jason
                        C. Teague, from that little book I learned to do the DHTML on this pg..


                        and it has become kind of a bad habit.. a number of people here have
                        told me not to do that.. so: when is it ok to use evals?? thank you..
                        Frances

                        [color=blue]
                        >[/color]

                        Comment

                        • Randy Webb

                          #13
                          Re: Posting form into a new window

                          Frances Del Rio wrote:[color=blue]
                          >
                          >
                          > Randy Webb wrote:[/color]

                          <--snip-->
                          [color=blue][color=green]
                          >> Of course, you are right. But it didn't work in Mozilla, and nicely,
                          >> it works now.
                          >>
                          >> Still not sure why you use all the un-needed evals though.[/color]
                          >
                          >
                          > you know, this is sthg I learned in a book a few years ago (don't
                          > remember if it was the JS Bible or a DHTML book I used a few years ago
                          > called "DHTML for the World Wide Web: Visual Quickstart Guide" by Jason
                          > C. Teague, from that little book I learned to do the DHTML on this pg..
                          > http://www.francesdelrio.com/dhtml/sonnets.html
                          >
                          > and it has become kind of a bad habit.. a number of people here have
                          > told me not to do that.. so: when is it ok to use evals?? thank you..
                          > Frances[/color]

                          I only know of two occasions to use it:

                          1) When executing unknown code. Example: A textarea where you paste in
                          code, and you eval it to get its resulting action. Its covered in the FAQ.

                          2) The second is a case I ran into myself, where I was trying to find
                          the most efficient way to convert a fraction to a decimal and it turned
                          out that eval was marginally faster. This one is not explicitly covered,
                          but it falls in the same category.



                          Covers eval, and alludes to 3_39 which covers obtaining a reference to
                          an object. That was most of the eval uses I saw in your page. All of
                          which are now changed :-)


                          --
                          Randy
                          comp.lang.javas cript FAQ - http://jibbering.com/faq

                          Comment

                          • Fox

                            #14
                            Re: Posting form into a new window

                            Eli wrote:
                            [color=blue]
                            > On Sat, 25 Sep 2004 18:58:46 -0500, fox <fox@fxmahoney. com> wrote:
                            >
                            >[color=green]
                            >>Eli wrote:
                            >>[color=darkred]
                            >>>On Sat, 25 Sep 2004 18:30:21 -0400, Frances Del Rio <fdr58@yahoo.co m>
                            >>>wrote:
                            >>>
                            >>>
                            >>>
                            >>>>Eli wrote:
                            >>>>
                            >>>>
                            >>>>
                            >>>>>How can I POST a form into a new window where I control the size and
                            >>>>>other attributes of the new window?
                            >>>>>
                            >>>>>Also. Are there any implications, perhaps due to browser security
                            >>>>>(Interne Explorer?) that could cause problems if I try to post a form
                            >>>>>at www.mydomain.com to www.anotherdomain.com?
                            >>>>
                            >>>>not sure what you mean, but I've done forms in pop-ups a lot.. go here
                            >>>>and click at the bottom where it says "form":
                            >>>>
                            >>>>http://www.francesdelrio.com/hbl/
                            >>>
                            >>>
                            >>>
                            >>>No, that's not what I meant.
                            >>>
                            >>>I wish to post from a form that appears on a web page (it's a visitor
                            >>>poll) to an action= page that will appear in a newly opened window.
                            >>>Using only target= in the <form> tag doesn't give you the ability to
                            >>>control the window's size and attributes.
                            >>>[/color]
                            >>
                            >>Just create a "named" window with window open and submit the form to it
                            >>by setting the target to the newly created window name [there actually
                            >>*IS* a purpose for the second argument to window.open!]:
                            >>
                            >><form onsubmit = "return handleSubmit(th is)">
                            >>....
                            >>
                            >>// the JS:
                            >>
                            >>function
                            >>handleSubmit( f)
                            >>{
                            >> // f => form reference
                            >>
                            >> // you can set these attributes in the form tag if you want
                            >> f.action = "script2call.ex t";
                            >> f.method = "POST or GET"; // one OR the other
                            >> f.target = "myFormWind ow";
                            >>
                            >> // create your named window:
                            >> var w = window.open("", "myFormWindow", "AttributesList ");
                            >>
                            >> f.submit();
                            >> return false; // or navigate to another page...
                            >>}
                            >>
                            >>
                            >>I tested this in Mozilla with "Block unrequested popup windows" checked
                            >>-- and it still worked, but if the user has JS turned off, then this is
                            >>toast.. so:
                            >>
                            >><noscript>
                            >><h3>This site requires JavaScript...</h3>
                            >>
                            >></noscript>[/color]
                            >
                            >
                            > Hey, thanks a lot!
                            >
                            > I found some code elsewhere that was very similar to what you've
                            > posted, with the action, method and target set in the form tag (as you
                            > note is possible). A couple of questions:
                            >
                            > - Instead of "f.submit() " and "return false", would the single
                            > statement "return true" accomplish the same thing, or is there a
                            > difference?[/color]

                            Actually, if you want, you can delete both lines -- onsubmit handlers
                            return true by default.
                            [color=blue]
                            >
                            > - What is the difference between open() and window.open()? The other
                            > code used open(), which I'd never used before.[/color]

                            window.open() is more correct...

                            open() will attempt to call that method on the "current object". I
                            suspect IE is much more lenient about this syntactical mistake. After
                            all, IE is a very "do what I *want* and not as I write" kind of
                            environment. There is also a document.open() as well that is very
                            different (it "opens" a document for writing with document.write( ) - it
                            does not open a new window.) Some browsers, or scripting environments
                            might complain if you are not more specific.

                            Comment

                            • Frances Del Rio

                              #15
                              Re: Posting form into a new window

                              FOX -- FOX??? is this the FOX that helped me a few years ago when I was
                              learning JavaScript (am still learning, of course, as you can see if you
                              come across my posts from the last few days.. am learning Java now, it's
                              hard, but I still enjoy it...) I remember you were a Netscape specialist
                              (old netscape, as in layers... ) I remember a really cool page you did
                              with little colored squares that jumped all over the page... I love
                              your current site, have been dissecting yr code...

                              scrollbar-base-color: #98a8b8;
                              filter: alpha (opacity=80);

                              CSS never ceases to amaze me.. I can only wonder what other stuff it has
                              up its sleeve that I don't know of.. I mean those semi-transparent
                              scrollbars take the cake!!

                              Frances


                              Fox wrote:[color=blue]
                              > Eli wrote:
                              >[color=green]
                              >> On Sat, 25 Sep 2004 18:58:46 -0500, fox <fox@fxmahoney. com> wrote:
                              >>
                              >>[color=darkred]
                              >>> Eli wrote:
                              >>>
                              >>>> On Sat, 25 Sep 2004 18:30:21 -0400, Frances Del Rio <fdr58@yahoo.co m>
                              >>>> wrote:
                              >>>>
                              >>>>
                              >>>>
                              >>>>> Eli wrote:
                              >>>>>
                              >>>>>
                              >>>>>
                              >>>>>> How can I POST a form into a new window where I control the size and
                              >>>>>> other attributes of the new window?
                              >>>>>>
                              >>>>>> Also. Are there any implications, perhaps due to browser security
                              >>>>>> (Interne Explorer?) that could cause problems if I try to post a form
                              >>>>>> at www.mydomain.com to www.anotherdomain.com?
                              >>>>>
                              >>>>>
                              >>>>> not sure what you mean, but I've done forms in pop-ups a lot.. go
                              >>>>> here and click at the bottom where it says "form":
                              >>>>>
                              >>>>> http://www.francesdelrio.com/hbl/
                              >>>>
                              >>>>
                              >>>>
                              >>>>
                              >>>> No, that's not what I meant.
                              >>>>
                              >>>> I wish to post from a form that appears on a web page (it's a visitor
                              >>>> poll) to an action= page that will appear in a newly opened window.
                              >>>> Using only target= in the <form> tag doesn't give you the ability to
                              >>>> control the window's size and attributes.
                              >>>>
                              >>>
                              >>> Just create a "named" window with window open and submit the form to
                              >>> it by setting the target to the newly created window name [there
                              >>> actually *IS* a purpose for the second argument to window.open!]:
                              >>>
                              >>> <form onsubmit = "return handleSubmit(th is)">
                              >>> ....
                              >>>
                              >>> // the JS:
                              >>>
                              >>> function
                              >>> handleSubmit(f)
                              >>> {
                              >>> // f => form reference
                              >>>
                              >>> // you can set these attributes in the form tag if you want
                              >>> f.action = "script2call.ex t";
                              >>> f.method = "POST or GET"; // one OR the other
                              >>> f.target = "myFormWind ow";
                              >>>
                              >>> // create your named window:
                              >>> var w = window.open("", "myFormWindow", "AttributesList ");
                              >>>
                              >>> f.submit();
                              >>> return false; // or navigate to another page...
                              >>> }
                              >>>
                              >>>
                              >>> I tested this in Mozilla with "Block unrequested popup windows"
                              >>> checked -- and it still worked, but if the user has JS turned off,
                              >>> then this is toast.. so:
                              >>>
                              >>> <noscript>
                              >>> <h3>This site requires JavaScript...</h3>
                              >>>
                              >>> </noscript>[/color]
                              >>
                              >>
                              >>
                              >> Hey, thanks a lot!
                              >>
                              >> I found some code elsewhere that was very similar to what you've
                              >> posted, with the action, method and target set in the form tag (as you
                              >> note is possible). A couple of questions:
                              >>
                              >> - Instead of "f.submit() " and "return false", would the single
                              >> statement "return true" accomplish the same thing, or is there a
                              >> difference?[/color]
                              >
                              >
                              > Actually, if you want, you can delete both lines -- onsubmit handlers
                              > return true by default.
                              >[color=green]
                              >>
                              >> - What is the difference between open() and window.open()? The other
                              >> code used open(), which I'd never used before.[/color]
                              >
                              >
                              > window.open() is more correct...
                              >
                              > open() will attempt to call that method on the "current object". I
                              > suspect IE is much more lenient about this syntactical mistake. After
                              > all, IE is a very "do what I *want* and not as I write" kind of
                              > environment. There is also a document.open() as well that is very
                              > different (it "opens" a document for writing with document.write( ) - it
                              > does not open a new window.) Some browsers, or scripting environments
                              > might complain if you are not more specific.[/color]

                              Comment

                              Working...