Recently Viewed...
DNN Modules
SnowCovered Top Sellers

Live Content uses Web 2.0 approach to provide a Rich User Interface and streamlines content presentation by overlaying content on current page. Overlay images, videos, audio, text/html content, flash, dotnetnuke modules, and external content. Experience the demo...

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!

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.

'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

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.

In this day and age, knowing as much detailed information as possible about your customer, prospect or web site user is essential. Thankfully, the new 'Dynamics Forms' module from Data Springs, makes it easier than ever to segment your data collection efforts.

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.

Capture your users attention, enrich your site with multimedia flash, and create and opt in distribution list for your DNN site. These are just a few of the many features the Data Springs Module Collection can provide you.

The Catalyst skins are professionally designed, coded and packaged by a team of DotNetNuke experts. The skins are available in 12 great colours. This skin is easily customisable with our unique DrNuke EasyMod technology. Try our demo!

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 . . .

    |   Register   |   Thursday, December 04, 2008   
Data Springs Product Forums...
Subject: ComboBox and Client Side Events
Prev Next
You are not authorized to post a reply.

Author Messages
Scott
Posts:18
wading in the water
wading in the water

08/07/2008 7:23 AM  

On my form I have had a ComboBox field and a Text/HTML field. I just put a regular TextBox (shortname is called YourTotal) on my form as well and used a Client Side Event to populate it. Because of the PostBack issue I also put the same code in the Initial JavaScript area in Module Configuration. The TextBox does not seem to populate after the ComboBox selection. Here is a portion of the Client Side Event:

if ($(Venues) == 'SEP07')
{
Total.innerHTML = 'Your total comes to:  $' + 40.00 + '';
$(YourTotal) = '40';
}

Any ideas why this won't work? The Text/HTML field called Total does populate but the regular TextBox does not. I have tried it with and without the quotes on the 40 but it still shows as empty. I'm a newbie to Javascript so maybe I am doing something wrong.

Scott

Chad
Posts:2271
river guide
river guide

08/07/2008 2:14 PM  
Scott,

Hi. A few things... 1. If you are a newbie to Javascript I would for sure get FireFox FireBug, this is a very useful tool so that you can quickly test javascript and debug javascript with detailed errors etc...

As far as this, hmmm... Is the textbox a read only field or anything? There are plenty of examples on Beta Springs of client side events setting textbox properties so you might check there, additionally does it set the value properly BEFORE the postback/question event?

-Chad
Chad
Posts:2271
river guide
river guide

08/07/2008 2:15 PM  
Also... If your site is http://www.yoursite.com/default.aspx please add?Debug=True (when signed in as the admin) this should put the module in Debug mode and should spit out the EXACT client side event / javascript that is being rendered. This should also help in debugging the problem.

-Chad
Chad
Posts:2271
river guide
river guide

08/07/2008 2:21 PM  

One more note.... Please review this Beta Springs example (you can login as host/dnnhost) which outlines calculating combo box fields via client side events.


This is not exactly what you are looking for, but it is using a combo box client side event to populate the text within a textbox field.

 

-Chad

      

Scott
Posts:18
wading in the water
wading in the water

08/07/2008 2:21 PM  

Thanks Chad. I will try your suggestions. The TextBox field is NOT ReadOnly. It has the defaults just as it was initially brought onto the form. I am using the same code in both the ComboBox Client Side Event  AND in the Initial JavaScript area so it is being set in both places. After the PostBack however there is nothing in the TextBox.

Scott

Scott
Posts:18
wading in the water
wading in the water

08/07/2008 7:09 PM  

OK...I modified my form on BetaSprings called "Scott's ComboBox and Question Event form" and was able to get it working as desired. The TextBox populates correctly right away and stays that way after the PostBack.

When I exported that module and imported it into my website..it failed to work. Just like I have been experiencing - the Text/HTML field populates but the TextBox does not.

I notice you are running the new version of Dynamic Forms on BetaSprings. Do you think that could be it? If so..when do you think you will have that version ready or at least have a Service Pack for ver 2.6 that will address this issue? It's rather an urgent need for me now.

