473,473 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

script ASP in an onClick event

i need to insert, in a onClick event of a submit button in a form, a
call to an ASP script, like follows:

<INPUT TYPE="SUBMIT" NAME="btnSend" onClick="<%
A_Function_Or_Sub_in_VBScript %>">

the problem is that teh event triggers only event on the client page,
not on the server..how to solve the problem???

thx to all..

Jul 19 '05 #1
2 10910
emulman wrote:
i need to insert, in a onClick event of a submit button in a form, a
call to an ASP script, like follows:

<INPUT TYPE="SUBMIT" NAME="btnSend" onClick="<%
A_Function_Or_Sub_in_VBScript %>">

the problem is that teh event triggers only event on the client page,
not on the server..how to solve the problem???


put the script into the called page

--
William Tasso - http://WilliamTasso.com
Jul 19 '05 #2
I think it's implied that the script is supposed to be on the server?

You need to arrange some form of communication between the client and server
in order to request that the script be run and then be notified when its
completed.
This is generally referred to as 'Remote Scripting' and can be accomplished
in a number of ways none of which are trivial or particularly easy at first:

Form post
Hidden form post
Custom hidden form post with user implemented XML messaging
XMLHTTP request
Remote Scripting applet (as used with Visual Interdev)
ActiveX components
Database calls such as RDS

The one I would suggest is that of:

http://developer.apple.com/internet/...pt/iframe.html

I have taken this one and implemented a queued system with XML messages and
message types. However, I then moved on to XMLHTTP which is by far the
easiest but also the least supported unless you have a dedicated group of IE
platforms to roll out to.

In your case, it may be easiest to just post the form and run the script?

Chris.
"William Tasso" <ng*@tbdata.com> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
emulman wrote:
i need to insert, in a onClick event of a submit button in a form, a
call to an ASP script, like follows:

<INPUT TYPE="SUBMIT" NAME="btnSend" onClick="<%
A_Function_Or_Sub_in_VBScript %>">

the problem is that teh event triggers only event on the client page,
not on the server..how to solve the problem???


put the script into the called page

--
William Tasso - http://WilliamTasso.com

Jul 19 '05 #3

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

Similar topics

4
by: Wm | last post by:
I have a script that changes a main/enlarged image when you click on a thumbnail. It works fine in IE, but for some reason it won't do anything in Netscape 7.1. Does anyone know if this is a...
3
by: niconedz | last post by:
Hi The following code works fine in IE but not Firefox. It's a little script that zooms an image and resizes the window to fit. Can anybody tell me what's wrong? Thanks Nico == btw.....
3
by: Charlie | last post by:
Hi: when the user selects the save button (asp control) to intiate a postback, I would like to pop up a javascript alert box to confirm if he really wants to save. If he selects no from alert...
9
by: Wayne Wengert | last post by:
I am attempting to incorporate some techniques I found in an MSDN article into one of my aspx pages. It basically adds a new class that Inherits from the System.Web.UI.Page and includes some new...
0
by: Subba Rao via DotNetMonster.com | last post by:
---------------------------HTML---------------------------------------- <html> <head> <title>:: DHTML Table Demo ::</title> <script langauge="javascript" src="InterchangeRows.js"></script>...
5
by: Mirovk | last post by:
The onclick action associated to my form´s radio buttons call to a vbscript were the session values are changed, this happens correctly but with the onclick action associated to my continue button...
4
by: Brian Cryer | last post by:
Out of curiosity, when I use onclick="...some JavaScript ..." why do I not need to flag that its JavaScript, but when I define a script on a page I do need to tag it (<script...
2
by: Jay | last post by:
I have a web app running on the windows CE device. In one of the asp.net pages - it has javascript code. That seems to have a memory leak. When I run the web app - in about one hour, the app hangs....
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
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...
1
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.