error on page

Javascript coding ..

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 21
Joined: Sun Feb 23, 2003 11:58 pm

Thu Apr 17, 2003 8:57 am

I am having an error on page when I click on the link in blue. It is supposed to call up an email form.

<A HREF=javascript:ContactMe('contact.htm')>Contact</a>

Below is the script which I have place between the <head> tags on my page.

<script LANGUAGE="JavaScript"><!-- Begin
function ContactMe
(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " =
URL, '" + id + "',
width=550,height=500,left = 50,top = 50');");
// End --></SCRIPT>

Could someone tell me whether it is an php.ini setting problem or the script itself. I've tried changing the section URL (hilighted in green) to the web address on my system but get same error and contact form doesnt open.


New php-forum User
New php-forum User
Posts: 80
Joined: Fri Jan 31, 2003 4:18 pm

Thu Apr 17, 2003 10:50 am

not that it's the problem yur asking for but 'javascript:ContactMe('contact.htm') won't work in some browsers...:)

php-forum Active User
php-forum Active User
Posts: 264
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

Thu Apr 17, 2003 11:02 am

i changed your eval() so it makes it easier on the eyes....

eval("page"+id+" ='"+URL+"','"+id+"')");

Post Reply