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!

Demonstration 20 - Radio Buttons
Last Post 05-14-2010 12:36 PM by Chuck. 12 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Dan C.User is Offline
river guide
river guide
Posts:82
Avatar

--
05-01-2010 07:21 PM

    Please post a working copy of Demonstration 20 on beta.datasprings.

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

    --
    05-03-2010 09:57 AM
    DONE. Please check out:

    http://www.betasprings.com/Dynamic-...fault.aspx

    -- David
    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    05-04-2010 01:07 AM
    I have looked at the link above and I am comparing it to the version I downloaded from the demonstration page. There are subtle differences in the java script but I can't figure out why it still doesn't work when I copy over the java script for the radio buttons.

    I downloaded the xml from the above link and loaded on a fresh page and it doesn't function either.
    What is missing?
    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    05-04-2010 01:50 AM

    There is some critical piece I am missing no matter how many times I re-read the demo page.  I have added a sub-page to the link supplied above, added DF module; imported the xml that was previously exported from the demo 20 orginally posted above and I am unsuccessful at getting it to function.

    Your guidance is greatly appreciated.

    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    05-04-2010 02:19 AM

    I am hoping that others find this useful as it helps to unlock the inital use of the radio buttons. I don't understand why the solution isn't included in the default java script file that is initally loaded with the module.

    However, in comparing the java script file provided with the link above and the export/import of it in a test page I realized the differences under the section regarding the 'radio buttons':

    *****begin of totaling (working) Java Script file****

    function funcRadioCalc(RadioName)

    {
    var chkList1= document.getElementById (RadioName);
    var arrayOfCheckBoxes= chkList1.getElementsByTagName("input");
    for(var i=0;i {

    if (arrayOfCheckBoxes.checked) {
    return arrayOfCheckBoxes.value;
    }
    }
    }

    function fucRadioCalc(RadioName)

    {
    var chkList1= document.getElementById (RadioName);
    var arrayOfCheckBoxes= chkList1.getElementsByTagName("input");
    for(var i=0;i {

    if (arrayOfCheckBoxes.checked) {
    return arrayOfCheckBoxes.value;
    }
    }
    }
     

    ****end****

    ***VERSUS***

    ***begin of non-totaling, default Java Script file***

    function funcRadioCalc(RadioName)

    {
    var chkList1= document.getElementById (RadioName);
    var arrayOfCheckBoxes= chkList1.getElementsByTagName("input");
    for(var i=0;i {

    if (arrayOfCheckBoxes.checked) {
    return arrayOfCheckBoxes.value;
    }
    }
    }

    ****end****

    Again, why wouldn't this be included as the radio buttons won't sub-total without it?

    Furthermore, the Demonstration 20 page states only to review "...please visit the Module Configuration and go down to Custom Javascript File and take a look at the Initial Javascript." It doesn't state anyting about reviewing the Java Script file contents itself.

    I realize this is a bit nit-picky, but so is this module and the technical features it offers.
    This post isn't meant as a critisizim, just voicing my humble opinion for your thoughtful consideration in the future to help make more raging fans.

    Thanks,
    Dan

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

    --
    05-04-2010 06:51 AM
    HI, you are correct in your criticism. Here's the problem. The javascript file contains predefined functions. Any custom functions you add to it won't hold on an export / import of the XML file. It does contain the radio button function "funcradiocalc". The problem was that when demo 20 was done (and it calls a lot of the radio button calculation, the person that wrote it called the function "fucradiocalc" which didn't exist in the the javascript file so instead of changing all the javascript areas to be named "funcradiocalc", he/she simply copied and pasted the "funcradiocalc" and renamed it "fucradiocalc". So Demo 20 works because of this but when someone export/import, that function doesn't carry over.

    That's why I recommend using Firefox with Firebug because it will show right away that that function is not defined and you simply copy / paste the function in the javascript. I hope this explains the situation better. -- David
    ChuckUser is Offline
    river guide
    river guide
    Posts:157
    Avatar

    --
    05-04-2010 11:39 AM

    Today, I downloaded the sample of Demo 20 on your site and for awhile I couldnt get it working.  But after piecing several followup posts in the comment area of the demo sample page, I wanted to add another comment.

     

    The funcradiocalc seems to be fine on my download.  The issue I had was a piece of the Client Side Event syntax was missing.

     

    Anywhere it references an innerHTMLIDName.innerHTML code, you have to add a document.getElementById to it

     

    e.g. 
    Total.innerHTML = 'Your total comes to:  ' + '$' + funcRadioCalc($(Plans_FieldID)) + '';

     

    Should be:
    document.getElementById('Total').innerHTML = 'Your total comes to:  ' + '$' + funcRadioCalc($(Plans_FieldID)) + '';

    So go through each Client Side event of each question that has a total and add the appropriate reference.

    -Chuck

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

    --
    05-04-2010 12:02 PM
    HI everyone, we just recently fixed the XML download to use the "funcradiocalc" in the javascript as opposed to the "fucradiocalc" javascript. However, as Chuck mentioned, the "document.getElementById" still got left out. However, I don't know when but previously, it wasn't necessary to include that statement in and the forms still work on all the browsers. Perhaps some standard in HTML forced the inclusion of that statement in the newer browser releases. -- DAvid
    ChuckUser is Offline
    river guide
    river guide
    Posts:157
    Avatar

    --
    05-04-2010 12:15 PM

    Thanks David for the followup.

    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    05-05-2010 09:37 AM
    I have uploaded the form I wish to use this radio button functionality. I would appreciate anyones help in getting me started. There are several questions, all with radio buttons. The subtotals are not necessary, but I thought it would be easier then trying to get them all done at once. Just getting the first question to total would be a great start to be able to repeat.

    http://www.betasprings.com/Dynamic-...fault.aspx

    Thanks,
    Dan
    ChuckUser is Offline
    river guide
    river guide
    Posts:157
    Avatar

    --
    05-05-2010 12:05 PM
    Posted By Dan Cowan on 05/05/2010 11:37 AM
    I have uploaded the form I wish to use this radio button functionality. I would appreciate anyones help in getting me started. There are several questions, all with radio buttons. The subtotals are not necessary, but I thought it would be easier then trying to get them all done at once. Just getting the first question to total would be a great start to be able to repeat.

    http://www.betasprings.com/Dynamic-...fault.aspx

    Thanks,
    Dan


    Hi Dan,

    I modified the code so it would work for the first two radio session options e.g. Session I and Session II

    This is what I did to change your code.

    1. Initially, the 'Session I' shortname had an extra space following the 'I'.  I removed that.  I believe that causes a problem.
    2. I renamed the 'Session I' to ''SessionI' (FYI, Its my preference)
    3. You had a shortname for $(Session1_Total), which I believe is suppose to be a hidden value to store the value of 'SessionI' but it did not exist.   I created one instead called 'hidden_SessionI'
    4. In your hidden value for HiddenGrandTotal, you had a variable called 'TotalExtraonkeypress' which does not exist in your form, so I removed that.
    5. The HiddenGrandTotal now includes the sum of the 'hidden_SessionI' and 'hidden_SessionII'
    6. I removed the { and } in the client side event formula, but I am not really sure what the purpose of it

    Note:  Keep in mind for the Grand Totals and Hidden Grand Totals.  To get the value for it the 'User' must select an option in 'Session I' and 'Session II' or you wont get a correct total.  It will stay as Zero.  So if its required to select an option in each radio button selection, make sure there is a validation for it.  Also for now, the hidden_SessionI and hidden_SessionII are text boxes, you should change them to hidden.

    Hope this helps.  Maybe the DS staff can chime it also.

     

    -Chuck

    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    05-12-2010 01:17 AM
    Chuck - Thank YOU!

    What a great assistance. I apologize for the mess I submitted as I was trying to change everything to get anything to work. However you made it work and taught me many things and I am extremely appreciative.

    I wanted to update this post with my progress and ultimate refinements. The question subtotals were ultimately meant to be the hidden fields and with the additional hidden fields they became unnecessary. I only used the subtotals and hidden fields because it mimicked the demonstration design. Therefore these fields were removed and the client-side java script piece was removed also.

    One enhancement that I discovered was to set the hidden subtotals default values to zero. Why? I was concerned that the users would struggle to have to fill out all of the fields to generate a grand total. Sure each field could be required and the users could select the 'None' option and the default of 'None' = zero, but it still wouldn’t' pass the value of zero until the user clicks a second time on the 'None' option. Weird, but true and ultimately messy.

    By setting the default value of the hidden subtotal to zero it allowed the Grand Total to be updated without having to select an answer for each question. I think this is a great technique I will be employing in many future forms.

    Hope others find this useful also. Thanks again - Dan
    ChuckUser is Offline
    river guide
    river guide
    Posts:157
    Avatar

    --
    05-14-2010 12:36 PM

    Dan, I just wanted to say thanks to you too for getting a sample demo fom staff to post in the betsprings site for me to view and to utilize your sample form to work it through.  It was a learning process for me.  Glad you understood my notes.

    -Chuck

    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