You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Scott F. Walter" <sc...@vivare.com> on 2005/05/24 18:58:37 UTC
Best approach with javascript prompt
Greetings,
I want to have a link on a page that uses the javascript prompt to take
the visitor's input and then send it to the back-end for processing.
Ideally I want to use a directlink component but I'm struggling on how
to integrate it. Is there away to dynamically add a parameter to a
DirectLink?
My other thought is to use a form with a hidden value and to have a
javascript function take the value from the prompt function and to
submit a form?
Any other "simple" ideas? I am looking for the most simplistic as we
all are.
scott.
--
Scott F. Walter Scott F. Walter
Principal Consultant
Vivare, Inc.
E: scott.walter@vivare.com
E: scott@scottwalter.com
Visit scottwalter.com <http://scottwalter.com> --Point. Click. Explore!
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best approach with javascript prompt
Posted by Jamie Orchard-Hays <ja...@dang.com>.
be carefully when using a the Hidden component this way. Make sure you
set encode="false". This is because Hidden squeezes/unsqueezes the value
by default.
In the first case, give your DirectLink an id and then update the url
using javascript. View the source in your browser to see what you get.
Remember that once your page has rendered in the browser, you're dealing
with regular HTML/DOM/Javascript.
You might want to make your own link component (say, wrapping
DirectLink) to componentize your functionality.
Jamie
Scott F. Walter wrote:
> Greetings,
>
> I want to have a link on a page that uses the javascript prompt to take
> the visitor's input and then send it to the back-end for processing.
> Ideally I want to use a directlink component but I'm struggling on how
> to integrate it. Is there away to dynamically add a parameter to a
> DirectLink?
>
> My other thought is to use a form with a hidden value and to have a
> javascript function take the value from the prompt function and to
> submit a form?
>
> Any other "simple" ideas? I am looking for the most simplistic as we
> all are.
>
> scott.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best approach with javascript prompt
Posted by Robert Zeigler <ro...@scazdl.org>.
Hm. How about a button, instead of a link?
If that'll suffice, try the PromptButton component from Tassel
(http://equalitylearning.org/Tassel/app)
Robert
Scott F. Walter wrote:
> Greetings,
>
> I want to have a link on a page that uses the javascript prompt to take
> the visitor's input and then send it to the back-end for processing.
> Ideally I want to use a directlink component but I'm struggling on how
> to integrate it. Is there away to dynamically add a parameter to a
> DirectLink?
>
> My other thought is to use a form with a hidden value and to have a
> javascript function take the value from the prompt function and to
> submit a form?
>
> Any other "simple" ideas? I am looking for the most simplistic as we
> all are.
>
> scott.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org