XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> + Exposing xquery as webservice ... (6)
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Lorrie NerbasSubject: Help with creating onclick event script in xsl
Author: Lorrie Nerbas
Date: 02 May 2006 03:37 PM
Hello, I am very new to xml and xsl.

I need help understanding how to write event script for my navigation menu. I created the xml and xls files in Style Studio and moved them to ASP.Net and used the <asp:xml control to display the menu, which works fine.

Now I need to write vbscript or javascript onclick_() event code for the buttons to direct the user to a division home page which matches the button name.

The aspx page and xsl pages are attached. Thank you very much in advance for your help with this.




Ivan PedruzziSubject: Help with creating onclick event script in xsl
Author: Ivan Pedruzzi
Date: 02 May 2006 04:07 PM

This doesn't sound like a Stylus Studio question.

I suggest you to search on www.google.com you will find plenty of pages describing how to use javascript in HTML.

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Lorrie NerbasSubject: Help with creating onclick event script in xsl
Author: Lorrie Nerbas
Date: 03 May 2006 06:21 PM
You are misunderstanding my question. The code is below. When this is run, 12 buttons are generated from the for-each loop. Each button's value is the division name. I need to run an mybutton_onclick_() event, and get the division name. The user will then be redirected to their division's home page when the event is fired. Can this be accomlished using the value from <xsl:for-each select="cwhome/menu/division">?

<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:output method="html"/>
<xsl:template match="/">
<form name="form1" runat="Server">

<font style="font-size: 16pt; color: #3642a9; font-family: arial">
<xsl:value-of select="cwhome/title"/>
<table id="Table1" name="Table1" cellSpacing="0" cellPadding="0" width="88" style="table-layout: auto; ; width: 88px; font-family: arial; white-space: nowrap; position: absolute; text-align: center" onclick_="doclick()">
<xsl:for-each select="cwhome/menu/division">
<td vAlign="middle" width="50%" id="">
<button id="mybutton" style="border-right: medium none; border-top: medium none; font-size: 10pt; filter: progid:dximagetransform.microsoft.gradient(gradienttype=0,startcolorstr=#bbbbe7,endcolorstr=#ddddff); vertical-align: top; border-left: medium none; width: 110px; color: midnightblue; border-bottom: medium none; font-family: arial; white-space: pre; height: 27px; text-align: center">
<xsl:value-of select="."/>


<script language="vbscript" implements-prefix="user">
sub doclick()
end sub

<xsl:call-template name="NewTemplate0"/>
<xsl:template name="NewTemplate0"/>



Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.