473,411 Members | 1,995 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,411 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 9485
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: 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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.