2

my code is like this :

<div data-role="page" id="LoginPage">

    <div data-role="header">
        <p style="text-align:right;">Welcome</p>
    </div>

    <div data-role="main" class="ui-content">
        <center><img src="taybe.png" style="width:80%; height:80%;" /></center>
        <p style="text-align:right;">ID NUMBER</p>
        <input type="number" id="UserIDTXT"/>
        <p id="IDnote" style="text-align:right;color:red;"></p>
        <p style="text-align:right;">PASS</p>
        <input type="password" id="UserPassTXT"/>
        <p id="Passnote" style="text-align:right;color:red;"></p>
        <table style="width:100%;">
            <tr >
                <td style="width:45%; height:80%;"><input type="button" value="Login" onclick="checkDetails()" /></td>
                <td style="width:45%; height:80%;"><input type="button" value="Visitor" /></td>
            </tr>
        </table>
        <input style="width:100%; height:10%;" type="button" value="Register" />
    </div>

    <div data-role="footer">

    </div>
</div>

and here is the homepage that i want to open if for example my id is 1234 and password is 123123123

<div data-role="page" id="HomePage">

    <div data-role="header" data-tap-toggle="true" data-theme='b'>
    Here is the homepage
    </div>

</div>

what i need to write to access the homepage in checkDetails fucntion ?

if (($("#UserIDTXT").val() == "3164") && ($("#UserPassTXT").val()) == "12345678")
{
     /*what i need to type here ???*/
}
Karam Haj
  • 1,080
  • 2
  • 9
  • 20

1 Answers1

-1

Simply,

 $('#LoginPage').hide(function(){
   $('#HomePage').show();
 })
serdar.sanri
  • 2,217
  • 1
  • 17
  • 21