Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > input type="text" => action"....

Reply
Thread Tools

input type="text" => action"....

 
 
Georg Ringer
Guest
Posts: n/a
 
      06-20-2005
Hello,

how can I get the value of <input type="text" name="textfield"> of my form
into the action="xxxx"?

Many thanks in advance
Georg


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      06-20-2005
Georg Ringer wrote:

> how can I get the value of <input type="text" name="textfield"> of my form
> into the action="xxxx"?


You don't. You submit the form and let the browser attach it to the query
string (or POST data). You then have your form handler respond
appropriately.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
Georg Ringer
Guest
Posts: n/a
 
      06-20-2005
> You don't. You submit the form and let the browser attach it to the query
> string (or POST data). You then have your form handler respond
> appropriately.


Hello David,

thanks for your fast answer! Can you give me a example how I can do this?

thanks!
georg


 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      06-20-2005
Georg Ringer wrote:

>> You don't. You submit the form and let the browser attach it to the query
>> string (or POST data). You then have your form handler respond
>> appropriately.


> thanks for your fast answer! Can you give me a example how I can do this?


From memory, untested:

package My:ackage;
use strict;
use warnings;
use Apache::Constants;

my %dispatch_table = (
foo => \&foo,
bar => \&bar
);

sub handler {
my $r = shift;
my $action = $r->param('action');
if (defined $dispatch_table{$action}) {
$dispatch_table{$action}();
} else {
error();
}
}

sub foo {
# Do stuff
return OK;
}

sub bar {
# Do other stuff
return OK;
}

sub error {
return HTTP_NOT_FOUND;
}

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Width of text input box vs. password input box cjl HTML 1 10-31-2005 11:46 AM
Which is faster in ASIC: 2-input AND gate or a 2-input multiplexer Weng Tianxiang VHDL 12 08-11-2005 10:50 AM
hide the input box or change the color of input box in html ashutosh Java 3 06-16-2005 02:21 PM
Input Drops With An Empty Input Queue Spiz Cisco 12 05-18-2005 05:28 PM
why does form with only 1 text input and 1 button input submit on enter? Guy HTML 5 12-13-2003 06:44 AM



Advertisments