What is target="_new"
? Validator is raising an error..
How do you do this with jquery because Validator is raising an error.
On the same page, I have target="_new"
and target="_blank"
. target="_new"
is in that form code which i received from email newsletter pany.
I'm using this for target="_blank"
$(function() {
$('a[href^=http]').click( function() {
window.open(this.href);
return false;
});
});
What should i do for target="_new"
Update: 1 min Ago
upon clicking on submit button i want to open a page in new window to pass validation how to do this in jquery as i'm doing for other external link.
update:
this is code
<form method="post" class="form-wrapper" action=".php">
What is target="_new"
? Validator is raising an error..
How do you do this with jquery because Validator is raising an error.
On the same page, I have target="_new"
and target="_blank"
. target="_new"
is in that form code which i received from email newsletter pany.
I'm using this for target="_blank"
$(function() {
$('a[href^=http]').click( function() {
window.open(this.href);
return false;
});
});
What should i do for target="_new"
Update: 1 min Ago
upon clicking on submit button i want to open a page in new window to pass validation how to do this in jquery as i'm doing for other external link.
update:
this is code
<form method="post" class="form-wrapper" action="http://sitename./form.php">
Share
Improve this question
edited Mar 20, 2010 at 2:48
Jitendra Vyas
asked Mar 17, 2010 at 4:01
Jitendra VyasJitendra Vyas
153k240 gold badges587 silver badges868 bronze badges
3 Answers
Reset to default 9There is no such thing as target="_new"
. Using this will simply open the link in a new window called "_new". You might notice that clicking on a link with target="_new" will open a new window (or tab) but then a second link will open in the same window (or tab), rather than opening a second one as you'd probably expect.
Personally, I don't think you should be specifying target="_blank"
at all - let the user choose.
target="_blank" is invalid in XHTML (actually, the entire target attribute is invalid). If you want a link to open in a new window (usually a bad idea, in my opinion) and validation is important to you, the only way to do it is with javascript (like you did).
This is an attribute for a(anchor) tag, which let you open the page on the same window or in a new window.