Dynamically Change Custom HTML Field
Last Post 04-01-2010 09:02 AM by t-bone. 6 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
BenUser is Offline
skipping stones
skipping stones
Posts:13
Avatar

--
06-18-2009 09:23 AM

    I am running Dynamic Forms 2.5, I came across a sample made for version 2.7, but I was hoping something similar can be done with 2.5

    I have some textbox's where the user will enter values ranging from 0 - 100.  I also have a Custom HTML Field where I want to display the sum of the 6 textboxes in question.  I think I have the javascript down for the actual calculation portion, but how to I access the innerHTML property of the Custom HTML Field?  I tried using the "Short Name", but the browser errors on the line stating that the object is not found.  Please help.

    Thanks in advance.  :-)

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

    --
    06-18-2009 09:37 AM
    For custom HTML field changes, go to the RTE, click on Source, and make sure it has an ID in html. Anotherwords, some where there should be ID = 'TotalSum'
    or something other name you want. Then access it in your javascript with:

    document.getElementById('TotalSum').innerHTML

    -- David
    BenUser is Offline
    skipping stones
    skipping stones
    Posts:13
    Avatar

    --
    06-18-2009 01:09 PM

    Oh I get it!  Ok, I created a DIV tag with an ID, it worked.

    Thanks!

    t-boneUser is Offline
    river guide
    river guide
    Posts:77
    Avatar

    --
    04-01-2010 08:45 AM
    Having an issue with this.. created html/text field..

    added
    Total:
    ..

    when i go to update using client side of radio button.. i get an internet explorer error "Object doesn't support this property or method"

    client side code:
    document.getElementByID('text').innerHTML = "Total: "+ $(txtTotal)

    t-boneUser is Offline
    river guide
    river guide
    Posts:77
    Avatar

    --
    04-01-2010 08:46 AM
    oops... "
    .." was left out above..
    t-boneUser is Offline
    river guide
    river guide
    Posts:77
    Avatar

    --
    04-01-2010 08:47 AM

    keeps rendering the div tag... i do have div ID = text in the source of my html/text field..

    t-boneUser is Offline
    river guide
    river guide
    Posts:77
    Avatar

    --
    04-01-2010 09:02 AM

    nevermind.. got it working.. must've fat fingered some keys.. works great!



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