Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > script ASP in an onClick event

Reply
Thread Tools

script ASP in an onClick event

 
 
emulman
Guest
Posts: n/a
 
      09-12-2003
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..

 
Reply With Quote
 
 
 
 
Chris Barber
Guest
Posts: n/a
 
      09-13-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help converting 'onclick' script to 'href' script... whitgurley@gmail.com Javascript 9 12-30-2006 11:50 PM
Overriding an onclick with another onclick tomlong@gmail.com Javascript 4 01-26-2006 09:26 PM
how to handle both onmouseup event and onClick event JerryG ASP .Net 0 12-20-2005 03:49 AM
button.onclick = new Function("func2()") + button.onclick foldface@yahoo.co.uk Javascript 2 09-26-2005 08:13 AM
document.onclick=doIt() same as document.onclick=doIt ? bob Javascript 3 08-21-2003 12:14 PM



Advertisments