473,320 Members | 2,177 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,320 software developers and data experts.

javascript submit button

hi all...
is there a way to call a backend application on the onclick event of a
submit button?....
thank you....
Jul 20 '05 #1
3 2027
In article <52**************************@posting.google.com >,
ar************@yahoo.com enlightened us with...
hi all...
is there a way to call a backend application on the onclick event of a
submit button?....
thank you....


In .NET, yeah, with postback, but I don't know about other
appplications. Mostly client-side script is limited to the client, so
you'd either have to open a new window and call a cgi or server-side
script or use ActiveX or COM.

--
--
~kaeli~
If it's tourist season, why can't we shoot them?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2
hey....
thanx a lot for the reply...
but i basically didnt want it in .net....
but anyways i have found the solution to my problem....
basically i had to call a backend cgi program and pass some parameters
to it too....
so on the onclick event of the button i had to call another javascript
function first that would assign values to hidden input types, which
would then be passed onto the other cgi program...
thanx a lot anyways...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3
arpita wrote:
hi all...
is there a way to call a backend application on the onclick event of a
submit button?....
thank you....


If client-side scripting is enabled, and the DOM of the UA supports the
Image() object, sure:

<input type="button" onclick="(new Image()).src =
'/cgi-bin/something.cgi';">

something.cgi would start the process on the server.

Note that while you could obtain information about what happened when
something.cgi ran, it's a bit tricky and involves something.cgi actually
returning content of type image/gif with valid content.

If you absolutely need to know what happened, and can live with IE and
Mozilla support only, you could use the HTTPRequest object to fire off
something.cgi: <url: http://jibbering.com/2002/4/httprequest.html />

Lastly, you can actually do the same sort of thing without client-side
JavaScript enabled at all:

<form method="get" action="/cgi-bin/something.cgi">
<input type="submit" value="Click here to run something.cgi">
</form>

In all examples, something.cgi is something the server can execute to
start your process (it could be C, Perl, PHP, server-side JavaScript, ASP,
JSP, ColdFusion, etc) As long as it can get to the underlying OS on the
Web server to request that something be started either there, or on
another host (using remsh for example), it will work.

Be aware of security concerns, with all examples, anyone who knew
/cgi-bin/something.cgi existed on your server, and it wasn't protected in
any way, could fire it automatically and repeatedly, perhaps having fatal
consequences for your server.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Bob Smith | last post by:
Hi all I have a page which contains a form. I want a customized button with an image for the submit button, and when the submit button has been clicked send the form to the perl script. Now the...
6
by: Shaun Fleming | last post by:
I've been trying to make this simple script compatible across various browsers. It works for IE 6.0 and NS 7 but doesnt work with Opera (I have version 7.11). This is what is supposed to happen:...
2
by: Margaret Werdermann | last post by:
Hi all: I'm having a nasty time with a particularly difficult piece of code and was hoping someone might be able to help me. I have a FormMail form that originally worked perfectly. Then, I...
4
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I...
14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
21
by: Martin Eyles | last post by:
I am trying to get javascript to cause a page to post back. I have tried calling _doPostBack from my script, but generates an error "object expected". I think this is because the page's script...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
4
by: Mark Miller | last post by:
I've been trying to execute a javascript function just before submit on a form that contains an <input type="file"> input field and it isn't working. The reason I want to do this is the end users...
10
by: ljlolel | last post by:
So.. I have a form that submits to an ASP.net site made in C-sharp. The ASP site is not mine, i do not have the server side code. When I submit from my form by pressing the Submit button, I get...
10
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.