Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript with asp variables

Status
Not open for further replies.

anneoctaaf

Programmer
Dec 15, 2003
104
0
0
NL
I've build this little javascript: when you move on the text a box with another text is displayed. Now in stead of De getaxeerde waarde hangt af \n van het doel van de taxatie; \n een woning heeft namelijk ver- \n schillende waarden. \n\n
i would like to show some pictures, something like this:
<BR>
<img src="<% = strImagePath %>1.gif" alt="<% = strTxt1 %>"> <% = strTxt1string %><br>
<img src="<% = strImagePath %>2.gif" alt="<% = strTxt2 %>"> <% = strTxt2string %><br>
<img src="<% = strImagePath %>3.gif" alt="<% = strTxt3 %>"> <% = strTxt3string %><br>
<img src="<% = strImagePath %>4.gif" alt="<% = strTxt4 %>"> <% = strTxt4string %><br>
<img src="<% = strImagePath %>5.gif" alt="<% = strTxt5 %>"> <% = strTxt5string %><br>
<img src="<% = strImagePath %>6.gif" alt="<% = strTxt6 %>"> <% = strTxt6string %><br>

*********************************************************

THIS IS MY SCRIPT:
<font size="2" style="cursor:hand" onMouseOut="dis()" onMouseOver="chen()">
Welke waarde wordt getaxeerd?
</font>
<div name="add" id="add" style="position:absolute;top:100;left:360;background-color:
CCCCCC;color:black;height:0;width:0;text-align: left; filter:alpha(opacity=50);-moz-opacity:0.5; opacity: 0.5;"></div>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var divAdd = document.getElementById("add");
function chen()
{
divAdd.innerHTML="De getaxeerde waarde hangt af \n van het doel van de taxatie; \n een woning heeft namelijk ver- \n schillende waarden. \n\n"
divAdd.style.height=100
divAdd.style.width=200
divAdd.style.border="1 solid blue"
}

function dis()
{
divAdd.innerHTML=""
divAdd.style.height=0
divAdd.style.width=0
divAdd.style.border=""
}
// End -->
</script>

 
Add the following lines to your page:
Code:
<%strImagePath = "Image.jpg"
strAltText = "Your Text here"%>

and replace:
Code:
divAdd.innerHTML="De getaxeerde waarde hangt af \n van het doel van de taxatie; \n een woning heeft namelijk ver- \n schillende waarden. \n\n"
with:
Code:
divAdd.innerHTML="<img src='<%=strImagePath%>' alt='<%=strAltText%>'>"

mwa
<><
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top