Help to create a Return Button using shell script CGI


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help to create a Return Button using shell script CGI
# 1  
Old 01-27-2011
Help to create a Return Button using shell script CGI

Hello Guys,

I would like to know how can I create a radio button on that its possible to return to the last page, using a ksh CGI shell script.

Can someone help ?

Thanks so much !!!Smilie

I tried this, but it is a javascript code !

Code:
<INPUT TYPE="button"
      VALUE="BACK"
    OnClick="history.go( -1 );return true;">


Last edited by Franklin52; 01-28-2011 at 03:31 AM.. Reason: Please use code tags
# 2  
Old 01-27-2011
The server knows little or nothing about the client's browsing history, so really, javascript's the way to go.
# 3  
Old 01-27-2011
Code:
#!/bin/sh
## Name: back.cgi

printf "Content-Type: text/html\n\n"

echo "<a href=\"${HTTP_REFERER:-./}\">BACK</a>"

In the HTML:
Code:
<!--#include virtual="back.cgi" -->

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Shell script not for CGI

Hello all, I found acontribution of apmcd47 in an article I read very interesting, here is the link: The post is named: I don't understand almost anything about shell scripting, but I'm still determined to learn. I have a question that I have not been able to solve (so many hours at... (9 Replies)
Discussion started by: Haxo
9 Replies

2. Shell Programming and Scripting

Launch shell script with parameters from a webpage button

I want to create a simple html page that should contain 2 fields in which the user can write the input. Then I want to have a button that should launch a shell script with the parameters inserted by user in the fields from the webpage. This is the code behind my webpage: <html> <form... (2 Replies)
Discussion started by: black_fender
2 Replies

3. Shell Programming and Scripting

Unable to create spreadsheet in cgi script

hi folks, I am trying to download xlsx from cgi page in browser but not sure where I made a mistake. the cgi script contains the code for creating xlsx and just by clicking on the image I should be able to #!/usr/bin/perl -w use Excel::Writer::XLSX; use DBI; use DBD::mysql; use CGI;... (1 Reply)
Discussion started by: scriptscript
1 Replies

4. Shell Programming and Scripting

Can't create file in CGI Script

Hi I have some simple script within the context of a cgi script that create a file to write to. If I run the script from the command line as root the file is created with no issue. However when I run the script from a web page with the apache account, it dies. The code lines are: sub... (3 Replies)
Discussion started by: larryjmoon
3 Replies

5. Shell Programming and Scripting

Create download button using perl CGI

Hi, I want to insert in a page a .html button that - once it is clicked - opens a save file dialog box by using perl CGI . I know that to create a link to do that I've done : print $cgi->p ( { -class => 'linc' },);I want to do something similar for a download button (0 Replies)
Discussion started by: black_fender
0 Replies

6. 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

7. 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

8. Shell Programming and Scripting

create a new directory from cgi script

hello. i hav accepted name of directory from user through a form.now i need to create a directory under cgi-bin of that name.I am not able to do so.n help is required (12 Replies)
Discussion started by: raksha.s
12 Replies

9. Shell Programming and Scripting

invoking a shell script inside cgi shell script

Hi, I have an HTML form through which I get some text as input. i need to run a shell script say script.sh inside a perl-cgi script named main_cgi.sh on the form input. I want to write the contents of the form in a file and then perform some command line operations like grep, cat on the text... (2 Replies)
Discussion started by: smriti_shridhar
2 Replies

10. UNIX for Dummies Questions & Answers

Script for using the Back button and the Close button

Here's a question I have for anyone that might be able to help me: I can write a html script that will allow the user to return to the previous page using the back button, and I can write a script that will allow the user to return to the previous page using the close button, but...is there a... (1 Reply)
Discussion started by: mdgibson
1 Replies
Login or Register to Ask a Question