Few questions..

Topics: Developer Forum
Jun 30, 2011 at 8:03 PM

Apple: I have some simple lines of code which checks to see the type of browser the user is using, so that I can re-direct them to different web pages, more suited to the device:

MyBrowser = ALLTRIM(LOWER(Transform(oRequest.ServerVariables("HTTP_USER_AGENT"))))
writetomyjournal(mybrowser) && for now lets log the user details

Do Case
Case Like('*ipad*',MyBrowser)
    Browsertype = "ipad"
Case Like('*iphone*',MyBrowser)
    Browsertype = "iphone"
Case Like('*blackberry*',MyBrowser)
    Browsertype = "blackberry"
Otherwise
    Browsertype = "standard"
Endcase

Further down, whenever I call for a web page, I would preceed the name with ipad_ or iphone_ ... Is there a simpler way, or this as efficient as I can make it?

 

Does anybody know of a good site for downloading nice sample web sites? I have had a look at some, but the trouble is, I want a site which fills the screen. Most of the modern one's have a narrow centre, which isn't suited to what I need. Thoughts welcome on this..

 

 

Many thanks people !

Jan 30, 2012 at 4:46 AM

Try this

varbrtype = "ipad_"

url = "http://somesite.com/"+varbrtype+"yourwebpage.avfp"

Coordinator
Jan 30, 2012 at 5:04 AM
Edited Jan 30, 2012 at 5:05 AM

"Does anybody know of a good site for downloading nice sample web sites?"

This is where the WordPress Themes come in.  There are thousands of them.  And most of them are just CSS with a little PHP.  Any kind of design or style you can imagine.

You could try working with them as is, but, of course the ideal would be something like Wordpress, only in FoxPro, which lets you turn them off and on with the click of a button. 

Anybody that gets involved with this I'll be willing to help so that we can have a FoxPress that automates a lot of this stuff and possibly lets us read WordPress themes.  (hey it's a dream...)