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 (1175)
- Stylus Studio Technical Forum (14546)
-> + Splitting EDIFACT files pipeli... (3)
-> + Problem with SAXO processor - ... (5)
-> + PDF Format Help (4)
-> + License check unreliable (2)
-> - XML related issue (1)
-> + Need help regarding pipeline o... (2)
-> + Error converting XML to EDIFAC... (4)
-> + XSLT Profiling for XSLT 1.0 s... (2)
-> + Grouping (2)
-> - Best Toner for Sensitive Skin (1)
-> + Best Practice for Pipeline err... (2)
-> + pdf generation (4)
-> + Problems excuting a Pipeline w... (2)
-> + XML serializer (3)
-> + Supported EDIFACT versions (5)
-> - Anyone know XActimate ESX file... (1)
-> + Stylus Studio with OpenJDK (2)
-> - Encoding error when importing ... (1)
-> - SEO Service in Delhi, India (1)
-> - HP Printer Support (1)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (247)
+ XSLT Help and Discussion (7615)
+ XQuery Help and Discussion (1946)
+ 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.