C
CIndy Lee
I want to change the on click value of an image. Basically the aspx
sets the value of the onclick, after the spot where I want my image.
I need to either set the onlick after (Which didn't work), or declare
the image later and have the HTML put the image somewhere. Maybe I
can do that with divs? (I'm just editing code. I don't want to
change to much. I know i could redo it all with .NET controlls)
<script>
function func(e){
.......
}
</script>
Line1<br>
<img id="toggleAll" name="toggleAll" src="images/expand_icon.gif"/>
<br>
<table></table>
<%
Dim aspx_e As String = ""
aspx_e=..... 'set this variable to something. I can't do this coding
up top
%>
'Now I will set the onclick, but it won't work
<script type="text/javascript" language="javascript">
$('toggleAll').onclick="func('<% Response.Write(aspx_e)%>')";
</script>
'This one works:
<img src="images/expand_icon.gif" onclick="'func('<
%Response.Write(aspx_e)%>')" />
sets the value of the onclick, after the spot where I want my image.
I need to either set the onlick after (Which didn't work), or declare
the image later and have the HTML put the image somewhere. Maybe I
can do that with divs? (I'm just editing code. I don't want to
change to much. I know i could redo it all with .NET controlls)
<script>
function func(e){
.......
}
</script>
Line1<br>
<img id="toggleAll" name="toggleAll" src="images/expand_icon.gif"/>
<br>
<table></table>
<%
Dim aspx_e As String = ""
aspx_e=..... 'set this variable to something. I can't do this coding
up top
%>
'Now I will set the onclick, but it won't work
<script type="text/javascript" language="javascript">
$('toggleAll').onclick="func('<% Response.Write(aspx_e)%>')";
</script>
'This one works:
<img src="images/expand_icon.gif" onclick="'func('<
%Response.Write(aspx_e)%>')" />