Linking to static pages?

27 views
Skip to first unread message

dylanparrin

unread,
Feb 9, 2012, 12:52:36 PM2/9/12
to iPhoneWebDev
Hi all,

I really need to link to static pages but keep it in the app. So the
toolbar with the back button stays there, but the content is being
pulled from elsewhere. The reason: I have a LOT of content, like
hundreds of pages, having all of that code on one HTML document can't
be a good thing and not all items will be accessed by every user. I've
tried adding IFRAMEs but I just can't get it to go to 100% height
without causing the page to have scrollbars. I've tried editing the
min-height of not(.toolbar), etc and even height and in some cases on
my high res it looks nice, but once I go to 1024x768 it causes
scrollbars. It doesn't have to be IFRAMEs if there is some other way
to do it, just as long as it can be the toolbar at the top, with the
content filling the rest of the page (100%).


Thanks!

dylanparrin

unread,
Feb 9, 2012, 1:40:50 PM2/9/12
to iPhoneWebDev
Silly me, figured out I could just create a whole new HTML doc and
link to that, just making it look like the doc before. But now when I
link to an external doc rather than anchor it doesn't go there
(linking from the li href) How can I get the li link to go to
externals?

Sean Gilligan

unread,
Feb 9, 2012, 3:31:24 PM2/9/12
to iphone...@googlegroups.com, dylanparrin
On 2/9/12 10:40 AM, dylanparrin wrote:
> when I
> link to an external doc rather than anchor it doesn't go there
> (linking from the li href) How can I get the li link to go to
> externals?

I think you want to use target="_self". There is also target="_webapp"
if you want to load a whole new page and not leave fullscreen/webapp mode.

Samples of linktypes are here:
http://demo.iui-js.org/test/link-types.html
(make sure to do a view source)

-- Sean

Manmade

unread,
Feb 10, 2012, 2:18:50 AM2/10/12
to iphone...@googlegroups.com
Dylanparrin
Take a look at the jqtouch framework.
There you can get seperate pages from your server with get requests.
That way you can have how many pages you like!

Another way is to use the childbrowser plugin, this if you make an native
app with phonegap.
The childbrowser opens up external pages in a new window and when you close
that window you are still in you app.
Hope it helps!

> --
> 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=en.
>

Sean Gilligan

unread,
Feb 10, 2012, 4:05:09 AM2/10/12
to iPhoneWebDev


On Feb 9, 11:18 pm, "Manmade" <i...@manmade.se> wrote:
> Dylanparrin
> Take a look at the jqtouch framework.
> There you can get seperate pages from your server with get requests.
> That way you can have how many pages you like!

iUI does this, too -- just follow the instructions in my previous
email. (target="_self")

-- Sean

Remi Grumeau

unread,
Feb 10, 2012, 3:51:27 AM2/10/12
to iphone...@googlegroups.com
humm... i just realize i haven't done anything about this in the documentation.

Links:

#1 <a href="#page1">
This will look for a screen with id attribute to "page1" and slide to it.

#2 <a href="page1.html">
This will load the content of page1.html, add it to the current document & slide to the first screen of the loaded content. Since it loads all the content, we usually use .frag (fragment) file that contains the screens you need. If this loaded document contains a <body>, <head>, it creates bugs.

#3 <a href="#page1" target="_replace"> or <a href="page1.html" target="_replace">
It replaces the link element by the linked content (aka "Read more" at the end of a list)

#4 <a href="page1.html" target="_self"> or <a href="page1.html" target="_webapp">
Doesn't perform any AJAX call or load to the external file. It just loads it like a normal link in a normal webpage.

#5 <a href="page1.html" target="_blank">
Opens the link in a new tab/window.

Hope this helps!


Remi


To unsubscribe from this group, send email to iphonewebdev+unsubscribe@googlegroups.com.

For more options, 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 iphone...@googlegroups.com.
To unsubscribe from this group, send email to iphonewebdev+unsubscribe@googlegroups.com.

Fibo

unread,
Mar 14, 2012, 12:04:47 PM3/14/12
to iphone...@googlegroups.com
In some cases , screen "#page1", when focussed, show in the address bar the address "#_page1" instead of the expected "#page1". Why?

Remi Grumeau 

unread,
Mar 14, 2012, 12:36:40 PM3/14/12
to iphone...@googlegroups.com, iphone...@googlegroups.com
in iui.js, please look for "prefix". in this way, you can make a difference between iUI navigation anchor and others.

Remi
To view this discussion on the web visit https://groups.google.com/d/msg/iphonewebdev/-/kwg6sl_oPQsJ.

To post to this group, send email to iphone...@googlegroups.com.
To unsubscribe from this group, send email to iphonewebdev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages