Recently Viewed...
To help you navigate to pages you most recently visited, select from the links below.
Product Forums
Sharepoint Forums
Newsletter
Dynamic Forms Demonstrations
Page Tags
DNN Modules
SnowCovered Top Sellers

One stop solution for events calendar and events registration! Demo site available for free trial.

'Relationship Building' and 'Communication' are two essential nuts and bolts for a business to prosper. This module allows you to bridge both of these and easily generate continuous awareness of your web site, products and services. Your prospects and customers will greatly appreciate this featur

Version 5 of the perennial best-selling tool for creating data-based solutions in DNN without custom programming. This version focuses on greater flexibility, expandability, and ease-of-use.

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to add videos in various format and automatically convert them to flv format, you also can add videos from embed code and play them in our integrated flash video player.

The award winning discussion forum and community solution for DotNetNuke is now even better. When you need to build the best community site, you need the best module, Active Forums!

Powerful, Ajax Enabled, Easy to Use. Document Management has never been better. Open-DocumentLibrary allows DotNetNuke users to share and manage documents in a flexible, intelligent way, offering granular control over Folder and Document access.

Gloss is the first ALL COLORS! skin, featuring a powerful XML-based flash and being 100% W3C CSS XHMTL1.0 compliant. Tune it yourself on the fly, changing colors, backgrounds, containers, text color and size, width and more! Brilliant!Available for DNN4 and DNN5

ALL NEW ! - Minimalist includes skin packs in 12 great colors. Each color has Flat, Gradient and Glass versions. Feature rich XML Flash header, perfect for just about any purpose. 9 Different menu options in each skin pack; 3 horizontal menus, 3 vertical menus and 3 all-new Twin level menus . . .

A 16-in-1 dnn module.Powerful yet easy to use. Capable of producing a multitude of functions including:Image rotator/Numeric rotator/ Mp3 player/Wmv player/ Flash video player /YouTube video player/Multimedia player / Text-to-speech podcast / Flipping book player/Banner topic player/Silverlight albu

Ultra Media Gallery is the most popular photo gallery and media gallery solution for DotNetNuke, UMG offers 10 different flash player to browse your gallery with completely different user interface experience.

    |   Register   |   Friday, January 09, 2009   
Data Springs Product Forums...
Subject: Issues with Javascript onblur Functions
Prev Next
You are not authorized to post a reply.

Author Messages
Ben
Posts:9


03/11/2008 10:39 AM  

First, my system info. I'm running Dynamic Forms v02.30.20, on DotNetNuke v04.05.03.

I'm having an issue doing some very simple (IMO) user-friendly javascript enhancements to ease the use of my DynamicForms-powered webforms on a few of my portals. I'll mention one scenario for starters, and if someone's got a solution that'll work, I think I can handle tweaking the others as well.

Here's what I'm trying to do.

I have validation for telephone/fax numbers to require this specific format: (xxx) xxx-xxxx. To ease use, I have an onblur event to correct phone/fax numbers to match the validation.

The root problem I'm experiencing seems to be an issue in calling up the specific form fields into the array, using a document.forms.[fieldName] method.

The Problem:

Here's an example of the form in a testing environment: http://dev.ideas-now.com/WebsiteDevelopment/RequestaQuote/tabid/910/Default.aspx

The form loads with no js errors. The onblur event fires properly, but gives me this error:

missing ; before statement
http://dev.ideas-now.com/Portals/29/js/format-phone-website-quote-form.js
Line 12

Please take a look at the js script: http://dev.ideas-now.com/Portals/29/js/format-phone-website-quote-form.js

Now I'm making no claims to being a javascript or dnn expert. Hopefully though I've at least described this well enough to allow more experienced js/dnn folks an understanding of what I'm trying to do.

I'd appreciate someone/anyone looking into this and giving some input. Am I missing something simple in the syntax? I have used this outside of dnn in various platforms (html/asp.net/etc) with no issues. Or, is there a better way to go about doing this? At this point, I don't really care if my way is "right" or "wrong"...I just want the damn thing to work =)

Chad
Posts:2389
river guide
river guide

03/12/2008 2:15 PM  

Hi. Well yes previously (before Dynamic Forms 2.5) the onblur and javascript features were very limited with what it could do (only onblur for textbox field types, etc...). In the 2.5 release though there have been a number of new improvements to allow for things such as enabling it for 'onkeypress', referencing other fields within the javascript validation with simple tokens (i.e. $(DisplayName) = $(FirstName) + ' ' + $(LastName) etc...) These are all new to 2.5 though so running on the version you are I am not certain you are going to get the results you want. The 2.5 release also included options to include a custom javascript code directly within something you can specify or set from the administration page.

Umm... As far as calling other form fields I do know you can in 2.5 by referencing within your client side javascript:

$(ShortField) - Generates the document.getElementByID('Field).checked if its a checkbox or .value for other fields. This way you could use $(ShotField) = 'Test' and it will render Test.

$(ShortField_Field) - Generates the getelementbyID but not the .value or .checked. With this method you can then render or use the object as it is.

$(ShortField_FieldID) - This JUST returns the actual ID of the field. For example dnn_354_myfirstname etc... And does not render the document.getelementbyid or any other javascript at all, just the actual field name.

$(ShortField_ValueFieldID) - This is created only for checkbox lists as a seperate ID is created for the text/value of checkboxlists and this is how you reference this.

 

Included within the 2.5 default javascript file there are also several function calls already there to cover things such as calculating fields, required functions, generating things such as limited number of characters for a multi line textbox and other options. I encourage you to check out this client side events demonstration or this other demonstration whigh highlights calculating checkbox list.

 

I realize these don't directly answer your question or provide you a solution but it would be great to use a resources for your specific javascript needs.


-Chad

 

 

You are not authorized to post a reply.
Forums > Product Discussion - DotNetNuke Modules > Dynamic Forms > Issues with Javascript onblur Functions



ActiveForums 3.7

Copyright 2005 - 2009 by Data Springs, Inc.
Terms Of Use | Privacy Statement