error on page

Javascript coding ..

Moderators: macek, egami, gesf

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

error on page

Postby da9nlc » 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 + " = window.open(
URL, '" + id + "',
'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,
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.

Thanks

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

Postby *JaH* » 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...:)

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

Postby liquedus » Thu Apr 17, 2003 11:02 am

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

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


Return to “JavaScript”

Who is online

Users browsing this forum: No registered users and 0 guests

cron