Re: Including the .js files
Re: Including the .js files
- Subject: Re: Including the .js files
- From: "Werner Liedl" <email@hidden>
- Date: Fri, 16 Jul 2004 10:50:39 +0200
Hi Kranthi Sagar,
you're binding the javascript "onclick" to the "li" element; that will not
deter the hyperlink from firing, no matter what the result is. Bind the
event handler to the hyperlink. Are there really cross browser issues
concerning onclick in hyperlinks?
If you want to submit the checked values you will have to use a form (of
course) and a submit button (or active image) anyhow or bind the action to
the WOForm and submit via javascript. Then you can leave the onclick where
it is and you can omit the WOHyperlink.
The real issue might be what if javascript is disabled! Will it be
acceptable that the page/your app won't work? - at least your app shouldn't
crash.
Regards,
Werner
----- Original Message -----
From: "Kranthi Sagar Borra" <email@hidden>
To: <email@hidden>
Sent: Wednesday, July 14, 2004 9:48 PM
Subject: Including the .js files
> Hi all,
>
> My question is regarding the js files that I need to include in my
component. I ahve done something like this.
>
> <script src="<WEBOBJECT NAME=ResourceURL1></WEBOBJECT>"></script>
>
> and defined
>
> ResourceURL1: WOResourceURL {
> filename = "validate.js";
> framework = "app";
> }
>
> But now I have a hyperlink to the next page. On clicking this my page
needs to be validate. So for cross browszer compatibility I did something
like this
>
> <li id="btnnext1" class="linkstyle_next1"
onmouseover="this.className='hoverstyle_next1';"
onmouseout="this.className='linkstyle_next1';" onclick="checkWholeForm();">
> <WEBOBJECT NAME="Hyperlink12">Next Step</WEBOBJECT>
>
> So on click of this "Next Step", javascript function,checkWholeForm that
is defined in the .js file is executed which will check if the mandatory
fileds are required.
>
> 1. But after validating the action method that is associated to the
Hyperlink12 is getting executed, which I do not want to do.
> 2. Also to handle cross broser compatibility, I am providing all the steps
in <li>, but is there any other way by which I can handle this. thank you.
>
> Regards,
> Kranthi Sagar.
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 05.07.04
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.