ImageButtons
-
I want to change the image of an image button on its mouse over event so i have done ImageButton1.Attributes.Add("onmouseover", "javascript:changeImage();") function changeImage() { document.Form1.ImageButton1.ImageUrl='images/update.gif'; } but its givin me a script error. how to do it? Thanx, chitranjan more dash than cash!!!
-
I want to change the image of an image button on its mouse over event so i have done ImageButton1.Attributes.Add("onmouseover", "javascript:changeImage();") function changeImage() { document.Form1.ImageButton1.ImageUrl='images/update.gif'; } but its givin me a script error. how to do it? Thanx, chitranjan more dash than cash!!!
u forgot to type : between javascript and changeImage();
ImageButton1.Attributes.Add("onmouseover", "javascript :changeImage();")
function changeImage(){ document.getElementById('ImageButton1').src='Images/SmallCalendar.gif'; } Regards Hemant -- modified at 6:48 Friday 23rd December, 2005 -
u forgot to type : between javascript and changeImage();
ImageButton1.Attributes.Add("onmouseover", "javascript :changeImage();")
function changeImage(){ document.getElementById('ImageButton1').src='Images/SmallCalendar.gif'; } Regards Hemant -- modified at 6:48 Friday 23rd December, 2005actually i must have copied it wrongly.the colon is there.the script is working.i tried it out with an alert.just the problem now is how to change the image url from the script. more dash than cash!!!
-
actually i must have copied it wrongly.the colon is there.the script is working.i tried it out with an alert.just the problem now is how to change the image url from the script. more dash than cash!!!
use this code in your js function use .src insread of .imageurl in my previous reply also i write this function
function changeImage(){ document.getElementById('ImageButton1').src='Images/SmallCalendar.gif'; }