Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 12th, 2005, 05:39 AM
Registered User
 
Join Date: May 2005
Location: Muscat, , Oman.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jerrin
Default Help

Hi everyone,

Can anyone help me out with this problem? I have an asp page with 5 textbox controls. the user is allowed to enter values in 4 of them and when he clicks on the submit button the sum of the 4 values should be displayed in the fifth box. now.. the problem... i am able to do this by writing a simple vbscript function. so far so good. now in addition to this i want to display the corresponding grade for the sum, which i retreive from the database. so as to retreive the info from the db, i need to have <form> tags with method as post or get. but then, the script does not work. when i works without the script the page self references and the values entered are not displayed. am i missing something here or.... i am in a fix. do enlighten me. thank u.

jerrin

Reply With Quote
  #2 (permalink)  
Old May 12th, 2005, 05:55 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Jerrin,

When you submit the form, the page is rebuilt & any values entered in the text boxes are lost.

You can populate the boxes again by writing the value submitted in the form into their value attributes, e.g. for a post...
Code:
<input type="text" name="myTextBox" value="<%=Server.HTMLEncode(Request.Form("myTextBox"))%>" />
Reply With Quote
  #3 (permalink)  
Old May 12th, 2005, 04:17 PM
Registered User
 
Join Date: May 2005
Location: Muscat, , Oman.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jerrin
Default

Hi Chris,

Thank you for the answer, but I had already tried this out. What happens is.. I am able to populate the controls as you mentioned but the reset button would not function, if the user wished to change/reset the values. Is it possible to view the result on another page and have it displayed on the same page in a different frame.. i hope i have made myself clear. I am not able to get a solution for this. The problem is i want to execute a script and communicate with the database on the same page as i mentioned before.

jerrin

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 03:58 PM.


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