reading attributes from javascript, how?

J

Jeff

hi

asp.net 3.5

I have a few ImageButtons on my webpage. On those buttons I want to
implement image swapping...I've done image swapping before but this is more
difficult for me to solve... - the image can change cause of .net code
also...

when a imagebutton is clicked then it's image is changed. In addition when
hovering mouse over a button then image is changed also.
on mouseout it swaps back to the previous image, but here is the problem it
should not swap back to the previous image if imagebutton is clicked.... So
I'm looking for a way to add a attribute on a imagebutton (when imagebutton
is clicked - .net code) which I later can test on inside the javascript

any suggestions?
 
G

Guest

hi

asp.net 3.5

I have a few ImageButtons on my webpage. On those buttons I want to
implement image swapping...I've done image swapping before but this is more
difficult for me to solve... - the image can change cause of .net code
also...

when a imagebutton is clicked then it's image is changed. In addition when
hovering mouse over a button then image is changed also.
on mouseout it swaps back to the previous image, but here is the problem it
should not swap back to the previous image if imagebutton is clicked.... So
I'm looking for a way to add a attribute on a imagebutton (when imagebutton
is clicked - .net code) which I later can test on inside the javascript

any suggestions?

you can always "inject" js by .net code using

<script>
var x = <%=Value%>
....

where Value is protected or public variable from the code behind
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top