[Opensource] Submitting forms with text links instead of butt
ons?
DComeau at xenos.com
DComeau at xenos.com
Fri Apr 25 09:25:06 PDT 2003
Ok, I was thinking that maybe I could somehow use the onClick property of
the href link and call a Javascript method that did a form.submit, but it
gets tricky because of the way Expresso parses the parameters associated
with a paticular transition's button.
But I wanted to see if anyone had ever tried this. Just want to see if I am
asking for trouble if I go ahead and attempt this. I think it could be
done, I just don't have lots of time to spend on it.
I noticed that the login Jsp has a snippet of javascript that messes around
with form submission, so that's kinda what got me thinking about this.
Dave.
-----Original Message-----
From: Thompson, Kris [mailto:kris.thompson at seurat.com]
Sent: Friday, April 25, 2003 9:56 AM
To: opensource at jcorporate.com
Subject: RE: [Opensource] Submitting forms with text links instead of
buttons?
As mentioned earlier exLink works too but I don't think it can pass
parameters, that is why this tag exist.
And to your question. This will not submit the form. I don't now how to
make an href submit a form, regardless of expresso. It is my understanding
that if you want to submit the contents of a form you need to use the
<input> tag and it does not have a href type so I don't think you can even
do what you are asking.
You can use the TransistionTag for HTML buttons instead of images and you
can use the TransitionParamsTag for html buttons that need parameters to
move along with it.
Kris Thompson
-----Original Message-----
From: DComeau at xenos.com [mailto:DComeau at xenos.com]
Sent: Thursday, April 24, 2003 10:13 PM
To: opensource at jcorporate.com
Subject: RE: [Opensource] Submitting forms with text links instead of
buttons?
Cool thanks Kris, does this somehow submit the form? So all of my Html
fields will get sent too?
Dave
-----Original Message-----
From: Thompson, Kris [mailto:kris.thompson at seurat.com]
Sent: Thursday, April 24, 2003 2:26 PM
To: opensource at jcorporate.com
Subject: RE: [Opensource] Submitting forms with text links instead of
buttons?
Yup they exist. Try ExpressoLinkParamsTag
<expresso:ExpressoLinkParamsTag href="/Login.do" name="Login" >
Login</expresso:ExpressoLinkParamsTag>
Java code...
Transition login= new Transition();
login.setName("Login");
login.addParam("controller",
"com.cohomefinder.controller.LoginController");
login.addParam("state", "promptLogin");
login.addParam("username", "Major Taylor"
response.add(login);
This code is in CVS HEAD.
Kris
-----Original Message-----
From: DComeau at xenos.com [mailto:DComeau at xenos.com]
Sent: Thursday, April 24, 2003 9:08 AM
To: opensource at jcorporate.com
Subject: [Opensource] Submitting forms with text links instead of buttons?
Hi all,
I'm tweaking the look and feel of my first Expresso app, and I've got
several areas that are inconsitent when it comes to how I show transitions.
Some times it's useful to just show text links ( <a href>'s ) and other
times I've had to show a button so I can submit form data.
But what would be nice would be to replace some of the buttons with text
links. This would help me standarize the look and feel a bit more and it
would save me time by not having to create image buttons for those
transitions to make them fit in better.
So what I'm wondering is, has anyone on the list created a custom tag or
other process of doing this? I'm thinking with a bit of Javascript and a
few cups of liquid Espresso, I should be able to creatively accomplish this.
;)
Any tips?
Cheers,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20030425/9bba5d55/attachment-0002.htm
More information about the Opensource
mailing list