Question Events vs Client Side Events
Last Post 06-22-2011 12:53 PM by Chad Nash. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages Resolved
jeremycloseUser is Offline
skipping stones
skipping stones
Posts:8
Avatar

--
06-21-2011 12:11 PM
    Ok, I am trying to make a form using Question Events and Client Side Events at the same time. I am having a little trouble getting this to trigger properly.

    Here is the basic layout of the form:

    • Select Event [dropdown with event1,event2,non-event] (Price of event is set as Value of the event)
    • Number of guests [1,2,3,4,5,6,7,8] (Appears as question event result from Select Event, also triggers new form fields via question event)
    • Additional Cost [Numeric Text Field]
    • Cost [Read only text field] (Should get the value based on (SelectEvent*NumberofGuests)+AdditionalCost)

    I have looked through all the Form Demos and can't seem to work out all the client side event script to get the total. It looks to me as if since I have the question events, that the client events aren't triggering properly since the page reloads.

    Any help on this would be great.

    I am using DNN 5.6.2 and Dynamic Forms 3.4.5

    Thanks,
    Jeremy
    Don GeeUser is Offline
    river guide
    river guide
    Posts:273
    Avatar

    --
    06-22-2011 10:16 AM
    Hi Jeremy,
    From above what seems like is working is the question events. That means that 'Select Event' is set up as the Initiation/Postback question and your other fields are hidden and will display as you want. The client side event that produces the total is where you are having trouble. Since you think the Question Events part is causing problem what you can try is to disable the hidden fields setup and see if the client side calculation then works.

    The other and probably best option is to set up your sample on www.betasprings.com by your logging in there with host,dnnhost and make a copy of what you have in a Dynamic Form sample. Then we can look at it and see what you have going on. If you do this then place another post reply here as to what is your sample. Call it something like jeremyclose problem. Then we can look at your situation better.
    Thanks
    jeremycloseUser is Offline
    skipping stones
    skipping stones
    Posts:8
    Avatar

    --
    06-22-2011 12:05 PM
    Don,

    Thanks for the response. I did end up getting this worked out, but I had to disable some of the question events to do so. They weren't really necessary anyway.

    I think it was just a timing issue, but it may have been bad client side event math, too. I've never been very good at javascript...

    I'll keep the betasprings site in mind for future issues.

    Thanks,
    Jeremy
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    06-22-2011 12:53 PM
    Hi Jeremy,

    I would check out demo 21 I believe... But in general, anytime a 'postback' occurs such as if a question event fires, or if the user clicks submit and then the validation fails, the client side events will be lost.

    How do you get around this? Anything you want to be calculated via a client side event also needs to be placed in the 'Initial JavaScript' area within the module configuration. This is needed in order to make sure that for any postback the client side events still fire.

    Thanks!

    -Chad


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