473,320 Members | 2,147 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,320 software developers and data experts.

JavaScript Forward (Elementary question)

Dear friends

I work for a very small business and therefore my job functions are
quite varied, and once in a while I stumble upon something which I'm
not really qualified to do.

In this case I've run into a problem updating the company's (very
simple) web site.

For a variety of reasons, it's become necessary to create a web page
that automatically forwards the user to another website on the same
server.

I was under the impression the following JavaScript code would perform
this function, but it does not seem to work. I would be extremely
happy if somebody could give me some hints as to what I'm doing wrong.

The HTML/JavaScript I'm trying is this:

<HTML>
<HEAD>
<script language="Javascript">
function forward()
{
location.href="http://www.solumforlag.no/katalog/katalog.html";
}
</script>
<TITLE>Please wait...</TITLE>
<body onload=setTimeout('forward()',5000)">
</body>
</HEAD>


Regards
Aleksander Solum
Jul 23 '05 #1
2 6188
Aleksander Solum wrote:
<snip>
function forward()
{
location.href="http://www.solumforlag.no/katalog/katalog.html";
}
</script>
<TITLE>Please wait...</TITLE>
<body onload=setTimeout('forward()',5000)">
<body onload="setTimeout('forward()',5000)">
Missing "
Mick </body>
</HEAD>


Jul 23 '05 #2
"Aleksander Solum" <ka*****@ml1.net> wrote in message
news:6f**************************@posting.google.c om...
Dear friends

I work for a very small business and therefore my job functions are
quite varied, and once in a while I stumble upon something which I'm
not really qualified to do.

In this case I've run into a problem updating the company's (very
simple) web site.

For a variety of reasons, it's become necessary to create a web page
that automatically forwards the user to another website on the same
server.

I was under the impression the following JavaScript code would perform
this function, but it does not seem to work. I would be extremely
happy if somebody could give me some hints as to what I'm doing wrong.

The HTML/JavaScript I'm trying is this:

<HTML>
<HEAD>
<script language="Javascript">
function forward()
{
location.href="http://www.solumforlag.no/katalog/katalog.html";
}
</script>
<TITLE>Please wait...</TITLE>
<body onload=setTimeout('forward()',5000)">
</body>
</HEAD>


Regards
Aleksander Solum


Here's an alternative that may suit your needs:

<html>
<head>
<meta http-equiv="refresh" content="0;
URL=http://www.solumforlag.no/katalog/katalog.html">
<title>default.htm</title>
</head>
<body>
<a href="http://www.solumforlag.no/katalog/katalog.html"> Click here! </a>
</body>
</html>

I put something like the above (but called "default.htm") in subfolders
(e.g. "images") on my Web site to redirect visitors to my Home page in case
my Web host allows directory browsing.

Jul 23 '05 #3

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

Similar topics

15
by: Sue Barth | last post by:
Hi all, I hope I'm in the right ng for this... I made an .asp page that allows users to toggle thru a directory of photos. The page accomplishes the following: selects a directory of photos...
5
by: TrvlOrm | last post by:
Can any one please help me...I am new to JavaScript and I have been struggling with this code for days now and can't figure it out. I would like to get the Buttons to correspond with the action...
5
by: Lucian Sandor | last post by:
Hello everyone, While I'm a newbie here, I a not new to google, so please don't send me back, it would be useless. First of all I have to specify I am working on a Blogger.com template, therefore...
6
by: dark.peony | last post by:
Hi, (--1--) I'm trying to find a way to jump to a link (<a href="ref"></a>) in a page that is generated with javascript. The source view of the page only shows the javascript methods. The...
1
by: the friendly display name | last post by:
Simple question: How to make datagrid paging work without javascript? I have a simple datagrid, which gets populated by a dataview, it works perfectly, paging works too, but, as I said, it...
28
by: Tom Plunket | last post by:
Hey gang; In C++ I often used forward declarations to allow me to get away with not including additional files in headers, if in fact all I needed was to know that a type existed. e.g. ...
10
by: lkagan2000 | last post by:
I'm reading 'Ajax in Action', (one of the best of the many tech books I've read) and there's an example that I just don't fully understand. If you happen to have the book, it's on page 75. I'm...
6
by: =?Utf-8?B?Sm9obiBCdW5keQ==?= | last post by:
Hey guys, I've searched high and low for a way to populate a vb array with data from a javascript array. I can find 50 ways to do it with ASP but not one for VB. I appreciate what help you can...
1
by: anupamaavadutha | last post by:
hi all, iam new to javascript. i have problem calling javascript functions.iam designing a calender page.here is my code. <%@ page...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.