Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 21st, 2005, 01:44 AM
Authorized User
 
Join Date: Feb 2005
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kumarop
Default Simple Form query

Dear Sir,
       In a simple form there are two text field and one submit button (button2).I want to perform some asp codeed work (here for example writing date for example...).Which should run on click of button1 withought submitting the form.

What is the best method to do so.?

1. One way could be write javascript function on onclick event of button1,but how to write it...

Do update this code for my learning please

Regards
Om Prakash


Code:
<%@ Language=VBScript %>
<HTML>
<HEAD>
</HEAD>
<BODY>

<form method = post action="xyz.asp">
<P>&nbsp;</P>
<P>
Text1&nbsp;&nbsp;&nbsp; <INPUT id=text1 style="LEFT: 17px; WIDTH: 158px; TOP: 16px; HEIGHT: 22px" size=19 name=text1><INPUT id=button1 style="LEFT: 215px; WIDTH: 64px; TOP: 15px; HEIGHT: 24px" type=button size=22 value=Button1 name=button1>&nbsp;&nbsp; <br>
Text2&nbsp;&nbsp;&nbsp; <INPUT id=text2 style="LEFT: 56px; TOP: 59px" name=text2><INPUT id=button2 type=submit value=Button2 name=button2></P></form></BODY></HTML>
</form>

<%
Response.Write now()
%>

</body>
</head>
</html>
om prakash kumar
__________________
om prakash kumar
 
Old March 22nd, 2005, 01:48 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii kumarop!!!

ASP code runs on the server rather than client browser ,
Its only the asp.dll that interprets asp code into Html which is sent to the client browser.

You can do the same thing using client side javascript.
Store the values in javascript variable and put it on span or div tag when user clicks the button
Hope this will help you



Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple query question ltblue14 Access 3 July 16th, 2006 02:10 PM
Simple Query help pls? Mitch_A SQL Language 5 February 3rd, 2006 05:13 PM
Simple Query Need Help ~Bean~ SQL Language 2 June 27th, 2005 11:22 AM
Simple Tomcat Query? Baztec Apache Tomcat 0 January 13th, 2004 11:38 PM
Simple Query/Display ABATES VS.NET 2002/2003 1 August 10th, 2003 05:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.