Hi, I'm converting a website of mine to be used in mobile phone browsers. However, my websites uses a lot of <button> </button> tags and a lot of the following javascript: document.getElementById("something").value= "valueHere"; // to update a hidden input field document.forms["makepost"].submit(); // to submit forms My question is that is this much javascript okay on mobile browsers? Or do I need to use plain html to submit forms? Thanks
Hi JEET. It'd be ok I guess, for the former. But for the latter i.e. no I never do that either for mobiles / desktops. HTML doesn't need javascript to submit its own form right? Another thing about javascript in mobiles is the mouse. Remember that there's no mouse in mobiles Hendra
Oh, I need the document.forms because when the submit button is clicked, it updates a hidden input field, and then submits the form. I need this hidden value in the $_POST section of php on the next page. I hope this will work on mobile browsers like it does in desktop browsers. Can someone confirm this please? Or do I need to change the code? Thanks
Mobile browsers support mostly everything javascript (as long as the user hasn't turned it off to save data) so that shouldn't really be a problem.
Oh yeah! It works! But just check the website on mobile device as it is now All cool things in mobile websites are javascript mostly. Mobile websites differ mostly in sizing. check check check test test test