473,657 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Navigate Within Page?

chunk1978
224 New Member
hi there...

i'm trying to use window.navigate function to navigate within a page WITHOUT a link (i'm using a checkbox's onChange handler)... according to what i've read, it should be working, but its not... surprise... welcome to javascript...

any ideas?

Expand|Select|Wrap|Line Numbers
  1.  
  2. <html>
  3. <head>
  4.  
  5. <script type="text/javascript">
  6.  
  7. function GotoBottomOfPage() 
  8.     {
  9.     if(document.form.checkbox.checked)
  10.     {window.navigate("#AnchorBottomOfPage");}
  11. }
  12. </script>
  13.  
  14. </head>
  15.  
  16. <body>
  17. <form id="form" name="form" method="post" action="">
  18.     <p>
  19.       <input type="checkbox" name="checkbox" value="checkbox" onClick="GotoBottomOfPage();"/>
  20.     Click To Goto The Bottom Of The Page</p>
  21.     <p>&nbsp;</p>
  22.     <p>&nbsp;</p>
  23.     <p>&nbsp;</p>
  24.     <p>&nbsp;</p>
  25.     <p>&nbsp;</p>
  26.     <p>&nbsp;</p>
  27.     <p>&nbsp;</p>
  28.     <p>&nbsp;</p>
  29.     <p>&nbsp;</p>
  30.     <p>&nbsp;</p>
  31.     <p>&nbsp;</p>
  32.     <p>&nbsp;</p>
  33.     <p>&nbsp;</p>
  34.     <p>&nbsp;</p>
  35.     <p>&nbsp;</p>
  36.     <p>&nbsp;</p>
  37.     <p>&nbsp;</p>
  38.     <p>&nbsp;</p>
  39.     <p>&nbsp;</p>
  40.     <p>&nbsp;</p>
  41.     <p>&nbsp;</p>
  42.     <p>&nbsp;</p>
  43.     <p>&nbsp;</p>
  44.     <p>&nbsp;</p>
  45.     <p>&nbsp;</p>
  46.     <p>&nbsp;</p>
  47.     <p>&nbsp;</p>
  48.     <p>&nbsp;</p>
  49.     <p>&nbsp;</p>
  50.     <p>&nbsp;</p>
  51.     <p>&nbsp;</p>
  52.     <p>&nbsp;</p>
  53.     <p>&nbsp;</p>
  54.     <p>&nbsp;</p>
  55.     <p>&nbsp;</p>
  56.     <p>&nbsp;</p>
  57.     <p>&nbsp;</p>
  58.     <p>&nbsp;</p>
  59.     <p>&nbsp;</p>
  60.     <p>&nbsp;</p>
  61.     <p>&nbsp;</p>
  62.     <p>&nbsp;</p>
  63.     <p>&nbsp;</p>
  64.     <p>&nbsp;</p>
  65.     <p>&nbsp;</p>
  66.     <p>&nbsp;</p>
  67.     <p>&nbsp;</p>
  68.     <p>&nbsp;</p>
  69.     <p>&nbsp;</p>
  70.     <p>&nbsp;</p>
  71.     <p>&nbsp;</p>
  72.     <p>&nbsp;</p>
  73.     <p>&nbsp;</p>
  74.     <p>&nbsp;</p>
  75.     <p>&nbsp;</p>
  76.     <p>&nbsp;</p>
  77.     <p>&nbsp;</p>
  78.     <p>&nbsp;</p>
  79.     <p>&nbsp;</p>
  80.     <p>&nbsp;</p>
  81.     <p>&nbsp;</p>
  82.     <p>&nbsp;</p>
  83.     <p>&nbsp;</p>
  84.     <p>&nbsp;</p>
  85.     <p>&nbsp;</p>
  86.     <p>&nbsp;</p>
  87.     <p>&nbsp;</p>
  88.     <p>&nbsp;</p>
  89.     <p>Bottom Of The Page! woo hoo! </p>
  90.  
  91. <a name="AnchorBottomOfPage"></a>
  92. </form>
  93. </body>
  94. </html>
  95.  
  96.  
Mar 13 '07 #1
5 5146
dorinbogdan
839 Recognized Expert Contributor
This seems to be a not yet resolved bug in FireFox.
See this link.
Mar 13 '07 #2
acoder
16,027 Recognized Expert Moderator MVP
window.navigate is not a function.

Use
Expand|Select|Wrap|Line Numbers
  1. location.hash="#...";