Scott

Chad
Posts:2271
river guide
river guide

08/07/2008 10:39 PM  
Scott,

Let me explain one thing that might be causing this in the 2.6 release. There are two initial settings that get set whenever you first go into manage questions / settings. These settings are that the javascript file initially gets saved and that the stylesheet gets saved (and even with IPORTABLE if you have a custom javascript file/custom stylesheet those do not support IPORTABLE at this time). So, there is a setting that determines that they have not been saved and will save them.

Then... When the module IPORTABLE import file is imported, the setting is also imported showing that the Javascript file and Stylesheet have already been saved... and therefore, the file is not saved again the first time you go to manage questions and settings. We have changed this to ignore these settings for export/import, however for now what you probably need to go is go back into the recently imported module instance and choose to manually save the javascript file. You might be calling function calls (or doing other javascript/client side related events that rely on that file) and you need to save it at least one time before the module will include it when rendering.

-Chad
Scott
Posts:18
wading in the water
wading in the water

08/08/2008 6:09 AM  

Chad,

Can you tell me what these settings specifically are? I have gone into Module Configuration but did not seem to see anything related to that.

Also on my site the TextBox never gets populated - even before the PostBack. Doesn't the JavaCript file only get initiated when the PostBack happens?

Scott

Chad
Posts:2271
river guide
river guide

08/08/2008 10:50 AM  
Scott,

Hi. A couple things...
1. Anything you might have done over the last 24 hours is probably still not there, we recently updated and refreshed the site as its now on a much faster dedicated server for faster performance (very slow before). The site has also been upgraded to 4.8.3.

2. What I am referring to is under Module Configuration, Custom Javascript File, and then Javascript File. You need to click 'Save Javascript File'. Its hard to explain but the bottom line is that this is completed automatically for new forms for you, however when you use IPORTABLE it wasn't automatically saving the javascript file because the 'setting' that was exported/imported was telling the module that it already did that.

So, I would make sure this is saved and then I would click F5, refresh on your page after you have updated the javascript file/exited out of the manage questions and settings area. Additionally, if nothing is getting generated, keep in mind this is just javascript so you can always click 'View Source' to see what javascript is being rendered on the field, or you can add ?Debug=True to the querystring when you load the page and it will automatically show the exact javascript that is being rendred to the page. This should help you in identifying what is causing the problem.

3. I would get FireFox FireBug for testing client side events. If there are any errors in your javascript this quick little FireFox add in will help to show exactly what the error is.

As far as patch for 2.6/2.7 release, I don't think it should be necessary for this issue. The combo box demonstration/example on beta springs that I showed you was actually working great for both 2.5 and 2.6 so it shouldn't be any problems, just make sure if you are using IPORTABLE you go in and save the javascript file if you are using any function calls from that file.

Thanks,

Chad
Scott
Posts:18
wading in the water
wading in the water

08/08/2008 11:07 AM  

Chad,

The BetaSprings example you refer to does not involve Question Events. It was simply totaling up the reults of ComboBox selections via Client Side Events (i.e. no Initial JavaScript). My example involves Question Events. On the example that I put up on BetaSprings last night I was using the exact same JavaScript code for the Client Side Event and the Initial JavaScript that I have on my site..and it was working on BetaSprings.  I have been clicking the Save JavaScript button as I have been testing so I am pretty confident that there is not a problem with the JavaScript. Actually the Text/HTML gets updated and that is done through the JavaScript. AND both parts were working on BetaSprings as I said.

It just seems to me like a version incompatibility.

Scott

Chad
Posts:2271
river guide
river guide

08/08/2008 11:33 AM  
Scott,

In that case if you add &Debug=True to the page (when loading it) what javascript does it show its rendering?

You can also open a support ticket for this and we will sign in and look at it, as far as I know there were no major changes in client side events between 2.6 and 2.7 except for a new feature to have client side event firing for submission clicked.

-Chad
Scott
Posts:18
wading in the water
wading in the water

