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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML/XSL/JavaScript

Status
Not open for further replies.

kiranmpat

Programmer
Jan 30, 2007
3
US
Hey Guy:
I have data in an XML file and am using XSL as a stylesheet to display the data. But now I need JavaScript to envoke the onMouseOver function. So all I want to do this hover/roll over a text box and basically have a picture pop up. Does this seem like a dumb question? If so I apologize.

 

What's the question?

Do you want to know how to do a mouseover within xslt? or the actual code for the popup?

something like this should do you:

Code:
<script language="javascript">
  function popupImage(ImageName) {
    document.getElementById('popup_image').src = ImageName;
  }
</script>

.
.
.
<a:xsl:use-attribute-sets="popup">popup link</a>
<div id="">
  <img id="popup_image"/>
</div>
.
.
</xsl:template>

<xsl:attribute-set name="">
  <xsl:attribute name="onmouseover" value="javascript:popupImage('NameOfImageToPopup')"/>
</xsl:attribute-set>

hope this helps!

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top