469,924 Members | 1,420 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,924 developers. It's quick & easy.

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("PARAMETER_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.
Jul 20 '05 #1
5 1631
DU
gregg wrote:
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("PARAMETER_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.


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

http://jibbering.com/faq/#FAQ4_37
http://jibbering.com/faq/#FAQ4_24

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

DU
Jul 20 '05 #2
"gregg" <gf***@hotmail.com> wrote in message
news:da*************************@posting.google.co m...
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("PARAMETER_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.


Change
TARGET="_top"
to
TARGET="_blank"
Jul 20 '05 #3
DU
McKirahan wrote:
"gregg" <gf***@hotmail.com> wrote in message
news:da*************************@posting.google.co m...
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("PARAMETER_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.

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


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

DU
Jul 20 '05 #4
"DU" <dr*******@hotREMOVETHISmail.com> wrote in message
news:bs**********@news.eusc.inter.net...
McKirahan wrote:
"gregg" <gf***@hotmail.com> wrote in message
news:da*************************@posting.google.co m...
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("PARAMETER_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.

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


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

DU


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"inside the <IMG> tag do?
Jul 20 '05 #5
gregg wrote:
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?
Du not use
vvvvv htp.p('<TD><A HREF=javascript:_SubmitForm("PARAMETER_FORM")><IMG

^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
but window.open(...). And that is utter nonsense.
PointedEars
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ben Smeets | last post: by
17 posts views Thread by Applebrownbetty | last post: by
3 posts views Thread by ACaunter | last post: by
2 posts views Thread by Jules_Anime | last post: by
19 posts views Thread by Sonnich | last post: by
9 posts views Thread by wax | last post: by
4 posts views Thread by Arivu PHP | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.