473,386 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

perl code to equal to javascript's history.back()

hello ^__^
does anyone here know a perl code or function that can be used to go back to a previous page after clicking a link? that is, it does the exact thing when you use javascript's history.back()?
My professor says he "loathes" javascript so I'm afraid that i'll lose marks if I use history.back().

Thank you so much

jdserran
Programming Student
Oct 19 '07 #1
3 1941
KevinADC
4,059 Expert 2GB
There is not. Perl has no concept of the history stored in a browsers cache files. Think of things like this:

Perl - server side
javascript - client side

Anything that can be doe on the web server is perls responsibility. Anything that gets done in the browser window is javascripts (or other client side technology) responsibility. Delegate the responsibilites as appropriate.
Oct 19 '07 #2
Wow, Thank you ^__^. I already submitted to my prof the link to my assignment. I just removed the history.back() and simply put in the href the link to the site where I want the user to be directed. all of the inputs on the form will be always erased though...
Thanks again.
Oct 19 '07 #3
eWish
971 Expert 512MB
all of the inputs on the form will be always erased though...
Thanks again.
You can use the value to hold the user input data if you want to redisplay your form to the user. If you are using the CGI.pm and your form code is in your script or you are using a template system like HTML:::Template you do the following.

Expand|Select|Wrap|Line Numbers
  1. my $q = CGI->new;
  2.  
  3. my $first_name = $q->param('fname') || q{};  #Leave the field blank if there is not a value for the textfiled 'fname'.
  4.  
  5. print qq~<input type="text" name="fname" value="$first_name">~;
Oct 20 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jason Miles | last post by:
Hi, I wrote this little script to check to see if our Lotus Notes servers are running, and from the command line it works fine if I type perl notescheck.pl When I invoke the script from a web...
6
by: Richard Trahan | last post by:
I want a js function to call a Perl script residing on a server. The Perl script will return a string, to be used by the js. Pseudo code: <script> stringvar = perlfunc_on_server(stringarg)...
3
by: Jake | last post by:
Im using some custom javascript:history.forward() & javascript:history.back() image buttons on my application. If there is no back or forward history, I would like to display a dimmed(disabled...
4
by: Ike | last post by:
Can someone show me how I can have: <a href="javascript:history.back()" name="Back" value="Back" style=width:40px;float:right;margin-left:0px class="button" >Back</a> but since this href...
3
by: phal | last post by:
Hi all; I code Perl for CGI, I using regular expression to check the validation of user input, because the form is small and it run only from my own computer, anyways if many people using my...
0
by: supern | last post by:
#!c:/perl/bin/perl.exe $basedir="c:/program files/apache software foundation/apache2.2/cgi-bin"; $datafile="regstr.txt"; $name=$in{'login'}; $passwd=$in{'passwd'}; open(FH1,"+>>regstr.txt");...
0
by: supern | last post by:
this is my perl script saved as login.pl #!c:/perl/bin/perl.exe $basedir="c:/program files/apache software foundation/apache2.2/cgi-bin"; $datafile="regstr.txt"; $name=$in{'login'};...
1
by: roshina | last post by:
Hi Iam facing a problem in my project, developing a web site for online shopping in ASP on windows XP using IIS server. All the validations are ok but the new password is not upadated in the data...
4
by: =?Utf-8?B?QVJUTUlD?= | last post by:
i have a back button inside the code i have the following: Response.Redirect("javaScript:history.go(-1)"); I can't get the thing to work like i want it to, i want the user to click the button...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.