setting src value for image control ( Urgent )
look at the following...
strtmp = "document.form1.srcimg"+num+".nameProp"
if( eval(strtmp) == "check3.gif")
alert( "I came here")
// eval(strtmp) = "check4.gif"
alert("I came here. but, how to set value to the same control...strtmp?")
// eval(strtmp) = "check4.gif" //failed
//I can not do the below because name of the control changes
// document.form1.srcimg.src = "check3.gif"
where srcimg1, srcimg2, srcimg3.... are different image controls. I want
to chage the image by checking.
If the current image is check3.gif, i change it to check4.gif
If the current image is check4.gif, i change it to check3.gif
I have written above function for all the image controls and calling the
above routine at onclick event of the image control.
I could able to check the value using eval() function..
But I am unable to set the new value..
How can I set src to a particular selected control..?
Please let me know
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL