However my problem occurs when the user uses the browsers back arrow to return to the previous page, the script executes again returning them once more to the page they have come from. Is anyone aware of a work around to this problem as it would seem there isn't one? perhaps even a better solution for opening the target page from the iframe as top location. This is really causing confusion for users, and I really need to get the issue fixed.
If you have one or several links on your webpage, it could be your links resources, you might want your viewers to have the choice of opening the links in _self or in a new window / tab _blank
This code goes in the head section:
And this code goes in your Body section:
<form> <input type="checkbox" name="targetnew" onclick="mylink(this.checked)"> <p>Do you want to open this link in a new window?</p> <p><a href="http://www.codingforums.com">CodingForums</a></p> </form>
You can add as many link in the form section as you like and choose if each link should have a checkbox or just one checkbox the decides all the targets.
this form is submitted using the following .js code in order to generate a pdf Code: document.getElementById("formReport").submit(); the problem is that i get a popup (blocked by firfox by the way) instead of a new window or a tab, how do i solve this?
I need to find a way to open a new _blank type window when a user submits. I have found a few answers but none that fit what i need. alot tell you to use target blank on submit, but i have two buttons that do 2 completely different things. Is there a way to achieve that? here is the code i use!
Basically, when you click a link a function is called with a parameter based on the particular link you run. Then the code runs through an xml file, and if the parent of the nodes I've cyling through has a value equal to the parameter past to the function, that node is used to create a new link with window.open function attached to it.It all works, or seems to, and when I alert what is being built, it looks right to me, yet the links don't work.I've attached a copy of one of the alerts of one of the links as it's built.
So my regular link looks like this:
<li><a rel="external" href="http://www.google.com">Google</a></li> I need to figure out how to add the REL to the onclick in the LI <li onclick="location.href='http://www.google.com/';"><a rel="external" href="http://www.google.com">Google</a></li>
I can't seem to find any instructions about how to insert this REL option....
I'm trying to parse my anchor tags, by getting all the href attribute available in the page, and then i will loop through this attribute values and then parse it. if each href value is equal to "mypage.com", the link will open to the same window, but if not it will open to a new window, more like the concept of determining internal and external links in a page.
I wanted to add to the menu another image link so I copied the same coding, but I do not know where to place the URL target that I want opened. I know I want the userID (dUid) also to follow this link as well. If I want the coding below to act in the same manner as the coding above, but instead open a page called /gift.php, where do I set the Url?
I have a domain name registration field that links to a reseller storefront and then searches for that domain name. I would like the storefront to open in a new window, instead of the parent window. I have tried to insert the target="blank tag but can not seem to get it to work. Is there another way to make that window open? You can see the page and field here: [URL] The field is on the left side, just below the center of the page.
I am using Toby's iKonize script and would like to add a little more functionality to the script but not sure how to.
I would like the script to find all external links and have them open in a new window, rather than setting the target, can this be achieved? Also, if the image could be added after the anchor so it doesn't get any of the styling associated with the anchor element.
I have 30 or 40 different (going to different websites) links on many pages on my website, that I when clicked I need opening under the current window. (Pop-under) - but obviously needs to be done safely (no risk of being pop-up blocked??)So rather than just a target="_blank" - it would be something slightly more complicated, doing a bit of research perhaps the .blur method would help (Though really I have no idea)I'm using the jQuery library for other elements on the site, so jQuery would be ideal if there is a solution for this?If you click on "get code and open site" (Green button) - you'll see it opens up the website under the current window - which is exactly what I want to achieve (It also uses .toggle to switch divs (but i've done that part - just need help with pop-unders