Sponsored Content
Top Forums Shell Programming and Scripting Perl : embedding java script with cgi perl script Post 302783821 by scriptscript on Thursday 21st of March 2013 04:01:55 AM
Old 03-21-2013
Perl : embedding java script with cgi perl script

Hi All,

I am aware that html tags can be embedded in cgi script as below.. In the same way is it possible to embed the below javascript in perl cgi script ??

Code:
print("<form action="action.htm" method="post" onSubmit="return submitForm(this.Submitbutton)">");
print("<input type = "text" name="message">");
print("<input type = "password" name="password">");
print("<input type="submit" name = "submitbutton" value=" Edit ">");
print("</form>");

Now how to embed the below html with script in perl cgi ?

Code:
<form action="action.htm" method="post" onSubmit="return submitForm(this.Submitbutton)">
<input type = "text" name="message">
<input type = "password" name="password">
<input type="submit" name = "submitbutton" value=" Edit ">
</form>
<script>
function submitForm(s) { // when submit form button pressed
var pwd = document.forms[0].password.value;
if (pwd != 1111) {
alert ("Wrong Password! Your greedy has given up! ");
return false;
}}
</script>

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

call shell script from perl cgi script problem

hi,, i have perl scipt with line : system('./try.sh $t $d $m'); in shell scipt try.sh i have the line: echo $1 its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies

2. Web Development

in cgi perl script a form

hi,i hav a form in cgi perl script.this script accepts a value from user from another html form, and depending upon this value,i need to disable /enable radio buttons in cgi-perl script wen second page is displayed on executing cgi perl script.how do i do it using javascript? (0 Replies)
Discussion started by: raksha.s
0 Replies

3. Shell Programming and Scripting

Perl cgi script to call bash script?

Novice to perl here. I have created a simple web page in perl, with only one submit button. I would like to execute a bash script on the same server when this button is clicked on. Is this possible in perl? I have spent a few days researching this and am unable to find any useful information.... (0 Replies)
Discussion started by: pleonard
0 Replies

4. Shell Programming and Scripting

Perl-cgi with java

hi, I am writing a perl-cgi which will extract data from DB and show on portal (like a report). Now I have one portal ready with Java (war deployed). Can I use same portal which will directly call my perl-cgi script ? (0 Replies)
Discussion started by: Deei
0 Replies

5. Shell Programming and Scripting

Embedding HTML in Perl script

My webpage is hosted from perlscript(homepage.pl), i want to add piece of html code in the footer of the homepage. I simply pasted the html code at the end of the perl script as below... ======================================================== close(OUTSQL); ... (4 Replies)
Discussion started by: paventhan
4 Replies

6. Web Development

perl cgi script not working

Hello, Met a problem learning perl cgi script. 1 #!/usr/bin/perl -wT 2 3 use strict; 4 use CGI qw(:standard); 5 6 my $q = new CGI; 7 8 my $filename = $q->param('/home/yifangt/hello.cgi'); 9 my $contenttype = $q->uploadInfo($filename)->{'Content-Type'}; 10... (5 Replies)
Discussion started by: yifangt
5 Replies

7. Web Development

problem with exporting vairable from one perl cgi to another perl cgi script while redirecting.

Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect. Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is redirected to welcome page. My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies

8. Programming

CGI Perl script to execute bash script- unable to create folder

Hi I have a bash script which takes parameters sh /tmp/gdg.sh -b BASE-NAME -n 1 -s /source/data -p /dest/data/archive -m ARC gdg.sh will scan the /source/data and will move the contents to /dest/data/archive after passing through some filters. Its working superb from bash I have... (0 Replies)
Discussion started by: rakeshkumar
0 Replies

9. Shell Programming and Scripting

Perl CGI : unable to download the excel sheet from perl cgi page

Hi All, I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet. I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet. print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies

10. Shell Programming and Scripting

Not able to copy the file in perl cgi script

Hello experts, I am facing an very typical problem and hope the issue can be solved. I have a page download.cgi in /cgi-bin folder. use CGI; use CGI::Carp qw ( fatalsToBrowser ); use File::Copy copy("C:\\Program Files\\Apache Software... (8 Replies)
Discussion started by: scriptscript
8 Replies
HOBBIT-NKVIEW.CGI(1)					      General Commands Manual					      HOBBIT-NKVIEW.CGI(1)

NAME
hobbit-nkview.cgi - Xymon Critical Systems view CGI SYNOPSIS
hobbit-nkview.cgi DESCRIPTION
hobbit-nkview.cgi is invoked as a CGI script via the hobbit-nkview.sh CGI wrapper. hobbit-nkview.cgi matches the current critical statuses against the hobbit-nkview.cfg(5) file, and generates the "Critical Systems" view. RELATION TO BBNK PAGE
This view is a replacement for the statically generated "bbnk" page provided in versions of Xymon prior to version 4.2. Although the "bbnk" pages are supported throughout Xymon 4.x, it is recommended that You switch to the newer Critical Systems view provided by this CGI. OPTIONS
--nkacklevel=NUMBER Sets the acknowledgment level for acknowledgments sent via the hobbit-ackinfo.cgi(1) page. Note that this may be overridden by the configuration of the hobbit-ackinfo.cgi utility. --env=FILENAME Loads the environment defined in FILENAME before executing the CGI script. --area=NAME Load environment variables for a specific area. NB: if used, this option must appear before any --env=FILENAME option. --debug Enables debugging output. ENVIRONMENT VARIABLES
BBHOME Used to locate the template files for the generated web pages. QUERY_STRING Contains the parameters for the CGI script. SEE ALSO
hobbit-ackinfo.cgi(1), xymon(7) Xymon Version 4.2.3: 4 Feb 2009 HOBBIT-NKVIEW.CGI(1)
All times are GMT -4. The time now is 03:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy