473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

javascript anchor help

Does anyone have any javascript code that can navigate to an anchor in the
page load? I use location.href and it works in IE, but I can not get it to
work properly in FireFox. Any suggestions? Thanks for any advice.

Regards,
Chris
Oct 19 '05 #1
4 9483
Chris Kettenbach said the following on 10/19/2005 11:43 AM:
Does anyone have any javascript code that can navigate to an anchor in the
page load? I use location.href and it works in IE, but I can not get it to
work properly in FireFox. Any suggestions? Thanks for any advice.


Set the .hash property.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 19 '05 #2
Lee
Chris Kettenbach said:

Does anyone have any javascript code that can navigate to an anchor in the
page load? I use location.href and it works in IE, but I can not get it to
work properly in FireFox. Any suggestions? Thanks for any advice.

location.hash="#myAnchor";

Oct 19 '05 #3
Awesome guys!!! That was perfect!!!

"Randy Webb" <Hi************@aol.com> wrote in message
news:S-******************************@comcast.com...
Chris Kettenbach said the following on 10/19/2005 11:43 AM:
Does anyone have any javascript code that can navigate to an anchor in
the page load? I use location.href and it works in IE, but I can not get
it to work properly in FireFox. Any suggestions? Thanks for any advice.


Set the .hash property.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly

Oct 19 '05 #4
Awesome guys!!! That was perfect!!!
"Lee" <RE**************@cox.net> wrote in message
news:dj********@drn.newsguy.com...
Chris Kettenbach said:

Does anyone have any javascript code that can navigate to an anchor in the
page load? I use location.href and it works in IE, but I can not get it
to
work properly in FireFox. Any suggestions? Thanks for any advice.

location.hash="#myAnchor";

Oct 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: nam | last post by:
could someone please help me with this bizarre problem - I've created a swf file at the top of my html page. The swf file (using Swish) is simply a menu of 5 links to 5 anchor points on the html...
3
by: bigbinc | last post by:
set scroll position in javascript. Is there a way to do this without using document.location, example. document.location = "#gohere" <a name="gohere">
1
by: Julius Mong | last post by:
Dear all, according to the ASV3 manual known problem section, to make an <a> execute some Javascript onclick: ...
4
by: Sergio del Amo | last post by:
i, I have the next html page <html> <head> <script> <!-- function insertcode() { var code ="<p> blablabal babala babababab</p><h1>here comes header</h1><span>fadfafa<a...
9
by: Astra | last post by:
Hi everybody Wonder if you could help me out. I created a simple JavaScript routine to enable a user to click backwards and forwards between small news articles. This routine works fine in IE...
5
by: elsenraat_76 | last post by:
Hello! I was wondering if someone could help me out with a problem I'm having? I'm trying to input a javascript value into an anchor tag (from a function), but don't have an event to call the...
11
by: yawnmoth | last post by:
If using an onclick event handler to execute javascript when an anchor element is clicked on, what should the href attribute be? #? javascript:void(0)? Something else?
1
by: umamy | last post by:
Hi, I am writing code to do the followin: - user clicks a link - the page reloads and sets a cookie with a js function in the header. The function reloads the same page with the cookie set and...
12
by: wavedancer | last post by:
I just tried validating the page I'm working on as <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> and it fails on the PayPal...
3
by: dasien | last post by:
right off the bat - im a javascript noob so please forgive the question. im sure it is some stupid bit of syntax that i am missing, but im a middle tier developer trying to help out a friend! so...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.