I tested that page in IE 6.0.2800.1106.xpsp2.030422-1633 and IE
6.0.2900.2180.xpsp_sp2_rtm.040803-2158. I got no error/warning in either
browser.
Is the error you receive an actual JScript error (yellow ! in the bottom
right corner)? Or is it writing something into the document? Or popping
up a separate dialog entirely (unrelated to script errors in IE)? What
does the exact error say? When you View -> Source, is the source you
expect to be there actually there? Some Internet Security software may be
(re)writing JavaScript to incoming pages that is interfering with what
you are trying to do.
Also, I believe this is invalid HTML:
<a href="thanks.asp" onclick="hemail()"><script type="text/javascript">
<!--
hemailadd()
//-->
</script><noscript>Sterling Silver Jewellery</noscript></a>
The <script> tag can appear inside <a>, but <noscript> can not. Besides,
even if it works as written, it makes no sense. If <noscript> is rendered
because scripting is unavailable, then the onclick event won't fire on
the <a> either. All that will happen if someone clicks the link is they
will get to "thanks.asp" without ever having their default E-mail client
open. Even if scripting is available, there is no guarantee someone has a
default E-mail client, or if they do have one, that it is correctly
configured to send E-mail. "mailto:" is a bad choice for a professional
Web site, you are much better off with a feedback form and handle sending
the E-mail server side (this will also solve your problem of "hiding" the
E-mail address). If you insist on using mailto:, the following makes more
sense:
<noscript>
To be notified of the launch of our new web site please keep coming back
here, because I am using mailto: and I'm trying to hide the E-mail
address so I can't give people without client-side scripting ability an
E-mail link. If I had used a form and sent the Web E-mail server-side,
I'd care about you, but as it is, we don't need your business.
</noscript>
<script type="text/javascript">
document.write(
'To be notified of the launch' +
' of our new web site please' +
' send an email to' +
'<strong><a href="mail' +
'to:' +
'info@' +
'silver-jewellery' +
'-2u.co.uk'
'"'>info@' +
'silver-jewellery' +
'-2u.co.uk' +
'</a></strong>'
);
</script>
mark | r wrote:
document.writes the date onto the page.
a leaner example is when you try to hide email addresses see
www.silver-jewellery-2u.co.uk (holding site)
it complains because it calls a function.
mark
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:41***********************@newsread4.arcor-online.net...
mark | r wrote:
how do i automatically trigger functions like displaydate() in SP2
without getting that annoying security error.
What does displaydate do (or try to do)?
--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ -
http://jibbering.com/faq