View Single Post
  #2 (permalink)  
Old Mar 11th, 2008, 20:01
magicben magicben is offline
Junior Member
Join Date: Feb 2008
Location: Paris
Age: 31
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how can i use my javascript code with my asp.net page

try onclick and not onClick...
then, there's an error in your javascript: setTimeout takes a function on the first argument, not a string... so just define a method
function _2seconds() {
document.getElementById('displayDiv ').innerHTML+='2 seconds!<br>';
}

and now, use the following line:
var t1=setTimeout(_2seconds, 2000);

I think that's much better.
Reply With Quote