Solved

java error on website

Posted on 1998-03-25
5
157 Views
Last Modified: 2013-12-25
This is a program witten by FlyCast. The problem is everytime I look at the html it says "Now is not defined" Line 6
The url is http://www.cyo.org/test.htm the code is below if you have any question please ask.

<html>
<head>
<title>test</title>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!-- now = new Date();
my_random = now.getTime();
function print_tag() {document.write("<a href='http://adex3.flycast.com/server/socket/127.0.0.1:2800/click/CatholicYouthOnline/HomePage/" + my_random +"'>");
document.write("<img src='http://adex3.flycast.com/server/socket/127.0.0.1:2800/ad/CatholicYouthOnline/HomePage/"+ my_random + "' border=0 width=468 height=60></A>");
} //-->
</SCRIPT>

</head>
<body>

<SCRIPT LANGUAGE="JAVASCRIPT">
<!--print_tag();
 //-->
</SCRIPT>
<NOSCRIPT>
<AHREF="http://adex3.flycast.com/server/socket/127.0.0.1:2800/click//CatholicYouthOnline/HomePage/123456">
<IMG SRC="http://adex3.flycast.com/server/socket/127.0.0.1:2800/ad//CatholicYouthOnline/HomePage/123456 BORDER=0 WIDTH=468 HEIGHT=60>
</A>
</NOSCRIPT>

</body>
</html>
0
Comment
Question by:CYO
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
bigelos earned 50 total points
Comment Utility
Change
<!-- now = new Date();
my_random = now.getTime();
to
<!--
var now = new Date();
var my_random = now.getTime();

and change
<!--print_tag();
to
<!--
print_tag();
0
 

Author Comment

by:CYO
Comment Utility
Thanks. I need it for my ads.
0
 
LVL 3

Expert Comment

by:bigelos
Comment Utility
BTW, the line
<AHREF="http://adex3.flycast.com/server/socket/127.0.0.1:2800/click//CatholicYouthOnline/HomePage/123456">
points to the persons own computer.  Try looking at the same site on another computer and I sincerely doubt it will work. 127.0.0.1 is a universal address to your own computer/server, so it will be different for everybody.
0
 

Author Comment

by:CYO
Comment Utility
It has been working fine for 8 months on many other computers. I tried it at a freinds house, tried it at school and it works great. flycast gave me that it has somthing to do with there ad service.  Anyway my IP address is 207.something.
0
 
LVL 3

Expert Comment

by:bigelos
Comment Utility
OK, I won't argue with success.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now