introMsg & chngSite Problem

This is a discussion on "introMsg & chngSite Problem" within the JavaScript Forum section. This forum, and the thread "introMsg & chngSite Problem are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 19th, 2007, 21:12
New Member
Join Date: Feb 2007
Location: Michigan
Age: 25
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
introMsg & chngSite Problem

Hey all, I am building an art web site for a friend of mine. And while I am building it he wants his new domain to redirect his new visitors to his current site(I didnt do that site, it sucks). Let me know what is going wrong, I took this code from a tutorial from one of my school text books, and the bottom two scripts arent working. What do you guys/gals think? Thanks for the input.


<html>
<head>
<title>Utopia0666.com</title>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--Hide from old browsers
function chngSite() {
alert("You are to be transported to the current site location!")
location = "http://www.geocities.com/chrono0666/"
}
//-->
</SCRIPT>
</head>
<body>
<center><img src="fun.jpg" HSPACE=5 vspace=5 height=64 weight=300></center>
<center><hr width="59%"></center>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--Hide from old browsers
document.bgColor="#c10000"
var tNow = new Date()
var tlocDate = tNow.toLocaleString()
var tDate = tlocDate.substring(0, 35)
document.write("<H3><CENTER>Welcome, today is "+tDate+"</CENTER></H3>")
var intro1 = "Hi, thanks for visiting my Web site. My new page is currently "
var intro2 = "under construction. You can click <a href="http://www.geocities.com/chrono0666/" here </a> or "
var intro3 = "wait 10 seconds to me moved automatically to my current site. "
var introMsg = intro1+intro2+intro3
document.write("<H4><CENTER>"+introMsg+"</CENTER></H4>")
setTimeout("chngSite()",10000)
//-->
</SCRIPT>
</body>
</html>
Reply With Quote

  #2 (permalink)  
Old Mar 20th, 2007, 06:09
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: introMsg & chngSite Problem

First thing I see is this:

Code: Select all
var intro2 = "under construction. You can click <a href="http://www.geocities.com/chrono0666/" here </a> or "
Change it to the following because the quotes are throwing the link outside of the variable:

Code: Select all
var intro2 = 'under construction. You can click <a href="http://www.geocities.com/chrono0666/" here </a> or '
Reply With Quote
Reply

Tags
help javascript

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
First image problem and inline list problem konnor5092 Web Page Design 8 Dec 1st, 2007 09:08


All times are GMT. The time now is 04:18.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43