On 12/25/05, Bruce McKenzie <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I'm using the SortableList example from the HTML::Prototype::Plugin as a
> base to try some experiments of my own.
>
> In the HTML::Prototype library, there are a functions called
> "link_to_remote" and "submit_to_remote" The examples in the dox don't
> make it clear (to me, anyway) how to specify variables such as runmode
> when "submitting".
Can you show us the resulting HTML from the examples you give below?
I have found that in some instances it is easier to just learn the
prototype.js library and write the JavaScript directly, instead of
using the HTML::Prototype helper methods.
Also, to make handling runmodes much much easier, I use
CGI::Application::Dispatch and embed the runmode in the PATH_INFO.
This means you don't have to worry about the 'rm' parameter in your
forms at all (this makes using the prototype library much easier, and
avoids common mistakes with HTML::FillInForm as well).
Cheers,
Cees
>
> Here's what I've got in the template:
>
> <form>
> <input type="hidden" id="rm" name="rm" value="answer" />
>
> [% #this works
> c.prototype.sortable_element( 'sortablelist_1' {
> containment='["sortablelist_1","sortablelist_2"]' } ) # this works %]
> [% #this works
> c.prototype.sortable_element( 'sortablelist_2' {
> containment='["sortablelist_1","sortablelist_2"]' } ) %]
> [% #this works
> c.prototype.draggable_element( 'test', { revert => 'true' } ); %]
>
>
> [% # this doesn't work -- runs result of default run mode
> c.prototype.link_to_remote( 'test', {
> update => 'test',
> url => 'draggablebox.pl',
>
>
> } )
>
> %]
>
> [% # this doesn't work -- returns result of default run mode
> c.prototype.submit_to_remote( "rm", "answer", {
> update => 'test',
> url => 'draggablebox.pl?rm=answer',
> })
> %]
>
>
> </form>
>
>
> Puzzled,
>
> Bruce
>
> ---------------------------------------------------------------------
> Web Archive: http://www.mail-archive.com/[email protected]/
> http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]