The problem is not iui.showPageById, which works great even in your case.
What's goofy here is href="#", who asks iUI to go nowhere. Rather than staying 
at the same spot, it goes on default screen. Which is #home for you. (agree it 
sounds like a bug to me too)

Solution 1
Replace href="#" by href="javascript:;"

Solution 2
Remove. onclick & replace href="#" by href="javascript:loginUser();"


Remi

On 25 sept. 2012, at 02:10 AM, Katrina <[email protected]> wrote:

> Hi,
> By searching the archives I did discover showPageById but it doesn't seem to 
> be working for me.
> 
> 
> HTML*************************************************************************
> 
> <div id="home" class="panel" selected="true" title="TEST">
>   <h2>TEST - Get Cash!</h2>  
>   <ul>
>     <li><a href="#login">Login</a></li>
>     <li><a href="#register">Register</a></li>
>   </ul>
> 
> </div>  
> 
> 
> <div id="login" class="panel">
>     <h2>Login into TEST</h2> 
>         <fieldset>
>             <div class="row">
>                 <label>Email</label><input type="text" name="emailaddress" 
> value=""/>
>             </div>
>             <div class="row">
>                 <label>Password</label><input type="password" name="password" 
> value=""/>
>             </div>
>            <a class="btn-blue bt-big" type="button" href="#" 
> onclick="loginUser();return false;">Login</a>
>         </fieldset>
> </div>  
> 
>  
>  <div id="main" class="panel"  title="TEST">
>    <h2>TEST - Get Cash!</h2>
>          <fieldset>
>             <div class="row">
>                 <label>Hi user, </label>
>             </div>
>             <div class="row">
>                 <label>I have a...</label>
>             </div>
>             <a class="btn-blue bt-big" type="button" href="#next">Submit</a>  
>       
>         </fieldset>
> </div>  
> 
> 
> JavaScript 
> **************************************************************************
> function loginUser(){
>       alert("test")
>       iui.showPageById("main"); 
> }
> 
> The alert appears but the screen goes back to the "home" panel.
> 
> Thank you for you help.
> 
> Katrina
> -- 
> You received this message because you are subscribed to the Google Groups 
> "iPhoneWebDev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> Visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/iphonewebdev?hl=en.


Reply via email to