Re: Javascript : from xsl to xml

Subject: Re: Javascript : from xsl to xml
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Thu, 3 Aug 2000 12:27:42 -0700
Are you trying to set an image as a button?  What have looks like you want a
standard form button with an image right next to it... is that what you

You probably want an image to act as a button, right? There are a couple of
ways to handle it:
You can either create an image input button (look for "input" - "type" in
the html dom) or you can wrap an image with something like:
<a href="javascript:doWhatYouNeedToDo(params);doAnotherThing();"><img

----- Original Message -----
From: "Michel Guay" <guay.michel@xxxxxxx>
To: <xsl-list-digest@xxxxxxxxxxxxxxxx>
Sent: Thursday, August 03, 2000 10:42 AM
Subject: Javascript : from xsl to xml

Hi !

I am working on my first XML/XSL project : an encyclopedia for my students.

I have finally learned to use Javascript in my xsl page, linking the script
to a button which is placed in my xsl page (within the Body tags).

Now, I need something more. I am asking here, after going through alot of
previous messages of this list (which were indeed very  helpfull up to now).

1. Given this XML element :
                 <IMAGE href="../gifjpg/a/abydos01.jpg"></IMAGE>

2. I have this Javascritp in my xsl :

<script language="JavaScript">
<![CDATA[function image(){'  NOT YET DEFINED ');

3. THEN, given This part in the BODY of my xsl :

<xsl:apply-templates select="ROOT/SEE_PICTURE"/>

4. And finally this in the transformation section on my xsl :

<xsl:template match="SEE_PICTURE">
         <TR><xsl:apply-templates /></TR>

<xsl:template match="IMAGE">
         <xsl:attribute name="href">
                 <xsl:value-of select="@href"/>
    onClick="image()"><img src="../../../a_icones/oeil2.jpg" width="50"

When I pass the cursor over the button, in IE5, I can see that it's calling
the proper image from the xml element. When I click, a window opens, but
naturally without the image.

I would like to know how to make the method "WINDOW.OPEN" work with a
variable that would get the information which is stored in the IMAGE
element of my xml, so putting the image in the opening window. I will have
340 different xml pages, one for each expression of the encyclopedia.

I do hope that I was clear enough.  BTW, my approach might as well be
totally... incorrect....

Thanks for your attention and help.

Michel Guay
Un site dédié à l'exploration et à l'étude de l'Égypte pharaonique.
Nouvelles, Bibliographie, Centre de doc., Babillard, Bibliographie

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread