Forum Moderators: open

Message Too Old, No Replies

prevent refresh when click on tag <a href=""

IE6 sp2

         

g8tuananh

6:55 pm on Jan 5, 2007 (gmt 0)

10+ Year Member



hello everybody, can help me?
how can i prevent refresh when i click on tag <a href="" onclick="func(); return false;"> refresh </a>
although i use function return false;
it works on FF

thank u!

Trace

10:06 pm on Jan 5, 2007 (gmt 0)

10+ Year Member



I just tried it and it works fine. No refresh. Maybe there's a problem in your function?

<script>
function func(){
something = 'asdf';
}
</script>

<a href="" onclick="func(); return false;">asdf</a>

g8tuananh

4:32 pm on Jan 7, 2007 (gmt 0)

10+ Year Member



thanks
i use IE6.0
and with your code
<html>
<script>
function func(){

}
</script>
<body>
<a href="" onclick="func(); return false;">asdf</a>
</body>
</html>

save it with file name abc.htm, and replace on my desktop. when asdf clicked it open Desktop folder.

penders

4:59 pm on Jan 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...save it with file name abc.htm, and replace on my desktop. when asdf clicked it open Desktop folder.

Hhhhmmm?! I tried exactly what you have above, in a file called abc.htm on the desktop. When I click on 'asdf' it does absolutely nothing (as expected) - IE6 SP2 and FF. There seems to be something else going on, on your machine? Can you paste another example, or explain further?