Re: Help with iui.showPageById()

38 views
Skip to first unread message

Remi Grumeau 

unread,
Sep 25, 2012, 1:16:45 AM9/25/12
to iphone...@googlegroups.com, iphone...@googlegroups.com
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 <Katrina...@socraticarts.com> 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 iphone...@googlegroups.com.
To unsubscribe from this group, send email to iphonewebdev...@googlegroups.com.
Visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
 
 

Katrina

unread,
Sep 25, 2012, 11:25:31 AM9/25/12
to iphone...@googlegroups.com
Thank you! Yes, that fixed it. Thank you so much for the quick response.
Reply all
Reply to author
Forward
0 new messages