open post in new window HELP!!

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

    open post in new window HELP!!

    I have the folowing code implimented. when the post button is pressed
    it places the info in the existing window. How can I make it open a
    new window for the new data?

    htp.p('<TD><A HREF=javascript :_SubmitForm("P ARAMETER_FORM") ><IMG
    SRC="/sec/image/info.bmp" TARGET="_top" BORDER=0
    ALIGN=ABSMIDDLE ></A></TD>');

    Sorry if there is not enough info. I am new at this.
  • DU

    #2
    Re: open post in new window HELP!!

    gregg wrote:[color=blue]
    > I have the folowing code implimented. when the post button is pressed
    > it places the info in the existing window. How can I make it open a
    > new window for the new data?
    >
    > htp.p('<TD><A HREF=javascript :_SubmitForm("P ARAMETER_FORM") ><IMG
    > SRC="/sec/image/info.bmp" TARGET="_top" BORDER=0
    > ALIGN=ABSMIDDLE ></A></TD>');
    >
    > Sorry if there is not enough info. I am new at this.[/color]

    This is item 4.37 covered by the comp.lang.javas cript FAQ
    In your code, img element can not have a target attribute. Also, you
    should avoid using a href="javascrip t: construct which is known to be
    bad, to create problems. This is again an item in the FAQ (4.24).




    Finally, best is to give an url where we can examine the code of the
    whole page.

    DU

    Comment

    • McKirahan

      #3
      Re: open post in new window HELP!!

      "gregg" <gf_em@hotmail. com> wrote in message
      news:daab83df.0 312291458.fc679 7c@posting.goog le.com...[color=blue]
      > I have the folowing code implimented. when the post button is pressed
      > it places the info in the existing window. How can I make it open a
      > new window for the new data?
      >
      > htp.p('<TD><A HREF=javascript :_SubmitForm("P ARAMETER_FORM") ><IMG
      > SRC="/sec/image/info.bmp" TARGET="_top" BORDER=0
      > ALIGN=ABSMIDDLE ></A></TD>');
      >
      > Sorry if there is not enough info. I am new at this.[/color]

      Change
      TARGET="_top"
      to
      TARGET="_blank"


      Comment

      • DU

        #4
        Re: open post in new window HELP!!

        McKirahan wrote:
        [color=blue]
        > "gregg" <gf_em@hotmail. com> wrote in message
        > news:daab83df.0 312291458.fc679 7c@posting.goog le.com...
        >[color=green]
        >>I have the folowing code implimented. when the post button is pressed
        >>it places the info in the existing window. How can I make it open a
        >>new window for the new data?
        >>
        >>htp.p('<TD> <A HREF=javascript :_SubmitForm("P ARAMETER_FORM") ><IMG
        >>SRC="/sec/image/info.bmp" TARGET="_top" BORDER=0
        >>ALIGN=ABSMIDD LE></A></TD>');
        >>
        >>Sorry if there is not enough info. I am new at this.[/color]
        >
        >
        > Change
        > TARGET="_top"
        > to
        > TARGET="_blank"
        >
        >[/color]

        target attribute in an <img> element is invalid markup and can not be
        rendered anyway.

        DU

        Comment

        • McKirahan

          #5
          Re: open post in new window HELP!!

          "DU" <drunclear@hotR EMOVETHISmail.c om> wrote in message
          news:bss61e$3r5 $1@news.eusc.in ter.net...[color=blue]
          > McKirahan wrote:
          >[color=green]
          > > "gregg" <gf_em@hotmail. com> wrote in message
          > > news:daab83df.0 312291458.fc679 7c@posting.goog le.com...
          > >[color=darkred]
          > >>I have the folowing code implimented. when the post button is pressed
          > >>it places the info in the existing window. How can I make it open a
          > >>new window for the new data?
          > >>
          > >>htp.p('<TD> <A HREF=javascript :_SubmitForm("P ARAMETER_FORM") ><IMG
          > >>SRC="/sec/image/info.bmp" TARGET="_top" BORDER=0
          > >>ALIGN=ABSMIDD LE></A></TD>');
          > >>
          > >>Sorry if there is not enough info. I am new at this.[/color]
          > >
          > >
          > > Change
          > > TARGET="_top"
          > > to
          > > TARGET="_blank"
          > >
          > >[/color]
          >
          > target attribute in an <img> element is invalid markup and can not be
          > rendered anyway.
          >
          > DU[/color]

          You're absolutely right. I saw the HREF tag and stopped thinking.

          Try adding TARGET="_blank" inside the (unshown) <FORM> tag.

          P.S. What good does TARGET="_top"in side the <IMG> tag do?


          Comment

          • Thomas 'PointedEars' Lahn

            #6
            Re: open post in new window HELP!!

            gregg wrote:
            [color=blue]
            > I have the folowing code implimented. when the post button is pressed
            > it places the info in the existing window. How can I make it open a
            > new window for the new data?[/color]

            Du not use
            vvvvv[color=blue]
            > htp.p('<TD><A HREF=javascript :_SubmitForm("P ARAMETER_FORM") ><IMG[/color]
            ^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^
            |
            but window.open(... ). And that is utter nonsense.


            PointedEars

            Comment

            Working...