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!

ComboBox and Client Side Events
Last Post 09-03-2008 12:00 PM by Nicole Wright. 14 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Scott CarmodyUser is Offline
wading in the water
wading in the water
Posts:17
Avatar

--
08-07-2008 05: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 NashUser is Offline
    Posts:5260
    Avatar

    --
    08-07-2008 12: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 NashUser is Offline
    Posts:5260
    Avatar

    --
    08-07-2008 12: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 NashUser is Offline
    Posts:5260
    Avatar

    --
    08-07-2008 12: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 CarmodyUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    08-07-2008 12: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 CarmodyUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    08-07-2008 05: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 NashUser is Offline
    Posts:5260
    Avatar

    --
    08-07-2008 08: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 CarmodyUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    08-08-2008 04: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 NashUser is Offline
    Posts:5260
    Avatar

    --
    08-08-2008 08: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 rendered 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 CarmodyUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    08-08-2008 09:07 AM

    Chad,

    The BetaSprings example you refer to does not involve Question Events. It was simply totaling up the results 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 NashUser is Offline
    Posts:5260
    Avatar

    --
    08-08-2008 09: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 CarmodyUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    08-11-2008 03: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 WrightUser is Offline
    new to the springs
    new to the springs
    Posts:2
    Avatar

    --
    09-02-2008 09:42 AM
    Has this issue been addressed? I am having the same issue.
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    09-02-2008 11:24 AM
    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 WrightUser is Offline
    new to the springs
    new to the springs
    Posts:2
    Avatar

    --
    09-03-2008 12: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.


     
     

    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