Just want my button to link to a PDF

3 views
Skip to first unread message

Gerald Buckley

unread,
Nov 21, 2009, 11:17:27 PM11/21/09
to iPhoneWebDev
OK, it's been a pretty intense 72 hours and for my last trick my app
needs to link to two URLs (both of them are currently on different
domains than the one the app is hosted on... if that matters). One is
a PDF file (which I could, presumably be certain IS on my domain again
if it matters) and the other is a specific social media site's url.

So, my buttons are in my app and now I understand how and why my other
buttons call certain functions to SetCurrentView to invoke specific
subviews. How do I accomplish my objective of passing a URL to Safari
to create a new window?

Many thanks to everyone for your help. You've certainly made this
first app much easier to create/deploy!

Gerald

Gerald Buckley

unread,
Nov 21, 2009, 11:34:55 PM11/21/09
to iPhoneWebDev
Figures... I bang my head against this all afternoon and try something
I though would never work (and, of course, it did).

In my main.js file I create a function

function externalURL001(event)
{
window.location = 'http://www.foo.com/rest_of_path/';
}

And then assign that as my onclick handler for the button and VOILA!
works like a champ. Now, question I have is... Should I be utilizing a
more optimal method to achieve my goal?

Remi Grumeau

unread,
Nov 22, 2009, 5:09:09 AM11/22/09
to iphone...@googlegroups.com
i assume you are using PhoneGap ... ?
> --
>
> 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

Gerald Buckley

unread,
Nov 22, 2009, 11:04:09 AM11/22/09
to iPhoneWebDev
Remi -

Yes, definitely intend to wrapper this webapp up via PhoneGap. Does
that provide more or better options? Or, does that plan dictate I do
something else entirely different?

Gerald
Reply all
Reply to author
Forward
0 new messages