By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,636 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,636 IT Pros & Developers. It's quick & easy.

open post in new window HELP!!

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
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.