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

RE:

Subject: RE:
From: Jerry Ventura <jventura@xxxxxxxxxx>
Date: Thu, 20 Jan 2000 18:13:17 -0500
jerry ventura
In your example, it may be the case of the validate() function
function validate()... with lower case v, whereas onsubmit="return
Validate()" with upper case V.

I'm pretty sure case matters...



-----Original Message-----
From: Seema Ramanathan [mailto:sramanathan@xxxxxxxxxxxx]
Sent: Thursday, January 20, 2000 2:38 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: 


Problems with JavaScript. I am using Saxon 4.5 and my processor is not
creating any unnecessary white spaceor splitting my script into two lines,
like Craig mentioned!

I tried 3 different ways:

1. Used onsubmit="return Validate()" in my form and had the following
function in my XSL
<SCRIPT LANGUAGE="JAVASCRIPT"> <![CDATA[
function validate(){
alert("Your submission will now be sent")}
]]></SCRIPT>

This did not work!

2. Used onsubmit="return Validate()" in my form and had the following in my
XSL:
<script language="JavaScript" type="text/javascript"
src="validate.js"></script>

This again did not work, how does the "return Validate()" call know that the
function is in the external "validate.js" file? This did not work either! Am
I missing something here?

3. Just for testing purpose I used :
onsubmit="alert('Your submission will now be sent')
and this one worked!


----- Original Message -----
From: Wohlfeil, Craig <cwohlfeil@xxxxxxxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Friday, January 14, 2000 7:25 AM
Subject: RE:


> That has worked successfully for me. I guess I would start by looking at
the
> HTML that is produced.  Make sure that there are no problems with
whitespace
> (like your javascript line being split into two lines in the middle or
> something like that). I've had to configure my processor to strip all
> unneccessary whitespace to get JavaScript (and some HTML) to work well.
>
> -----Original Message-----
> From: Seema Ramanathan [mailto:sramanathan@xxxxxxxxxxxx]
> Sent: Thursday, January 13, 2000 4:45 PM
> To: xsl-list@xxxxxxxxxxxxxxxx
> Subject: Re:
>
>
> Craig
>
> I have been working around the same problem today.
> My xsl has a form and it calls onsubmit="return validate()"
> This function validate() I saved into a external file with extension js.
>
> Like you mentioned i tried referencing it via:
> <script language="JavaScript" type="text/javascript"
> src="myscript.js"></script>
>
> but it does not seem to work. Any suggestions?
>
> Seema
>
> ----- Original Message -----
> From: Wohlfeil, Craig <cwohlfeil@xxxxxxxxxxxxxxxxxxxx>
> To: <xsl-list@xxxxxxxxxxxxxxxx>
> Sent: Thursday, January 13, 2000 11:52 AM
> Subject: RE:
>
>
> > One way to get around problems with JavaScript is to put your script in
an
> > external .js and reference it with the script tag like such:
> > <script language="JavaScript" type="text/javascript"
> > src="myscript.js"></script>
> >
> > Craig
> >
> > -----Original Message-----
> > From: con_Shravan K. Mishra [mailto:con_smishra@xxxxxxxxxxx]
> > Sent: Thursday, January 13, 2000 12:19 PM
> > To: xsl-list@xxxxxxxxxxxxxxxx
> > Subject:
> >
> >
> >
> > i'm trying to use some very simple javascript validation in my
stylesheet
> > but it doesn't seem to work.
> > can anyone please help me on this.
> >
> >
> > <?xml version="1.0"?>
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
> >
> > <xsl:template match="/">
> >      <html>
> >    <title>login</title>
> >
> > <SCRIPT LANGUAGE="JAVASCRIPT">
> >
>
TA[ 
> > 
> > function setFocus(object) {
> >   object.select();
> >   object.focus() 
> > }
> > 
> > function validateData() {
> > 
> >   if(LoginForm.userID.value.length == 0) { 
> > alert("Enter User Name "); 
> > setFocus(LoginForm.login_id); 
> >   }else
> >   if(LoginForm.password.value.length == 0) { 
> > alert("Please Enter Password "); 
> > setFocus(LoginForm.password); 
> >   }else {
> > LoginForm.submit();
> >   }
> > }
> > 
> >          ]]></SCRIPT>
> > 
> > 
> > 
> > 
> >         <body>
> > <xsl:apply-templates/>.........................................
> > .....................................
> > .............................
> > 
> > 
> > 
> > 
> > 
> > 
> > thanks
> > 
> > sh
> ravan
> >
> >
> >
> >
> >
> >
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> >
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> 
> 
>  XSL-List info and 
archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 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
  • RE:
    • Jerry Ventura - Thu, 20 Jan 2000 18:13:17 -0500 <=

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.