Disable the anchor tag.

Posted by abinila on Stack Overflow See other posts from Stack Overflow or by abinila
Published on 2010-03-27T07:21:21Z Indexed on 2010/03/27 7:23 UTC
Read the original article Hit count: 291

Filed under:

I have one anchor tag. I want to disable it after once it clicked. I tried the following way.

  print "<script type='text/javascript'>parent.window.frames[2].document.getElementById('pagination').innerHTML+=\"<a href=# onclick='pageshow`($i);this.disabled=true'>$i</a>&nbsp;\"</script>";

Note: I don't want to disable the link. I want to disable the link operation. Like Google search page.

Eg: 1 2 3 4 5 Next

Here once I clicked the 1st page I can't click the same page again. Same thing I want.

© Stack Overflow or respective owner

Related posts about JavaScript