Forum Moderators: open
When you click on a link it opens up a new window (child window), however what i want to do is when you click on a link within the open window (child), it closes the child window and takes you back to the page specified within the link for example the home page in the parent window. Does that make sense?
Any ideas? I've been scouring the web but I can't seem to find the code I'm looking for.
Thanks.
I don't think there is a way of completing what you are trying to do without the use of JavaScript, and I assume this is what you mean by saying Search Engine friendly by eliminating the JavaScript.
I might be wrong and if this is the case am sure some other members shall correct me and put you right ;)
-gs
I'm sure some other members will put their ideas into the ring.
Cheers.
<a onclick="javascript: opener.location.href = 'test.html'; window.close()" href="test.html">click</a>
this way the search engine finds the new page with the href tag but user intervention uses the onclick event and closes the open window.
Is this what you mean to achieve?
-gs
<a onclick="javascript: opener.location.href = 'test.html'; window.close(); return false" href="test.html">click</a>
This would be more applicable to javascript that opens a link/window via JavaScript. By using return false; you can link using JavaScript, but still make the link spider friendly.