Last step in using jQTouch web app

15 views
Skip to first unread message

anmldr

unread,
Nov 23, 2009, 12:16:00 AM11/23/09
to iPhoneWebDev
My "web app" is a huge eBook really and so there is absolutely no
possibility of everything being in one HTML page. I love the
transitions that are available in jQTouch. It is really a LOT easier
to use than I first thought. I recommend it to anyone.

My project is really a hybrid app. I have a completed native app for
the iPhone. It is a way for my customers to download eBooks and to
read all of their related books within this one app. The user will
download the eBooks from my server and then read within the native
app.

This particular eBook is a drug handbook that contains descriptions
and uses of a LOT of different drugs. It also has a drug dosage
calculator that is tailored for each individual drug. Each "page" is
specific for one drug and contains a <ul> of the info that they want
to view...drug information, a cache for a textarea that they can enter
their own notes about the drug and then the calculator. jQTouch works
quite well on these individual pages. The transitions are beautiful.

BUT, the index page of this web app is a page that lists A-Z. Then
the second page would be (depending on the letter chosen) a list of
all drugs starting with that letter. I understand now that a
transition cannot happen between different pages and so have accepted
that. It won't have the native feel of the transitions but that is
OK.

The problem is that when I link from my list of drugs to a certain
page that uses jQTouch, when the user hits a "back" button it will not
go back from the drug pages to the index page or the list of drugs
pages. Does this make sense? If not, I will post an example to my web
site.

So, the question is, how can I force a jQTouch web app to allow it to
go back in the browser history?

Linda

anmldr

unread,
Nov 23, 2009, 12:44:03 AM11/23/09
to iPhoneWebDev
I decided to post some screen shots since a picture is worth a 1000
words.

www.anmldr.com/hybridapp

Suggestions?

Thanks,
Linda

Remi Grumeau

unread,
Nov 23, 2009, 4:46:16 AM11/23/09
to iphone...@googlegroups.com
iUI use anchors to get this feature. you should take a look at it ;)
> --
>
> 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.
> For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=.
>
>


Remi Grumeau
(+33) 663 687 206
http://www.remi-grumeau.com

anmldr

unread,
Nov 23, 2009, 11:47:55 AM11/23/09
to iPhoneWebDev
Thanks for the iUi suggestion. I have been using it for over a year
and wanted to use something else. I am using jQTouch. Each framework
seems to have it's own benefits and problems. Last time I checked,
iUI didn't have all of the transitions that jQTouch uses as well as a
few other things that I am using. I don't want to go back through
these tons of pages, just to change right back to iUI.

But, it would be nice if someone that has used jQTouch could chime in
and perhaps there is a portion of the javascript that can be changed
or overridden in jQTouch so that the browser's back button can work as
expected.

Again, thank you for your suggestion.

Linda

Remi Grumeau

unread,
Nov 23, 2009, 12:07:16 PM11/23/09
to iphone...@googlegroups.com
My mistake: JQTouch uses anchors too :)
A URL we could test your webapp ?

Remi

anmldr

unread,
Nov 23, 2009, 2:45:13 PM11/23/09
to iPhoneWebDev
All that I did was to create a page for this example that has a page
that links to jQTouch. Click on the link. Then click on the back
button in your browser. It will not go to my linked page...at least
for me in Safari and on the iPhone.

http://www.anmldr.com/testtouch/

Linda

David Kaneda

unread,
Nov 23, 2009, 3:01:06 PM11/23/09
to iphone...@googlegroups.com
Linda-

This is certainly a bug—if you get a chance, please submit a ticket
at:
http://code.google.com/p/jqtouch

Thanks!


--
David Kaneda


Sent from my iPhone.

anmldr

unread,
Nov 23, 2009, 3:38:21 PM11/23/09
to iPhoneWebDev
>please submit a ticket
Done.

Any suggestions anyone for a work around?

Linda

Remi Grumeau

unread,
Nov 23, 2009, 7:07:26 PM11/23/09
to iphone...@googlegroups.com
well actually, it doesn't seems like a bug to me ...
JQTouch, like all iPhone frameworks that use transitions between pages, needs an anchor to specify the top menu where to go back / which block to display.
So by default, if your link had the anchor, the back button will get you back to the first page.
Here, it goes back to the page url without the anchor, and the javascript automatically add it ... which is normal, but create a 'new page'

example: go to http://www.anmldr.com/testtouch/ and then copy paste http://www.anmldr.com/testtouch/demos/main/index.html#home in the url address bar (with the anchor)
Press back button : voila :) You are on the first page ... cause the JS hasn't got to redirect you on #home, so no 'new page' :)
Clear ?

That's not a bug, it's a feature :-) (for once, this statement is true ^_^)

Remi

David Kaneda

unread,
Nov 23, 2009, 7:10:47 PM11/23/09
to iphone...@googlegroups.com
Remi,

I see your point, but I think it's still worth exploring ways around it. Ultimately, navigating between jQTouch and other sites is fairly important. I'm also currently working on an automatic "deep-linking" extension, which will allow you to go to the right page when hitting "back" from a page you've navigated to. Thanks-

Dave


..............................................................

Interface Design & Development

Remi Grumeau

unread,
Nov 23, 2009, 7:28:57 PM11/23/09
to iphone...@googlegroups.com
i hardly see how you can do that ... defining a default anchor value not to redirect to but to use is none is set ?
Deep linking is definitely a real issue for web apps, i would be glad to get it on iUI ... but again, don't really see how you can manage to do it. Pre-defining a sitemap to be parsed if the anchor value is not the default one neither defined on the document ?

Remi

anmldr

unread,
Nov 23, 2009, 11:05:22 PM11/23/09
to iPhoneWebDev
I am watching this "debate" with interest. It appears that it is also
a problem with iUI as well as other frameworks? I am no JavaScript
guru and so cannot contribute to solving the problem.

Linda

Remi Grumeau

unread,
Nov 24, 2009, 5:18:07 AM11/24/09
to iphone...@googlegroups.com
On Tue, Nov 24, 2009 at 05:05, anmldr <anm...@bellsouth.net> wrote:
> I am watching this "debate" with interest.

eh eh :)
Me too, cause this sitemap could be a pretty good solution in fact,
even more for external files.
example :
http://www.remi-grumeau.com/iphone/#_about would access directly to
the about page, since its content is in the index, so the id is set
and exists.
http://www.remi-grumeau.com/iphone/#_board will redirect to #_home
because the board content is in board.php ("Icon Board")

This is definitely a real problem, moreover for deeper TOC pages ...

Remi

> It appears that it is also a problem with iUI as well as other frameworks? I am no JavaScript
> guru and so cannot contribute to solving the problem.
>
> Linda

eh eh
I've never said that i'm a JavaScript Guru and i don't honestly think i am :-)

paolo

unread,
Nov 28, 2009, 11:35:59 PM11/28/09
to iPhoneWebDev
Hi Linda, i had the same problem, the solution, create a div for each
section and load with ajax the info inside, for example <div
id="index"></div> and load the first html that you show in
http://www.anmldr.com/hybridapp/ , next <div id="letter"></div> and
load the letter selected and so on, then u have all "backs"
PD: sorry for my english
Regards
P.
Reply all
Reply to author
Forward
0 new messages