473,396 Members | 1,940 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,396 software developers and data experts.

body onUnload with perl script

I have a shoping cart page wth a registration form.

The submit button takes them to GoogleCheckout.

I want to call my formmail.cgi with the <body unload=...> tag.

However, I get 2 error messages ater I click Submit

1) cgi is undefined
2) browser prompt me to open or save cgi file

Code is:
<body onUnload="cgi-bin/bformmail.cgi">

The perl script works if i call it with the action method in the form tag.

I could call it within a js function, then call that function with the action method before calling the GoogleCheckout code but...

I've searched for hours and cannot figure out how to do it.

(Do I have to tell the browser it's perl script and if so how?)

Any code snippets will be greatly appreciated!

JV
Nov 10 '07 #1
1 2250
numberwhun
3,509 Expert Mod 2GB
I have a shoping cart page wth a registration form.

The submit button takes them to GoogleCheckout.

I want to call my formmail.cgi with the <body unload=...> tag.

However, I get 2 error messages ater I click Submit

1) cgi is undefined
2) browser prompt me to open or save cgi file

Code is:
<body onUnload="cgi-bin/bformmail.cgi">

The perl script works if i call it with the action method in the form tag.

I could call it within a js function, then call that function with the action method before calling the GoogleCheckout code but...

I've searched for hours and cannot figure out how to do it.

(Do I have to tell the browser it's perl script and if so how?)

Any code snippets will be greatly appreciated!

JV
If you have a form, then the correct place to put it is in the form tag as you mentioned. The form is what would be processed, not the HTML body. When the submit button is clicked, then the form will kick off that script and submit its values to it.

Also, you have to make sure that CGI is enabled in the web server on the machine the script resides on, otherwise the script will be printed to the screen, most likely.

Regards,

Jeff
Nov 11 '07 #2

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

Similar topics

2
by: Brian Vallelunga | last post by:
I'm working on an asp.net site and am trying to implement a popup help window. I want the window to close when the user advances to the next page in our application. The thing is, I'm doing this on...
10
by: bbcrock | last post by:
does anyone have sample code to display a pop up when a user leaves the site? I really don't want to use this technique, but the clients demand it. I'm thinking something like un body onunload,...
2
by: Oleg Ogurok | last post by:
Hi all, Is there a way to add a client side onunload statement into the <body> tag of a page? Thanks. -Oleg.
5
by: feng | last post by:
I want to use onunload to capture user's action when he clicks on the "x" button to close the browser. Here is how I do this: <SCRIPT FOR="window" EVENT="onunload"> myScript(); </SCRIPT> ...
3
by: =B= | last post by:
Hi all, I was wondering if anyone has had any luck with trapping the <BODY> onUnload() event in ASP.NET? The thing is, I'm writing code for an Intranet site. The code makes a call to a...
1
by: Laurent Bugnion | last post by:
Hi, I am trying to programatically add an "onunload" event handler to the "body" tag of an ASPX page. I am doing this from a Custom Control located on this page. To do this, I added...
5
by: ~~~ .NET Ed ~~~ | last post by:
Well the subject says it all but I am going to elaborate a bit. As we all now since 2.0 it is possible to access the Header from code behind without much wizardry and that is a good thing. ...
3
by: Tuxedo | last post by:
Is it possible to add a function call to the onUnload event handler from an external js file, or can this only be done via the body tag? In any case, I presume there can only exist one onUnload...
3
by: Sunny | last post by:
Hi, Can someone tell me, How to load the Body Html from a text file that contains javascript. to Manage my files I am creating an Index Page. <html> <head> <meta http-equiv="content-type"...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.