Re: can a WOHyperlink act as submit button?
Re: can a WOHyperlink act as submit button?
- Subject: Re: can a WOHyperlink act as submit button?
- From: Dov Rosenberg <email@hidden>
- Date: Wed, 31 Aug 2005 07:26:33 -0400
The problem with a hyperlink is that it is not designed to submit forms. You
need to have a piece of java script that submits the form for you. Expedia
uses these all over it. You can get an idea of the type of javascript you
need.
We created a component like this for our app a few years ago, but it is a
big PIA to implement and have work reliably in all browsers. Issues to
consider:
* how are you going to handle repetitions - form buttons work fine, but
repetitions cause extra work since there are unique names involved
* javascript compatibility - our component has broken numerous times due to
browser updates
Basically you need to do the following:
1. Create a performAction() in your wocomponent that all of your hyperlinks
are bound into
2. Create an instance String variable that indicates the type of action
being performed, i.e. DoSaveAction
3. Have your hyperlink call the javascript to do a form.submit() setting the
DoSaveAction as a request parameter. Set the performAction() as the action
for your form.
4. Have your WoComponent use the request parameter inside the
performAction() in a case statement to execute whichever code you want. The
performAction() must return a WOComponent.
The benefit of using this scheme is that it is much easier to localize your
app if all you need to do is change a string. It also allows you to have
more verbose instructions on your action links. We styled our component to
look like the Expedia links with the image (WOActiveImage) directly
executing the desired code. The component works fine now, but it has taken a
lot of effort to get right. Unless the W3C finally lets hyperlinks submit
forms, maybe there is a way to use CSS to do the same thing?
Good luck
On 8/31/05 7:07 AM, "Amedeo Mantica" <email@hidden> wrote:
> Hello, I need to make a submit button with a simply text, no image or
> button.... simply a text as a link.
> How to make it?
>
> Thanks
> Amedeo
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> n.com
>
> This email sent to email@hidden
--
Dov Rosenberg
Conviveon/Inquira
Knowledge Management Experts
http://www.conviveon.com
http://www.inquira.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden