PDA

View Full Version : IE not recognizing <a href="javascript:checkInput('3')">3i</a>


Ztruker
04-27-2006, 10:56 PM
As the subject says, IE is not executing

<a href="javascript:checkInput('3')">3i</a>

Works fine in Mozilla, SeaMonkey or FireFox.

The function is as follows:

function checkInput(day)
{
alert('Got here');
}

It never gets invoked.

Because of the way my Web pages are constructed, the Javascript functions are all in the body of the page, not the head.

One more wrinkle, this works with IE on my XP Pro system but not with IE on either of my brothers XP Home systems. We are all running the latest version of IE. Is there some setting I'm overlooking that forces some kind of "Strict" HTML interpretation? Any ideas greatly appreciated.

If this is the wrong forum for this question kindly point me elsewhere.

Thanks,
Rich

Ztruker
04-29-2006, 04:16 PM
I do start each page with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

coothead
04-29-2006, 04:37 PM
Hi there Ztruker,

and a warm welcome to these forums. :agree:

Try placing the highlighted comment below the DOCTYPE...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0017)http://mysite.com -->

Ztruker
04-30-2006, 03:33 PM
Thanks coothead, I'll try that.

What will that do for me? I've never seen that anywhere else and am curious what it is supposed to do?

coothead
04-30-2006, 03:47 PM
Hi there Ztruker,

have a look at this thread (http://www.htmlforums.com/showthread.php?t=74307), it may help. :agree:

Tham
05-01-2006, 12:29 PM
coothead, why are you so sweet with Javascript? :-P :cheers:

Ztruker
05-03-2006, 11:45 PM
Sorry, that didn't come out very clear.

My JavaScript is part of the HTML page. It's not being loaded via any kind of imbed so I don't understand how this applies. I'll try it anyhow, thanks.