RE: How TO CREATE RUNTIME CONTROLS

2004-10-04 Thread Charles K. Clarkson
atul ashpalia <[EMAIL PROTECTED]> wrote:

Please reply to the list.


: Thanks in advance for your help. please find the
: attached "filltasks.cgi".

Why attached it? Show it inline. where it is easier
to view.

You are not using strict and warnings. How did you
learn perl?

use strict;
use warnings;

: use CGI;
: 
: $query = new CGI;

my $query = new CGI;


: print $query->header;
: 
: print<<"EOF";
: 
: 
: 
: Daily Report
: 
: 

[snipped form]

: 
: New Task
: 
: 
: 
: 
: 
: 
: 
: 
: 
: 
: EOF

First thing you need to do is name your input fields
and text areas. The name you use for the first fieldset
would probably be numbered and the next ones would increment.


: There's a hyperlink 'New Tasks' above the submit button. On
: click of which i want to add the whole 'Fill Tasks' section
: below the first one.

You would need some indicator to tell the script that a
new field is being added.

New Task

Then in the script you would need to check the 'action'
parameter.

if ( $query->param( 'action' ) eq 'new_task' ) {
# add fieldset with new names for each input
# and print larger form

} else {
# print small form
}

Your next problem is how to maintain data across page
updates and how to increment field names for each new
fieldset. You might use a link like this.

 New Task

And then in the new link use

 New Task

   To preserve data you could use a submit button instead of
a link. These should submit the form allowing data to be kept
across pages.

 
 


: Then, the same hyperlink should appear below the
: second 'Fill Tasks' section so that i can include the
: third 'Fill Tasks' section below the second one, on
: click of that link. And So on...
: That is, the user may want to include as many tasks he/she want
: to enter. 
: 
: On submit button click, the page is directed to
: 'displaytasks.cgi' wherein i will display the user's data.

You'd probably do better sending it to the same script
as produced it.

HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328













-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: How TO CREATE RUNTIME CONTROLS

2004-10-02 Thread Charles K. Clarkson
atul ashpalia <[EMAIL PROTECTED]> wrote:

: I want to create runtime controls on the same webpage.
: For example, my webpage will contain a textbox, a
: hyperlink & a submit button.
: I want to achieve the following functionality:
: That is, if i click on the hyperlink, a new textboxes
: should be placed below the first one, if i click the
: second time on the hyperlink, another new textbox will
: be appended/placed below the 2nd one...and so on...

Yes, that is complicated, but easy to write. How
are you generating the form now? Show us your code to
process it without the link to add fields and we can
help you do the rest.


: Then on submit button, a new page is called where the
: data will be displaced which the user enters.

The documentation for CGI.pm can show you how to do
this. CGI.pm is part of the standard distribution.


HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




How TO CREATE RUNTIME CONTROLS

2004-10-01 Thread atul ashpalia
Hi All,
I want to create runtime controls on the same webpage.
For example, 
my webpage will contain a textbox, a hyperlink & a
submit button. 
I want to achieve the following functionality :
That is, if i click on the hyperlink, a new textboxes
should be placed below the first one, if i click the
second time on the hyperlink, another new textbox will
be appended/placed below the 2nd one...and so on...
Then on submit button, a new page is called where the
data will be displaced which the user enters.

kindly help me,
thanks in advance,
atul.



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]