08/11/2008 5:53 PM  

Chad,

Here is the JavaScript it shows when I set debug to True. It appears to be following the logic I want. It is just not getting set.

Client Side Event:if (document.getElementById('dnn_ctr655_DynamicForms_Responses_aef67dc4-3af9-4318-b616-480ec5832e6d').value == 'AUG25') { Total.innerHTML = 'Your total comes to: $' + 40.00 + ''; $(YourTotal) = 40.00; } if (document.getElementById('dnn_ctr655_DynamicForms_Responses_aef67dc4-3af9-4318-b616-480ec5832e6d').value == 'SEP07') { Total.innerHTML = 'Your total comes to: $' + 40.00 + ''; $(YourTotal) = 40.00; } ;

Initial Javascript:if (document.getElementById('dnn_ctr655_DynamicForms_Responses_aef67dc4-3af9-4318-b616-480ec5832e6d').value == 'AUG25') { Total.innerHTML = 'Your total comes to: $' + 40.00 + ''; $(YourTotal) = 40.00; } if (document.getElementById('dnn_ctr655_DynamicForms_Responses_aef67dc4-3af9-4318-b616-480ec5832e6d').value == 'SEP07') { Total.innerHTML = 'Your total comes to: $' + 40.00 + ''; $(YourTotal) = 40.00; } ;
***DYNAMIC FORMS DEBUG MODE ON***
Client Side Event:if (document.getElementById('dnn_ctr687_DynamicForms_Responses_4198e261-a8bc-42c1-a9a7-cb82698a9737').value == 'JUL13') { Total.innerHTML = 'Your total comes to: $' + 50.00 + ''; $(YourTotal) = 50; } if (document.getElementById('dnn_ctr687_DynamicForms_Responses_4198e261-a8bc-42c1-a9a7-cb82698a9737').value == 'AUG09') { Total.innerHTML = 'Your total comes to: $' + 35.00 + ''; $(YourTotal) = 35; } if (document.getElementById('dnn_ctr687_DynamicForms_Responses_4198e261-a8bc-42c1-a9a7-cb82698a9737').value == 'AUG16') { Total.innerHTML = 'Your total comes to: $' + 40.00 + ''; $(YourTotal) = 40; };

Initial Javascript:if (document.getElementById('dnn_ctr687_DynamicForms_Responses_4198e261-a8bc-42c1-a9a7-cb82698a9737').value == 'JUL13') { Total.innerHTML = 'Your total comes to: $' + 50.00 + ''; $(YourTotal) = 50; } if (document.getElementById('dnn_ctr687_DynamicForms_Responses_4198e261-a8bc-42c1-a9a7-cb82698a9737').value == 'AUG09') { Total.innerHTML = 'Your total comes to: $' + 35.00 + ''; $(YourTotal) = 35; } if (document.getElementById('dnn_ctr687_DynamicForms_Responses_4198e261-a8bc-42c1-a9a7-cb82698a9737').value == 'AUG16') { Total.innerHTML = 'Your total comes to: $' + 40.00 + ''; $(YourTotal) = 40; };

Nicole
Posts:2
new to the springs
new to the springs

09/02/2008 11:42 AM  
Has this issue been addressed? I am having the same issue.
Chad
Posts:2271
river guide
river guide

09/02/2008 1:24 PM  
Nicole,

There are a few specific topics covered on here... Can you be more specific on exactly what is happening here? I think in Scotts case it might have even required the 2.7 release. Is this something you can duplicate on www.betasprings.com (login as host/dnnhost)? What version are you running on?

-Chad
Nicole
Posts:2
new to the springs
new to the springs

09/03/2008 2:00 PM  
I'm running 2.7. I think I figured out what the issue was. I was trying to save data to another field by using the client side event but since the textbox was set to 'Read Only' when the page posted back the data was disappearing. I just decided to go in another direction with the form.
You are not authorized to post a reply.
Forums > Product Discussion - DotNetNuke Modules > Dynamic Forms > ComboBox and Client Side Events



ActiveForums 3.7

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