Validation of Text field while Click on submit button


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Validation of Text field while Click on submit button
# 1  
Old 01-27-2012
Validation of Text field while Click on submit button

I am using Perl CGI. I have created some text fields and getting those values.
But i want if user leave the text field blank when he click on submit button then instead of run a script it should give a popup. Please any body suggest me something..???
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

Apache2 web application- Submit button - write data into a file

Hello, I am newbie on php-mysql and just know only installation. I have an apache2+php5+mysql installed VPS. What I would like to do is that when visitor enters requested data shown in index.html, submit button will run a script to save each field into a file. Here is an example shown in... (1 Reply)
Discussion started by: baris35
1 Replies

2. Shell Programming and Scripting

Curl to hit the submit button

Hello, I am looking to hit a URL using curl and click on submit button so that I can get the results. The below is the code <input name="tos_accepted" id="tos_accepted" class="button" type="submit" value="Yes, I Agree"/> <input name="tos_discarded" id="tos_discarded"... (1 Reply)
Discussion started by: Kochappa
1 Replies

3. Shell Programming and Scripting

CURL Button Click Issue

I am trying to perform a button click via cURL and I am having an issue possibly due to java script on click. The HTML source code is: <input id="ctl00_SPWebPartManager1_g_1bb6dc86_55ab_4ea9_a4db_4747922a8202_ctl00_RequestOption_0" class="radio" type="radio" checked="checked" value="1"... (5 Replies)
Discussion started by: js0505
5 Replies

4. Shell Programming and Scripting

[SOLVED] Submit Button is not Recognizable

