Solved

java error on website

Posted on 1998-03-25
5
163 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
ID: 1858084
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
ID: 1858085
Thanks. I need it for my ads.
0
 
LVL 3

Expert Comment

by:bigelos
ID: 1858086
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
ID: 1858087
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
ID: 1858088
OK, I won't argue with success.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

809 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