Wrox Programmer Forums
|
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 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 February 23rd, 2006, 06:56 AM
Authorized User
 
Join Date: Dec 2005
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!
 
Old February 23rd, 2006, 07:08 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

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

Chris

 
Old February 23rd, 2006, 07:14 AM
Authorized User
 
Join Date: Dec 2005
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!!!
 
Old February 23rd, 2006, 07:30 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

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

Chris

 
Old September 17th, 2006, 02:22 PM
Registered User
 
Join Date: Sep 2006
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
 
Old September 18th, 2006, 05:46 AM
Authorized User
 
Join Date: Dec 2005
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.





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 03: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 07:12 AM
Validating a hidden field mkerchenski ASP.NET 1.0 and 1.1 Basics 1 June 3rd, 2004 11:20 AM
How to assign a value to a hidden field? Edward King Javascript How-To 1 May 3rd, 2004 07:36 AM





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