Hi ... I am writing a PERL CGI script where firstly i display a Submit button and when i click that, it will display a group of checkbox values and another submit button. My question is Now, if i click the second submit button, it should get the checkbox values and work with those(do some... (0 Replies)
Discussion started by: gkrish
0 Replies

5. Web Development

Cannot execute sh file using button click in php file in apache

I the problem that i facing is cannot use button click to execute the sh file that store in the same location. the program file is a php file and running in apache2. the code that i run is show below <button onclick="sh()" name="sh">SH</button> <script type='text/javascript'> function sh()... (5 Replies)
Discussion started by: zhengkoon8
5 Replies

6. Web Development

include virtual perl-script - submit button opens a new page..

hello 2 all I can't understand how to insert a perl-script into .shml in a right way. <form> should be working but it's not doing that: <!--#include virtual="/cgi-bin/script.cgi?filename"--> filename is a name of the file which script is using the script is used for a score show (the number... (3 Replies)
Discussion started by: tip78
3 Replies

7. Shell Programming and Scripting

include virtual perl-script - submit button opens a new page..

hello 2 all I can't understand how to insert a perl-script into .shml in a right way. <form> should be working but it's not doing that: <!--#include virtual="/cgi-bin/script.cgi?filename"--> filename is a name of the file which script is using the script is used for a score show (the number... (0 Replies)
Discussion started by: tip78
0 Replies

8. Shell Programming and Scripting

Python- Changing background color on Button click

Hi, I am trying to write a python program which changes background color on click of button. However i am stuck up. Instead of changing the color currently it is creating a new frame every time. please look at the code and let me know how to correct it #!/usr/bin/env python from Tkinter... (0 Replies)
Discussion started by: vickylife
0 Replies

9. UNIX for Dummies Questions & Answers

CGI cannot get the Value after click the button. URGENT!!!

Hi Everyone, I am facing a problem, regarding cgi cannot receive the value from HTML after click submit. Here is the code =============================================== #!/bin/bash genHTML() { cat <<-__EOF__ Content-type: text/html <html> <script language="JavaScript"> <!-- ... (2 Replies)
Discussion started by: ryanW
2 Replies

10. Solaris

Comprehensive system documentation by button click

Guys There's a new WebPage where you can generate a comprehensive detailed system documentation by button click. Look at the example at https://sdoctool.sun.com/data/doc.php?ID=sdoctool&N=2 ;) Interested, go to Cheers (0 Replies)
Discussion started by: lebch
0 Replies
Login or Register to Ask a Question
CGI::FormBuilder::Template::CGI_SSI(3pm)		User Contributed Perl Documentation		  CGI::FormBuilder::Template::CGI_SSI(3pm)

NAME
CGI::FormBuilder::Template::CGI_SSI - FormBuilder interface to CGI::SSI SYNOPSIS
my $form = CGI::FormBuilder->new( fields => @fields, template => { type => 'CGI_SSI', file => "template.html", }, ); DESCRIPTION
This engine adapts FormBuilder to use "CGI::SSI". You can specify any options which "CGI::SSI->new" accepts by using a hashref: my $form = CGI::FormBuilder->new( fields => @fields, template => { type => 'CGI::SSI', file => 'form.shtml', sizefmt => 'abbrev' } ); In addition to CGI::SSI new arguments, you can also specify "file", "virtual", or "string" argument. The following methods are provided (usually only used internally): engine Returns a reference to the "CGI::SSI" object prepare Returns a hash of all the fields ready to be rendered. render Uses the prepared hash and expands the template, returning a string of HTML. TEMPLATES
In your template, each of the form fields will correspond directly to a "<!--#echo -->" of the same name prefixed with "field-" in the template. So, if you defined a field called "email", then you would setup a variable called "<!--#echo var="field-email" -->" in your template. In addition, there are a couple special fields: <!--#echo var="js-head" --> - JavaScript to stick in <head> <!--#echo var="form-title" --> - The <title> of the HTML form <!--#echo var="form-start" --> - Opening <form> tag and internal fields <!--#echo var="form-submit" --> - The submit button(s) <!--#echo var="form-reset" --> - The reset button <!--#echo var="form-end" --> - Just the closing </form> tag Let's look at an example "form.html" template we could use: <html> <head> <title>User Information</title> <!--#echo var="js-head" --><!-- this holds the JavaScript code --> </head> <!--#echo var="form-start" --><!-- this holds the initial form tag --> <h3>User Information</h3> Please fill out the following information: <!-- each of these <!--#echo -->'s corresponds to a field --> <p>Your full name: <!--#echo var="field-name" --> <p>Your email address: <!--#echo var="field-email" --> <p>Choose a password: <!--#echo var="field-password" --> <p>Please confirm it: <!--#echo var="field-confirm_password--> <p>Your home zipcode: <!--#echo var="field-zipcode --> <p> <!--#echo var="form-submit" --><!-- this holds the form submit button --> </form><!-- can also use "tmpl_var form-end", same thing --> As you see, you get a "<!--#echo -->" for each for field you define. However, you may want even more control. That is, maybe you want to specify every nitty-gritty detail of your input fields, and just want this module to take care of the statefulness of the values. This is no problem, since this module also provides several other "<tmpl_var>" tags as well: <!--#echo var="value-[field] --> - The value of a given field <!--#echo var="label-[field] --> - The human-readable label <!--#echo var="comment-[field] --> - Any optional comment <!--#echo var="error-[field] --> - Error text if validation fails <!--#echo var="required-[field] --> - See if the field is required This means you could say something like this in your template: <!--#echo var="label-email" -->: <input type="text" name="email" value="<!--#echo var="value-email" -->"> <font size="-1"><i><!--#echo var="error-email" --></i></font> And FormBuilder would take care of the value stickiness for you, while you have control over the specifics of the "<input>" tag. A sample expansion may create HTML like the following: Email: <input type="text" name="email" value="nate@wiger.org"> <font size="-1"><i>You must enter a valid value</i></font> Note, though, that this will only get the first value in the case of a multi-value parameter (for example, a multi-select list). Multiple values (loops) in "CGI_SSI" are not yet implemented. For more information on templates, see HTML::Template. SEE ALSO
CGI::FormBuilder, CGI::FormBuilder::Template, HTML::Template REVISION
$Id: HTML.pm 97 2007-02-06 17:10:39Z nwiger $ AUTHOR
Copyright (c) Nate Wiger <http://nateware.com>. All Rights Reserved. This module is free software; you may copy this under the terms of the GNU General Public License, or the Artistic License, copies of which should have accompanied your Perl kit. perl v5.14.2 2011-09-16 CGI::FormBuilder::Template::CGI_SSI(3pm)