Link opens two windows

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
ummhasan
Forum Commoner
Posts: 31
Joined: Sun Jun 13, 2010 7:24 pm
Location: USA

Link opens two windows

Post by ummhasan »

Hey Guys,

I have a buttons linked to pdf's and to a form and when the buttons are clicked it opens 2 pages of the same thing. If I take out the _blank target it opens only one but of course in the same page which I DONT want.

Can anyone tell me how to fix the problem please here's the code:

[text]
<a href="assets/Youth_Competition.pdf" target="_blank">
<input name="printRegForm" type="image" id="printRegForm" accesskey="enter" value="Print Registration Form" src="assets/printButton.png" />
</a>

<a href="assets/tmp/persistent/form209441/form.html" target="_blank">
<input name="printRegForm" type="image" id="printRegForm" accesskey="enter" src="assets/onlineButton.png" />
</a>

[/text]

They are both within a table.

Thanks in advance!
rahulzatakia
Forum Commoner
Posts: 59
Joined: Fri Feb 05, 2010 12:01 am
Location: Ahmedabad

Re: Link opens two windows

Post by rahulzatakia »

Hello, if you use the <input> tag between <a> tag for the link, then it will open two different tabs. But if you use simple <img> tag then your issue will be solved.
ummhasan
Forum Commoner
Posts: 31
Joined: Sun Jun 13, 2010 7:24 pm
Location: USA

Re: Link opens two windows

Post by ummhasan »

Thanks! it worked
Post Reply