Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Either I'm losing default values or they aren't passing
Last Post 08-12-2010 02:10 PM by Ryan Bakerink. 7 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
BSquaredUser is Offline
river guide
river guide
Posts:89
Avatar

--
08-08-2010 03:35 PM
    My form has a number of fields that deal with money.  5 for honoraria to an event, 1 for donation, 1 combo box for ticket sales, and a radio button for sponsorship level.

    I've tried using everything number oriented but the query fails with empty values even though I'm setting default values. It seems my only choice is to use nvarchar  so I would like to be able to restrict the input to numbers only.  I know there are a lot of scripts out there for this but wondered if you had one that you use for such a scenario.

    Thanks
    BSquaredUser is Offline
    river guide
    river guide
    Posts:89
    Avatar

    --
    08-08-2010 08:22 PM
    It looks like onkeypress might not work - is that accurate?

    I was able to modify the formatCurrency function a little to take the field id (this.id) along with the value (this.value) and then use getElementById to change the value. The original function is still there, I just made a copy.My copy drops the dollar sign with onBlur. Still, it would be preferable to restrict the input up front and format it on the way out.
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    08-09-2010 02:18 PM
    Hi... As far as I know onkeypress should work if you include that in your short field name... There is also onFocus, onClick, onkeyup, etc....

    Yes, you should be able to use a feature such as including onkeyup in your short field name and then have a custom JavaScript / Client Side Event executed to validate that the value is an integer. If you google 'Validate Number JavaScript' I think you can find several functions that you can include in your initial JavaScript file.

    -Chad
    BSquaredUser is Offline
    river guide
    river guide
    Posts:89
    Avatar

    --
    08-09-2010 06:30 PM
    I'm starting to think our installation of DNN is screwy somehow.  I've seen numerous posts that all these javascript function should work but for us - they just don't.  I've got 5 different variants of an integer mask that do only number, periods, commas, even formating on an html page but just die and do nothing when I plug them in.  

    I was able to modify your script for formatting currency to my needs though.  The real difficulty is that I need to add several fields of numbers for a dollar total for an order.  When I've tried to insert my data into the database, all of the empty fields, which I defaulted to 0, attempt to insert themselves as nothing - not null just empty - which causes the insert to fail because I'm trying to insert into a numeric (or decimal or money or any of the others).  A null would work fine but nothing does not.  So I've had to use the nvarchar just to get the data in the database

    I'm going to try to use another of the demos to create a running total and see if that gets me where I need to be - I've used it before so here's hoping.  My other choice is to create a couple of triggers to fill the otherwise empty fields with zeros and then re-cast the datatypes before I can add them up for a total.  

    Wish me luck.
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    08-09-2010 07:01 PM
    Good luck!

    Actually part of the problem with client side events is that although very powerful, these are really just open access to basically program in JavaScript and the issue there is that it's very touchy and case sensative. One wrong upper case or missing } can mess the function up. Even worse, one wrong character and it can mess up other functions in the JavaScript file too. So very powerful but very touchy.

    This is also why we offer Premium Support services... It's not that we are trying nickel and dime (or dollar and hundred dollar ) our clients but supporting custom JavaScript and solutions with a component that is as affordable and powerful becomes very difficult once we have to allocate our resources towards this programming instead of real abc actual bugs or issues. The more demos the better though!

    Thanks and good luck!

    Chad
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    08-09-2010 07:04 PM
    Oh! By the way I use FireBug for firefox when testing and programming / debugging these types of issues. It's a free and very powerful tool which will tell you (when the console part is enabled) the exact JavaScript error and where it's coming from.

    Chad
    BSquaredUser is Offline
    river guide
    river guide
    Posts:89
    Avatar

    --
    08-09-2010 07:48 PM
    I was just looking over Demo 13 and am going to look at question events for totalling the orders.

    And I agree about Firebug - that's what I've been using.  I"m not getting any scripting errors from it thought - but something is interfering with things that should work.  I ought to set DF up on a pristine site and see what it can do there.  Thanks for the help.  I'll be posting a PayPal question shortly.
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    08-12-2010 02:10 PM
    Hello BSquared,

    We will welcome your question on payPal.

    Thanks,

    Ryan
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi