Scrolling page automatically

i have written following code in page content section in jQuery mobile, Whenever i tried to write anything in textbox, the page automatically scrolls up & down.that is my screen does not remain fixed on textbox in which i am writing it scrolls up and down. Please help, thanks.

<div data-role="content" class='content'>

   <div data-role="collapsible">
   <h3>Purchased Product</h3>
   <h5 id="list">
   <p1></p1>
   </h5>
   <hr/>
   <h4></h4>
   <hr/>
   </div> <!-- collapsible -->


  <div data-role="collapsible">

   <h3>Customer Information</h3> 

   <div data-role="fieldcontain">
    <label for="fname">First Name:</label>
    <input type="text" name="fname" id="fname" value=""  />
</div>  <!--fieldcontain  -->

<div data-role="fieldcontain">
    <label for="lname">Last Name:</label>
    <input type="text" name="lname" id="lname" value=""  />
</div>  <!--fieldcontain -->

<div data-role="fieldcontain">
<label for="address">Address :</label>
    <textarea name="address" id="address"></textarea>
</div>

<div data-role="fieldcontain">
    <label for="email">Email ID:</label>
    <input type="text" name="email" id="email" value=""  />
</div>  <!--fieldcontain -->


<div data-role="fieldcontain">
    <label for="pcode">Postal Code:</label>
    <input type="text" name="pcode" id="pcode" value=""  />
</div>  <!--fieldcontain  -->

     </div><!--collapsible -->   

<fieldset>
<a href="#page_dashboard" data-role="button" data-inline="true">Cancel</a>
   <form>
    <input type="submit" value="order" />
   </form> 
  <!-- <a href="#page_order" data-role="button" data-inline="true" id="button_order">Order</a>-->
</fieldset>
</div><!-- content -->

when i don't write <input type="submit" value="order" /> line in above code, my page doesn't scroll, but when i include this line, page starts scrolling why ??

Answers


$.mobile.silentScroll

$.mobile.silentScroll (method) Scroll to a particular Y position without triggering scroll event listeners. ยท Arguments: yPos (number, defaults to 0). Pass any number to scroll to that Y location. Examples:

//scroll to Y 100px
$.mobile.silentScroll(100);

Need Your Help

Why am I throwing a NullPointerException

java exception io

So it's winter break for colleges, and I'm trying to stay sharp on my coding, so I'm just writing code for programs and algorithms we only talked about but never coded in class. Anyway, one I'm wor...

Creating a plugin for Visual Studio

c# .net visual-studio plugins stylecop

I'm a fan of style cop but hate the way it dosn't have a more producticve way of resolving errors.