SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
-
Sep 2, 2003, 02:08 #1
- Join Date
- Mar 2003
- Location
- where I live
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
open a new address in the same window with JS
Hi all,
I have almost no knowledge of javascript.
I use this, found in SP forums,
<a href="java script:void" class="menu" onclick="window.open('http://www.domain.com/'); return false;">domain.com</a> for external links.
Now i wonder if it is possible to open the address in the same window, not in a new window?
Thanks for any idea in advance.[Important] I'm not from staff of sitepoint. BUT:
Please do a search before you post a new thread. It is highly
likely that, someone else has experienced your problem before
and your answer lies in the archives.
-
Sep 2, 2003, 02:39 #2
- Join Date
- Sep 2003
- Location
- Birmingham UK
- Posts
- 100
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
change the onclick bit to:
onlclick="window.location.href='http://www.domain.com';"
-
Sep 2, 2003, 02:41 #3
- Join Date
- Sep 2003
- Location
- Birmingham UK
- Posts
- 100
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
although thinking about it, why don't you use use a normal HTML link?
-
Sep 2, 2003, 02:46 #4
- Join Date
- Mar 2003
- Location
- where I live
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
First, thanks for the quick response.
I will use that for a link that I do not wish search engine spiders to follow.
Many thanks again.[Important] I'm not from staff of sitepoint. BUT:
Please do a search before you post a new thread. It is highly
likely that, someone else has experienced your problem before
and your answer lies in the archives.
-
Sep 2, 2003, 02:59 #5
- Join Date
- Mar 2003
- Location
- where I live
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hey RichPearce,
it results in a 5.0 IE browser with a 404 Error. Do you have any idea about it?Last edited by Dwarf_Fighter; Sep 2, 2003 at 03:27.
[Important] I'm not from staff of sitepoint. BUT:
Please do a search before you post a new thread. It is highly
likely that, someone else has experienced your problem before
and your answer lies in the archives.
-
Sep 2, 2003, 03:13 #6
- Join Date
- Mar 2003
- Location
- where I live
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
a deep search and my answer lies in the archives
http://www.sitepointforums.com/showt...indow+location[Important] I'm not from staff of sitepoint. BUT:
Please do a search before you post a new thread. It is highly
likely that, someone else has experienced your problem before
and your answer lies in the archives.
-
Sep 2, 2003, 03:26 #7
- Join Date
- Mar 2003
- Location
- where I live
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
arrrgghhh.. it does not work in IE 5.0
[Important] I'm not from staff of sitepoint. BUT:
Please do a search before you post a new thread. It is highly
likely that, someone else has experienced your problem before
and your answer lies in the archives.
-
Sep 2, 2003, 04:12 #8
- Join Date
- Sep 2003
- Location
- Birmingham UK
- Posts
- 100
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
how about trying an alternative (and simpler) solution - stick this in between the <head></head> tags on the pages that you don't want indexed by a search engine:
<meta name="robots" content="noindex,nofollow">
when a spider sees noindex, it wont index it.
the nofollow stops it from searching through any links referenced on the page.
-
Sep 2, 2003, 04:16 #9
- Join Date
- Sep 2003
- Location
- Birmingham UK
- Posts
- 100
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
alternatively, this will index the current page, but will not index any of the links contained on it:
<meta name="robots" content="index,nofollow">
-
Sep 2, 2003, 04:18 #10
- Join Date
- Mar 2003
- Location
- where I live
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i just want some of my internal links not to be followed
[Important] I'm not from staff of sitepoint. BUT:
Please do a search before you post a new thread. It is highly
likely that, someone else has experienced your problem before
and your answer lies in the archives.
-
Sep 2, 2003, 04:20 #11
- Join Date
- Sep 2003
- Location
- Birmingham UK
- Posts
- 100
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
if you have a page with some links that you want indexed and some that you don't then use...
<meta name="robots" content="noindex">
...in the head of any pages that you don't want indexed.
Bookmarks