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!

Hidden Field value not updating
Last Post 11-14-2012 12:48 PM by Ryan Bakerink. 8 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Steve KUser is Offline
going with the flow
going with the flow
Posts:49
Avatar

--
11-07-2012 09:17 AM
    Hi,

    I am trying to set the value of a hidden field to true or false base on whether or not a text box contains an empty sting.

    This is what I have:
    Textbox with short name Degree
    Hidden Field with short name of Show
    Both the textbox’s client side event, and the modules initial java script contain the following code:
    if ($(Degree) != '')
    {$(Show) = 'True'}
    else
    {$(Show) = 'False'};


    This is not working for me.  When I hover over the hidden field icon the tool tip displays “Value:”.  Thinking that I might have an error in my java script, and to better troubleshoot my problem, I changed the Show hidden field type to text box.  The above java script works perfectly with a text box.  When the page loads the Show text box displays false.  If I add text to the Degree text box, the Show textbox updates to true, and deleting text from the box updates the Show textbox to false.  However changing the Show  field type back to Hidden Field results in the value once again not updating, and I am left with ”Value:”

    Any ideas?
    4.2.0.1 / 6.2.4
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    11-08-2012 10:54 AM
    Hello,

    I believe that Dynamic Registration has a bug in displaying the value of hidden fields. However the value should reside inside of the Hidden field.

    Say that the Question name you gave this hidden field was "HiddenField Name" and the moduleID = 333.

    Then go to Host -> SQL and execute this statement:

    Select DynamicQuestionID from DynamicRegistration_Question where ModuleID = 333 and Question = 'HiddenFieldName'

    Copy the ID returned. Now go back to the page with this Dynamic Registration instance on it. View the Page Source and perform CTRL + F to search through the source. Paste the DynamicQuestionID into the Search Bar and locate this hidden field. You should see a Value="TheValue" attribute to this control.

    Please let me know if you see the value you're expecting.

    Summary is, the value is being stored correctly, however the display on the Registration form isn't showing the reflective value.

    Thanks,

    Ryan

    Steve KUser is Offline
    going with the flow
    going with the flow
    Posts:49
    Avatar

    --
    11-08-2012 11:32 AM

    Ryan,

    I do understand what you are saying, but that is not quite correct.

    1) Since yesterday, the control did start showing the value of 'False" from the initial bind (not sure why.)
    2) In the event that what you say is true, logic would dictate that the question event should then be working correctly and displaying the hidden field (assuming I programmed it correctly which I believe that I have.)
    3) I just did what you asked, and even after putting data into the Degree text box, and clicking out of it, in the source code the value = 'False' when it should now be True.

    I have modified my javascript for both the Degree textbox control and the initial javascript to:
    if ($(Degree) != '')
    {$(Show) = 'True'; $(Test) = 'True';}
    else
    {$(Show) = 'False'; $(Test) = 'False';};

    I have both a test text box called Test and the hidden field called Show on my form.

    The Test text box both loads correctly and updates correctly.  The Show hidden field control loads correctly, but will not update upon adding text to the degree text box, and clicking out of it.

    From my perspective, the hidden field control is just not updating like the text box control is using the same script.

    Steve

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    11-08-2012 12:21 PM
    It sounds like the Postback / Question event is causing the page to reload, and I've seen issues before where Initial JavaScript is ignored after a Postback.

    It sounds like you've fallen victim to this scenario. DR doesn't have an Initial Bind feature, are you referring to the SQL Driven Default Value?

    You stated that you're on DR 4.2.0. You should download the latest patch and see if this fixes your issue:
    Latest patch is DR 4.2.2.

    You can download this from store.dotnetnuke.com after logging into your registered account and visiting your Downloads. You should see DR 4.2.2 available to you.

    Download, install, and let me know if you have any questions.

    Thanks,

    Ryan


    -Ryan
    Steve KUser is Offline
    going with the flow
    going with the flow
    Posts:49
    Avatar

    --
    11-08-2012 01:10 PM

    It sounds like the Postback / Question event is causing the page to reload, and I've seen issues before where Initial JavaScript is ignored after a Postback. 


    DR doesn't have an Initial Bind feature, are you referring to the SQL Driven Default Value? 



    If that were the case wouldn't the Test text box control that I placed on the page respond the same way as the hidden field control, instead or working correctly as it does?

    By Initial Bind, I meant to say Initial JavaScript. Too many simularities between DR and DF, my mistake.

    I thought I did have the latest version, as I just checked recently, but I may have missed that update.  I will download and give it a go to see if that fixes things.

    Thanks Ryan.

    Steve KUser is Offline
    going with the flow
    going with the flow
    Posts:49
    Avatar

    --
    11-08-2012 01:42 PM

    Running - 4.20.20.0 / 6.2.4v
    Still not feeling the love!

    It appears like the last three issues one with DF, one with DV and now this one with DR all appear to have (to me anyway) a common thread. It is like  the latest Dynamic F-V-R versions with DNN version 6.2.2 and up have an issue with caching.  Specifically either not updating the cache, or releasing the cache too soon.

    Does DataSprings have any recommendations on cache settings for IIS7.5, DNN 6.2.x core and module specific levels?

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    11-09-2012 05:23 AM
    Hello Steve,

    Unfortunately I don't have the best professional advice on which Cache Settings are best for the environment variables that you've inquired.

    However, I am willing to bet that one of the following is your issue:

    1.) Your Initial JavaScript - JavaScript is causing issues.
    2.) A Question Event is firing thus the value is being lost from the Initial JavaScript assignment.

    Have you tried placing a TRY CATCH around your JavaScript appropriately?

    -Ryan
    Steve KUser is Offline
    going with the flow
    going with the flow
    Posts:49
    Avatar

    --
    11-09-2012 01:58 PM
    1.) Your Initial JavaScript - JavaScript is causing issues. 2.) A Question Event is firing thus the value is being lost from the Initial JavaScript assignment


    1) Removed all JavaScript from module's Initial JavaScript setting - Still not working.
    2) With all JavaScript still removed, I removed all other control's client side events, and all Question Events. - Still does not work.
    3) Isn't #2 the whole point of this problem. I need to make a hidden text box visible based on if another text box contains data or not. The only way to due this is to use a hidden field in conjuction with a Question Event.

    I will look into a Try Catch, but based on what I have seen so far, I don't think it will work, but I am willing to try.
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    11-14-2012 12:48 PM
    Hello Steve,

    Try placing the Form in Debug mode as well so you can see what JavaScript is being rendered behind the scenes.

    Something recently changed. A simple JavaScript statement:

    if ($(Degree) != '')
    {$(Show) = 'True'; $(Test) = 'True';}
    else
    {$(Show) = 'False'; $(Test) = 'False';};

    Like above shouldn't change all of a sudden once it was already working. Did you just add a new module to the page?

    Another Debugging approach you can take is to download FireBug plugin for FireFox. You'll be able to inspect all and any errors that are occurring on the page. The logged errors will prove helpful with locating the errors on the page.

    Thanks.

    Ryan
    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