how to get the open link in new tab for the image button in the asp.net please give me the solution
You can achieve the same effect using an anchor tag and an image
<a href="somepage" target="_blank">
<img src="yourimagepath" alt="imagetext" />
</a>
There is no specification in the W3C for opening a page in a new tab. There is one for opening in a new window, with the attribute
target="_blank"
You should stick with that because it's really up to the end user to decide how the web browser should behave. In Internet Explorer, for example, there's the option to either open new windows in tabs or window's. Don't try to force the behavior of the browser to do something other than what the user has decided.
Related
Website Link: http://www.londonuw.com/category.aspx?id=MISC15
Under other products, click workers comp. You can see the page loads within the frame.
Here is the iframe code:
<iframe src="mywebsitelink" width="1000px" height="1550px" frameborder="0" scrolling="no"></iframe>
What do I add to make this load in the parent window instead of the iFrame?
In the i frame link add <a href="" target=_parent>.
The would open the page in parent and not in the iframe.
Found out what needed to be done. I inspected stackoverflow's post of iFrames.
http://www.w3schools.com/html/html_iframe.asp
When clicking on links in the center page, it will open a new window. But when i clicked on the dark bold menu items on the left it loaded in the parent window without needing to open a new page. Exactly what I needed!
Inspecting that element showed this code:
(a target="_top" href="default.asp" class="menu_default">HTML HOME
So all I did was replace "default.asp" with my website link and HTML HOME with my desired button name and magic!
**base target="_parent" or target="_parent" did not work for some reason
Thank you Vipul Behl for leading me in the right direction!
<a title="xyz" rel="simplemodal[examples]" href="images/x_big.jpg">
Right now, I'm clicking a pic which is allowing me to open a big image (modal window) with the above line and, with the title xyz but, I also want a link (for example, google)?
Thanks!
Edited-
I think my question was wrongly interpreted or I didn't ask correctly anyway..
Right now when I click on a small pic, I get a modal window with the bigger version of the same pic and, a title (xyz) on top of it.
I want to know how can I add a link to some website in the same line of code. I'm confused as a href is already used above!
Thanks!
Add target="_blank"
<a title="xyz" rel="simplemodal[examples]" href="images/x_big.jpg" target="_blank">
Add attribute target and set it to: _blank like here:
<a target="_blank" title="xyz" rel="simplemodal[examples]" href="images/x_big.jpg">
You can use target="_blank" property,
Link Text
The target attribute specifies where to open the linked document.
<a target="_blank|_self|_parent|_top|framename">
More about target attributes,
_blank Opens the linked document in a new window or tab
_self Opens the linked document in the same frame as it was clicked (this is default)
_parent Opens the linked document in the parent frame
_top Opens the linked document in the full body of the window
framename Opens the linked document in a named frame
I search too much on Google but i couldn't find any result so i'm posting my question here
I'm using wordpress 3.6 and the wp e-commere plugin
i'm use this anchor tag
<a target="_blank" href="http://www.google.com">google</a>
i also use window.open(url,'_blank'); // function do same problem
when a user clicks on the link, a new tab opens and within 1 second it closes again.. its not working in mozilla and chrome, but it is working in IE
i checked and there is no theme problem.
if i add an anchor tag from e-commerce product then the tag target=_blank will not work, and if i add a anchor tag from wp product then the anchor tag will work...
How can i solve this problem?
and if i add href value with out http:// e.g
google
it opens in new tab successfully
but then its url is
localhost/wordpress/product/www.google.com
if i write a proper href with http://, so there is open and close issue.
Any one know it solution ?
i apply many type of jquery and javascript code, but actually when i write _blank, and then new tab opening then issue comes
Update:
i'm adding some javascript code,
i use this method to open new tab
function urltarget(url,target){
if (target == '') {
target = '_self';
}
window.open(url,target);
return false;
}
if i enter
<a href="" onclik="urltarget('http://www.example.com','_blank');" > Example </a>
//its work ok, but if i used .net url
<a href="" onclik="urltarget('http://www.example.net','_blank');" > Example </a>
//when .net comes in url then it create problem, new tab open and again close.
but it work in IE
Is there a way to open a page in XHTML without using <a href="page.html" target="_blank"> that is standards compliant?
I'm not using frames, but there are some pages that I want to open in a new window instead of the current one.
You can use javascript's window.open() method. However this could easily be blocked by a pop-up blocker. Why do you not want to use the "_blank" target?
You can use something like this:
My Page
And then you run this jQuery:
$(document).ready(function() {
$('a[rel="external"]').attr('target', '_blank');
});
This will add the target="blank" to the links and make your HTML validate :)
Most pop-up blockers wont block a pop up that has been requested by the user e.g you click a link and it pops up a window. IF you add an onlick event to your link and a target, the desired effect will work even if JS is turned off although you don't want to use target="_blank"
A link which is opening in a new window What is more appropirate to put in Title="text here".
Title="Opens in new window"
or
Title="Opens in a new window"
or
Title="Link opens in new window"
or
Title="Link will open in new window"
or
Title="New window will open" (used by linkedin.com)
Which is grammatically and Logically correct? What do you use?
"Clik to view in new window" would be the best title
The title should reflect the content of the linked page, so it should perhaps rather be something like "Someones page about something (opens in a new window)".
Note that the target attribute is deprecated in XHTML, so to open a new window in an appropriate way you would use a Javascript in the onclick event that overrides the normal behaviour of the link. (Keep the href in the link though, so that search engines can follow the link, and people with Javascript disabled still can reach it.)
Opens in new Tab/ Window depending on
your browser settings