By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,374 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

script ASP in an onClick event

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.