[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT, frames and javascript

Subject: Re: XSLT, frames and javascript
From: "James Fuller" <james.fuller@xxxxxxxxxx>
Date: Mon, 22 Jul 2002 10:05:18 +0100
xslt frames
----- Original Message -----
From: "Stevenson Ngila" <Stevenson@xxxxxxxxxxxxxxxxxxxxxx>
> In an xml/xslt website built in a frame setting, how can the select
> list(form control)which is on the top window be dynamically populated
using
> javascript from the parent window?

here is the javascript

<script language="javascript">
function selectopt() {
var Opt,OptIndex;
OptIndex=document.test.change.selectedIndex;
Opt=document.test.change.options[OptIndex].value;
parent.topwindow.document.location.href=Opt;
}
</script>

<form name="test">
<select name="change" >
<option value="xmltest1.xml">xmltest1</option>
<option value="xmltest2.xml">xmltest2</option>
<option value="xmltest3.xml">xmltest3</option>
<option value="xmltest4.xml">xmltest4</option>
</select>
<a href="#" onClick="selectopt();return false;">go</a>
</form>


i think this is what you mean in regular html....not sure about your
question ?

if u want the select to by generated by xml/xslt

xsl
--------------------------------------------
<select name="change">
<xsl:apply-templates select="selectoption"/>
</select>

<xsl:template match="selectoption">
<option value="{@value}"><xsl:value-of select="@display"/></option>
</xsl:template>

xml
---------------------------------------------

<selectoption value="test" display="test"/>
<selectoption value="test" display="test"/>
<selectoption value="test" display="test"/>
<selectoption value="test" display="test"/>
<selectoption value="test" display="test"/>
<selectoption value="test" display="test"/>
>
> Please and apologies, I know this might be off the aim of this discussion,
> but anybody with ideas can just offer some help.
>
> Thanks,
> Stevenson Ngila
> Footman-Walker Associates Ltd
> http://www.footman-walker.co.uk
>
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.