Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Forms: passing checkbox string to a script without using input type=

by earthboundmisfit (Chaplain)
on Aug 31, 2001 at 00:27 UTC ( [id://109197]=note: print w/replies, xml ) Need Help??


in reply to Forms: passing checkbox string to a script without using input type=

I'm not really sure exactly what you're after, but it sounds like what you want is a JS solution and not a Perl one.

I would explore a var delcared at the parent frame that is incrementally updated:

<INPUYT TYPE="checkbox"...onClick="(parent.accept_val(this.value))">
within the parent frame
var thePairs; var index_count = 0; function accept_val(newVal){ thePairs += '&index' + index_count + "=" + newVal; index_count++; } function done() { parent.theForm.action += thePairs; }
Call done() as needed, and, er, you're done.

Actually, now that I think about it, you could use Perl to accomplish essentially the same thing. tie a scalar -- lets keep it consistent and call it $thePairs -- and, with each new view button click, preserve the state of the program by updating the underlying STORE file.

YYMV.

update: per Tachyon's point, you'll need to declare a unique session ID and pass that to the TIESCALAR sub. SuperSearch will yield some good info on that topic.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://109197]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-29 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found