instead.
Mar 13 '07 #3
chunk1978
224 New Member
window.navigate is not a function.

Use
Expand|Select|Wrap|Line Numbers
  1. location.hash="#...";
instead.
great... thanks for the replies... works now... at first with your fix, i was writing:

Expand|Select|Wrap|Line Numbers
  1. {location.hash="#AnchorBottomOfPage";
  2.  
but it wasn't working because of the "#" sign... but this function works...

Expand|Select|Wrap|Line Numbers
  1. function GotoBottomOfPage() 
  2.     {
  3.     if(document.form.checkbox.checked)
  4.     {location.hash="AnchorBottomOfPage";}
  5. }
  6.  
thanks again
Mar 13 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
No problem. Glad you got it working.
Mar 13 '07 #5
acoder
16,027 Recognized Expert Moderator MVP
great... thanks for the replies... works now... at first with your fix, i was writing:

Expand|Select|Wrap|Line Numbers
  1. {location.hash="#AnchorBottomOfPage";
  2.  
but it wasn't working because of the "#" sign... but this function works...

Expand|Select|Wrap|Line Numbers
  1. function GotoBottomOfPage() 
  2.     {
  3.     if(document.form.checkbox.checked)
  4.     {location.hash="AnchorBottomOfPage";}
  5. }
  6.  
thanks again
It works if the anchor is named without the hash (at least in Firefox it does).
Mar 13 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
8301
by: Richard Bell | last post by:
Newbie question ... please respond to group I'm trying to open/navigate to a url. How can I tell when the page is fully loaded? Testing suggest that window.open returns before the page is completely loaded and displayed. Likewise, window.navigate. The code looks something like this: wHandle = window.open( url, name, flags ); .... // how to tell when url is fully loaded and displayed
3
1394
by: guy | last post by:
Hi all - And apologies if I'm in the wrong newsgroup. I'm a newbie here and I'd certainly appreciate any pointers to the right forum. To the point... We're running a WebBrowser object (through an AxWebBrowser activex control), and have found that it navigates to a "cannot load" error page when the network cable's unplugged. I should add at this point that we're trying to navigate to a page on localhost ;-)
1
2425
by: Rick | last post by:
I am creating an instance of IE like so var ie = new ActiveXObject("InternetExplorer.application") When I call ie.Navigate and include post data, I always get a GET call instead of a POST. The same call works from within a client-server app, but it doesn't work from within an html page. Any ideas out there??? Thanks, Rick
1
7845
by: Ryan Faricy | last post by:
I am in need of help here ... I have an application that needs to read information from an existing web browser window (located within an application I did not create). I am able to read the text from it using the IEDom tutorial seen everywhere ... .... but now what I need it to do is to actually navigate to a different page. I have attempted to create an object within my application that points to the Internet Explorer_Server class'...
0
1782
by: Prabhupl | last post by:
Hi Can u tell me that how to navigate one page to another page by using the control while click image button(not by using any anchor or hyperlink etc). while clicking the image button i need to transfer from one page to another page, execution should complete the existing page and then navigate to another page Not by using Response.Redirect or Session.Transfer. It should also need to complete validation(i mean page.valid is true only...
2
17956
by: Ryan Ramsey | last post by:
I have been chasing this one down for a week and have narrowed it down to a machine issue. I have the following code: webBrowser.Navigate(http://finao.net/post_dkp.php?database=40); Basically all this script does is create an xml output file. After the navigate, the function stops and is triggered again when webbrowser_DocumentCompleted fires and then the XML file is read by the
2
1214
by: =?Utf-8?B?RWRC?= | last post by:
This very nice feature in VS2003 seems to have been omitted in VS2005. I see the bookmarks, but it's not the same. Am I just not seeing where it is in VS2005?
1
2394
by: aecorzine | last post by:
Hopefully someone can help... I am new to the programming environment. I am attempting to programmatically (through a click event) open a pdf file and go to a specific page within that file so that the user can read from the pdf (the page number will be found in a database table). I have found code that will either 1) open the pdf in it's own application and 2) open the pdf in a VB Form. Either one of those is fine with me. However, I...
5
23432
by: timnels | last post by:
I have a web browser control that I'd like to point at a HTML file in my installation directory. I am doing something like: string path = Path.GetDirectoryName( Assembly.GetExecutingAssembly().GetModules() .FullyQualifiedName) + "\\howdoi.htm"; webBrowser1.Navigate(path); What do I need to do to form the correct URI string for a local file?
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7320
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.