473,748 Members | 9,596 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I create link that directs user to browser homepage?

4 New Member
I've created a webpage for a wireless hotspot the requires a user to agree to some terms and conditions before it allows them internet access. After they have agreed to the terms I have a "Continue to Internet" link which currently just sends them to Google. I would rather send them to the homepage they have set in their browser preferences. For the IE uses I can just send them to about:home but I'm struggling to find a way to do it for firefox. Is their a javascipt command to mimic a homepage button click? I can't think of any reasons this would be a privacy or security issue but I might be missing something. Any suggestions would be greatly appreciated.
Jul 17 '08 #1
3 1592
acoder
16,027 Recognized Expert Moderator MVP
Not sure how well it's supported across browsers, but window.home() will work in Firefox.
Jul 18 '08 #2
billyguy
4 New Member
Thanks acoder that works great. I'm new to all this so my code probably needs to be cleaned up but for anyone interested this code seems to work for IE, firefox, and opera (at least the current versions)
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" >
  2. function sendHome(){
  3.    if(window.home!=null){
  4.       window.home();
  5.    }
  6.    else{
  7.       document.location.href = "about:home";
  8.    }
  9. }
  10. </script>
  11.  
It doesn't appear to work for safari. If anyone has any ideas on safari let me know.
Jul 18 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
I'm not sure, but I don't think Safari has a way of directing to the home page, so you can just display an alert for it and other browsers which also do not support this non-specified feature.
Jul 18 '08 #4

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

Similar topics

2
1154
by: Jeff | last post by:
Please don't look down on me for this, but it is something I have never thought learning before. Lets say you have protected pages.. and youhave script at the top that directs the user to the login page if they are not logged on. how can i have someone log in, and once they click the login button, they get directed to the page they were trying to view in the first place? For example, a user wants to view the standings.asp page.... but...
1
1334
by: asd987 | last post by:
Hi, I must begin to say that I'm rather new in wtiting and using JavaScript. Now I want to use JavaScript in a HTML-page. On the homepage is a link. Every time the homepage is displayed the link must point to another target. I want to realize this by having a lot of differet targetpages. The names of these pages are p1001.htm until p<nnnn>.htm. At this moment the last is p1153.htm, but the amount is increasing every day. I have a file...
1
1173
by: asd987 | last post by:
Hi, I must begin to say that I'm rather new in wtiting and using JavaScript. Now I want to use JavaScript in a HTML-page. On the homepage is a link. Every time the homepage is displayed the link must point to another target. I want to realize this by having a lot of differet targetpages. The names of these pages are p1001.htm until p<nnnn>.htm. At this moment the last is p1153.htm, but the amount is increasing every day. I have a file...
1
1704
by: Steve Gelfmann | last post by:
I am new to ASP.NET. So I am trying to learn from the book I just bought. There is a simple example of how to build a user control which I religiously typed into the Notepad, but the results are not what was expected. Here's what I did. First, I created the user control and saved it in a file "SimpleHeader.ascx". <%@ Control Language="VB" %> <html>
8
20368
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1: Start with original thumbnails & two empty sub directories STEP 2: Create smaller versions of the originals for one sub directory STEP 3: Create thumbnail version of the originals the other sub directory STEP 4: Create an index.html pointing to the...
7
6206
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function Body_Onload() ' create the object Set obj = Server.CreateObject("UploadImage.cTest") ' use method of the object Body_Onload = obj.cTestDelete
1
1174
by: akaballa | last post by:
Hi, I am creating this website using asp that displays different records of information. I have stored these records in a sql database in a webserver. Now, In one of my records, I have to create a link that would direct me to a serparate word document saved as a html file (I do not want this link to show up in the other record pages. This file is also stored into the same webserver as the other records. How can I create a link ONLY on...
15
2684
by: harvey | last post by:
How do I make PHP create a database for mysql please? I can see how to make tables and I have read all the documents I can find but I don't understand how to make the database itself. All the tutorials I can find seem to bypass the issue by ignoring it? Am I missunderstanding something?
1
5346
by: =?Utf-8?B?YWxiZXJ0bHk=?= | last post by:
How can I create a new session from the existing session in asp.net when new IE session is opened using javascript's window.open method or user's hyperlink click? I have a web application which needs two different sessions. When user clicks on a link in the existing session, application pops up new window and the new session should start from here onwards for this instance of IE. I need the old session to continue in the parent IE...
0
8991
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
8830
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
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
9370
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...
0
9247
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
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
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
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
3
2215
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.