On Aug 12, 2009, at 9:54 AM, Matthew Kidd wrote:


so far client-side seems to be the only way to do what I want. I want the action the user ultimately performs to default to disabled but I still want to be able to turn it back on once the user has met a set of criteria actions.

I just tried using a binding but it didn't work. It may have to do with the WOHyperlink being a subcomponent of the actual component I'm using but even putting something like "^disabled" into the disabled binding didn't seem to work.

So as it stands now it does appear that it has to be done client side.

The reason the WOHyperlink is subcomponent is because it also does a form submit as well.

Does this have to be hyperlink? You could use a form button and add onSubmit="return ckeckSomething()" to the form tag. Use javascript to allow the form to be submitted based on your criteria. If there are fields you can use onBlur="checkField();" to change the style or [not] display the button when a set of your criteri becomes true. You still need to do the onSubmit in the form, though (to catch the submit via return).

I've used the disabled bindings and it always worked well. I usually use it to disallow a certain thing based on permissions. It only appears to manipulate the HTML so I'm surprised it does not work for you. This work only if you, ie your app, knows what to do before the web page rendered.





Chuck Hill <[email protected]>
08/11/09 01:28 PM

To
Matthew Kidd <[email protected]>
cc
[email protected]
Subject
Re: Trouble disabling/nulling href of a WOHyperlink using JavaScript






On Aug 11, 2009, at 11:20 AM, Matthew Kidd wrote:

>
> I'm attempting to copy and store the href attached to a WOHyperlink
> so that I can deactivate a "button" on a form. Numerous attempts
> have resulted in the closest attempt being a link that appears to
> refer to the previous page.
>
> Is there a way to disable a WOHyperlink via JavaScript or java that
> effectively deactivates the WOHyperlink?
>
> Matt

The disabled = true; binding does not do what you want?  You want
client side de-activation?


Chuck

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects








------------------------------------------------------------------------
Disclaimer
The information in this email and any attachments may contain proprietary and confidential information that is intended for the addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, retention or use of the contents of this information is prohibited. When addressed to our clients or vendors, any information contained in this e-mail or any attachments is subject to the terms and conditions in any governing contract. If you have received this e- mail in error, please immediately contact the sender and delete the e-mail.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/kberkling%40dyned.com

This email sent to [email protected]


Thanks

kib

"The trouble with normal is it always gets worse."
Bruce Cockburn

Klaus Berkling
Web Application Dev. & Systems Administrator
DynEd International, Inc.
www.dyned.com | www.eskimo.com/~kiberkli




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to