unable to set hidden field content from div html content on fullscreen iPad Mobile Safari -


thanks spending time read this

i have form call js function copy html content of div hidden form field can submit form. works fine on desktop webkit broswers , on mobile safari on ipad. when run application in fullscreen mode (by saving shortcut on home screen), not work.

here's code

js function:

function update_script_in()//copies scripts , submits form {     $("#script_in").html($("#scriptcontent").html());     $('#resiform').submit(); } 

form submission:

<input type=submit value="submit" onclick="update_script_in()"> 

thanks help

this quite old, after googling around solve same issue me, have not found solution. looks weird behaviour ipad (easily reproducible, no way fix, @ least found): target input field gets changed indeed, posted value original 1 (???)

so in case workaround useful somebody, instead of applying changes contenteditable div on form submit, apply changes whenever div changed (no on change event contenteditable divs, done on blur event):

<div id="editor_inline_core_body" class="inputbox editor-inline" contenteditable>[initial value here]</div> <input type="hidden" id="jform_core_body" name="jform[core_body]" value="[ initial value here]" /> <script>         jquery('#editor_inline_core_body').blur(function() {         var value = jquery('#editor_inline_core_body').html();         jquery('#jform_core_body').val(value);         return true;     }); </script> 

less efficient, @ least works. if want bit more of efficiency, can check old , new values using focus event, @ least not think big deal or worth added complexity.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -