Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
Register | 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 Display Modes
  #1 (permalink)  
Old February 23rd, 2006, 06:56 AM
Authorized User
Points: 292, Level: 5
Points: 292, Level: 5 Points: 292, Level: 5 Points: 292, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: , , .
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hidden Field value error - PLEASE HELP

Hi,

I'm trying to creat a hidden field with the value equal to a variable that I've created in the head of my asp page called UMamount.

Here's what I have for code:

<input type="hidden" name="UMamount" value=(<%UMamount%>)>

I'm getting a Microsoft VBScript runtime error '800a000d' Type mismatch: 'UMamount' error.

PLEASE HELP!! Thanks!
Reply With Quote
  #2 (permalink)  
Old February 23rd, 2006, 07:08 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Code:
<%UMamount%>
Should be...
Code:
<%=UMamount%>
HTH,

Chris

Reply With Quote
  #3 (permalink)  
Old February 23rd, 2006, 07:14 AM
Authorized User
Points: 292, Level: 5
Points: 292, Level: 5 Points: 292, Level: 5 Points: 292, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: , , .
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Chris...that worked like a charm. It's amazing how when you've looked at the same code over and over that you can miss a "=".

One other quick question...is there anyway to force a variable to display 2 decimal digits? For example, UMamount should be 1.00, but it displays 1. Thanks a bunch!!!
Reply With Quote
  #4 (permalink)  
Old February 23rd, 2006, 07:30 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Sure...
Code:
FormatNumber(yourNumber, 2)
Cheers,

Chris

Reply With Quote
  #5 (permalink)  
Old September 17th, 2006, 03:22 PM
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

chris -

I wonder if you could help with another UMamount-related problem? I'm a designer, not a programmer, so pardon my ignorance.

I'm setting up an online donation form which uses usaepay is the gateway; according to their support docs, the amount field is called "UMamount".

This is fine if you allow the user to enter an amount, but I'd like to set standard amounts (25, 50, etc...) as checkboxes, which I assume would have to read:

<type="checkbox" name="UMamount" value="25> $25,
<type="checkbox" name="UMamount" value="50> $50, etc....


However, the system doesn't accept this. It also doesn't accept renaming the field names UMamount1, UMamount2, etc...

Can you offer any help?

Thanks.

Gabe Friedman
Reply With Quote
  #6 (permalink)  
Old September 18th, 2006, 06:46 AM
Authorized User
Points: 292, Level: 5
Points: 292, Level: 5 Points: 292, Level: 5 Points: 292, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: , , .
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Instead of using checkboxes, why not use a dropdown menu instead? Name the menu itself "UMamount" and pass that variable to your application?

Just a thought.
Reply With Quote
Reply


Thread Tools
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
When/How does hidden ViewState field get updated? Rex777 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 September 23rd, 2008 04:56 PM
pass value to the hidden field Dejitan ASP.NET 1.0 and 1.1 Basics 4 December 21st, 2006 03:13 AM
Hidden field ashoka_klt ASP.NET 1.0 and 1.1 Basics 1 September 6th, 2006 08:12 AM
Validating a hidden field mkerchenski ASP.NET 1.0 and 1.1 Basics 1 June 3rd, 2004 12:20 PM
How to assign a value to a hidden field? Edward King Javascript How-To 1 May 3rd, 2004 08:36 AM



All times are GMT -4. The time now is 01:44 AM.


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