...

View Full Version : onclick event in ie



papas
08-24-2007, 10:29 AM
<a onclick="return send_message_confirm('<?php echo $_SESSION['_aa__']; ?>','<?php echo $row_user_query['this_id_'] ?>')" href="javascript:send_message('<?php echo $row_user_query['_aa_']; ?>')" class="crumbslinks">

i have this statement in my html code

in firefox this works perfectly but in ie the onlick event never happens

any ideas?

thx

felgall
08-24-2007, 11:12 AM
an <a> tag needs an href to specify the address of the page that you are linking to for when JavaScript is disabled. If you don''t want a regular link then you probably ought to be using a <span> tag instead.

Bill Posters
08-24-2007, 11:31 AM
an <a> tag needs an href to specify the address of the page that you are linking to for when JavaScript is disabled. If you don''t want a regular link then you probably ought to be using a <span> tag instead.

It's probably worth sticking with using an anchor, but adding the anchor to the page using js, thereby avoiding the issue for non-js users. Without the ability to tab to and focus the span element, its 'onclick' event is beyond the reach of js-enabled keyboard users, etc…



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum