[WebDNA] I'm stuck... :-(
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 102227
interpreted = N
texte = Ok... I have some code that works good, but not the way I want it to. ....Very high maintenance.I'm doing a redirect for wireless devices from the home page, and need to know if there is a way to reduce the comparison string. I'd like to reduce it down to iphone, or Blackberry, etc.Here is a piece of the code:[if]("[BROWSERNAME]"="Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/ 3.1.1 Mobile/5H11 Safari/525.20") | ("[BROWSERNAME]"="BlackBerry8330/4.3.0 Profile/MIDP-2.0 Configuration/ CLDC-1.1 VendorID/126 UP.Browser/5.0.3.3")][Then][REDIRECT url=mobile/index.html][/Then][Else][/Else][/if]So is there a better way to reduce:"Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5H11 Safari/525.20"Down to:Iphone?Can't think of any way to do it with the [BROWSERNAME] tag.The WAP system in the storebuilder doesn't seem to work, or is outdated.Rob
Associated Messages, from the most recent to the oldest:
Ok... I have some code that works good, but not the way I want it to. ....Very high maintenance.I'm doing a redirect for wireless devices from the home page, and need to know if there is a way to reduce the comparison string. I'd like to reduce it down to iphone, or Blackberry, etc.Here is a piece of the code:
[if]("
[browsername]"="Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/ 3.1.1 Mobile/5H11 Safari/525.20") | ("
[browsername]"="BlackBerry8330/4.3.0 Profile/MIDP-2.0 Configuration/ CLDC-1.1 VendorID/126 UP.Browser/5.0.3.3")][Then][REDIRECT url=mobile/index.html][/Then][Else][/Else][/if]So is there a better way to reduce:"Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5H11 Safari/525.20"Down to:Iphone?Can't think of any way to do it with the
[browsername] tag.The WAP system in the storebuilder doesn't seem to work, or is outdated.Rob
Rob
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Caching (2002)
WC2f3 (1997)
Summing fields (1997)
Not really WebCat (1997)
Talk List Suggestions (1997)
Multiple prices (1997)
emailer (1997)
RE: what characters are replaced for tab and CR? (1998)
more info on [setlineitems] (1997)
WebCatalog [FoundItems] Problem - LONG - (1997)
[isfile] ? (1997)
Strange time in emails (2003)
MySQL 4.1 (2004)
Date Formats (1997)
[WebDNA] search by range of dates (2009)
looking for developers with solutions (2000)
Help formatting search results w/ table (1997)
Cart Number Propagation (1997)
WebCatalog and WebMerchant reviewed by InfoWorld (1997)
Date search - yes or no (1997)