Hi everyone,
I have webpage (apartmentdetail.aspx) with a site.master (asp.net). After the page (with a formview for databinding) loads I want some js to be executed. It will set an html-image source (src) to that of the first loaded image. Here is the code for the controls.
The jscript could look something like this:
Question is, where and/or how to put it in my page...
Pampers
Keeping it simple can be complicated
I have webpage (apartmentdetail.aspx) with a site.master (asp.net). After the page (with a formview for databinding) loads I want some js to be executed. It will set an html-image source (src) to that of the first loaded image. Here is the code for the controls.
Code:
<img id="imgBigImage" height="403px" width="530px" src=""/>
Code:
<asp:ImageButton ID="ImageBtn1" runat="server" Height="60px" ImageUrl='<%#Eval("ApartmentPhotoPath")%>'
Width="90px" CommandName="ImageBtn1" onmouseover="showPhoto(this);"
The jscript could look something like this:
Code:
<script language="javascript" type="text/javascript">
<!--
function showFirstPhoto()
{
var imgOrg = document.getElementById('<%=FormView3.FindControl("ImageBtn1").ClientID%>')
var strPath = imgOrg.src
var imgTest2 = document.getElementById("imgBigImage")
imgTest2.src = strPath
}
-->
</script>
Question is, where and/or how to put it in my page...
Pampers
Keeping it simple can be complicated