SMThemes Support » Photography
need to reload page for form to work
11 years ago
DesLaw
Member
Hi,
I have added some script to the top.php in order to run a form. The form does work but only after the page has been refreshed. I have deactivated all the plugins and the problem is still there - in IE10,Firefox, Chrome & Opera. Your help would be greatly appreciated. The page in question is http://www.pro-holistic.co.uk/on-line-stress-level-evaluation/ The added script is: - <script type='text/javascript'> // updatepage(); $(document).ready(function() { $('#btnStressTestSubmit').click(function() { var totalChecked=$('[name="chkChoice"]:checked').length; if(totalChecked<=7){ ShowResults(1); } if(totalChecked>=8 && totalChecked<=14){ ShowResults(2); } if(totalChecked>=15 && totalChecked<=21){ ShowResults(3); } if(totalChecked>=22){ ShowResults(4); } }); function ShowResults(resultPanelNumber){ $('#questionPanel').hide(); $(document).scrollTop(220); $('#result_'+resultPanelNumber).show(); } }); </script> |
11 years ago
DesLaw
Member
I have found how to stop this from happening but it is really not a proper fix. I have disabled "Load Content Dynamically" and the form works first time, every time.
Is there a proper fix for this where I can still have content loading dynamically and have the form work properly? |
Leave a reply
Search by forum
SMThemes.com Support
-
Categories
- Framework
- Themes
- Affiliate Company
- Sponsorship Useful pages
- How to start using our themes
- Contacts