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!

Custom JS validation
Last Post 02-05-2010 07:15 AM by David To. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Stuart DawsonUser is Offline
going with the flow
going with the flow
Posts:35
Avatar

--
02-05-2010 04:19 AM

    Hi

    I have a multiline textbox which has a limit of 600 words (not characters). I have some custom javascript in place that informs the user how many words they have entered as they type.

    This is fine but I need to check the word count when the user presses Submit and not allow submission  (and also display an error message) if they have entered over 600 words. How can I do this?

    Thanks,

    Stuart

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    02-05-2010 06:18 AM
    HI, you could put that same javascript in module configuration / save javascript and also add in an "alert" statement. Try this out and see if it works for you.

    Another option is to use SQL validation (configured under Module configuration / Validation) and call a stored procedure to get the "Count" of words and return a "1" for IsValid if it's less than 600 words and a "0" for IsValid for if greater than 600 words. -- David
    Stuart DawsonUser is Offline
    going with the flow
    going with the flow
    Posts:35
    Avatar

    --
    02-05-2010 06:54 AM
    Hi

    I'm not sure what you mean. I've tried putting some script into the "Submit / Save JavaScript" but to no avail. Please can you provide an example, I'm sure it must be possible to add custom JS validation prior to submit?

    As for the second suggestion, this is not really viable as we could be sending a potentially huge string back to the database for validation.

    Please help, I'm at the end of my tether!

    Stuart
    Stuart DawsonUser is Offline
    going with the flow
    going with the flow
    Posts:35
    Avatar

    --
    02-05-2010 07:10 AM

    It's ok, I have sorted it. You just have to return something from the Save / Submit Script to prevent submission. Phew!

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    02-05-2010 07:15 AM
    Can you export your form to www.betasprings.com (username: host, password: dnnhost) and send us the URL/tabid and we can take a look at it here? Thanks. It's better to have the form and whip up a which javascript function there as opposed to trying to create one from scratch without having the form set up. -- David
    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