abcdef
Graham So there is no way to retrieve device information
Graham
abcdef I have finally figured out the issue but I do not think anything can be done about it
The en-us in the browser string is causing the contents of the ( ) to be evaluated as an expression
The problem is it is being evaluated in the first line so I don't think there is a way around it
abcdef
Graham Chromes so I tried on the emulator but not displayed. characters inside "(" and ")" has disappeared.
var $a=<xt:browser detail="3" />
var $a=call str_replace $subject=$a;$search=iPhone;$replace=[iPhone]
var $a=call str_replace $subject=$a;$search=iPad;$replace=[iPad]
var $a=call str_replace $subject=$a;$search=Android;$replace=[Android]
var $b =call strrpos $haystack=$a;$needle=[; $offset=0
var $c =call strrpos $haystack=$a;$needle=]; $offset=0
if $c
var $d = call substr $val=$a;$start=($b+1);$length=($c-$b-1);
print $d
endif
I'll let you see the photos on your Android device / ipadmini / iphone
Graham
abcdef I have tried this on all my mobiles and on chromes emulator and I have no problems
the only change the script needs is
if $c
var $d = call substr $val=$a;$start=($b+1);$length=($c-$b-1);
print $d
endif
to allow for non iphone/ipad/android devices
abcdef
Graham would like to getting my names device.
var $a=<xt:browser detail="3" />
var $a=call str_replace $subject=$a;$search=iPhone;$replace=[iPhone]
var $a=call str_replace $subject=$a;$search=iPad;$replace=[iPad]
var $a=call str_replace $subject=$a;$search=Android;$replace=[Android]
var $b =call strrpos $haystack=$a;$needle=[; $offset=0
var $c =call strrpos $haystack=$a;$needle=]; $offset=0
var $d = call substr $val=$a;$start=($b+1);$length=($c-$b-1);
print $d
Copy code
on accessible via Android hay ios, the left fails Ä‘ang not active
Graham
abcdef so what do you see if you just use <xt:browser detail="3" /> not in a xtscript
show me the actual page
abcdef
Graham error still accessible by the small screen, the device is disabled str_replace
abcdef
Graham thank graham. if it helps less for me many.
Apkk
Graham thank graham.
Graham
abcdef I cannot reproduce the problem on any of my mobiles .
And as xtscript is a server based code I cannot think why there would be any difference in the output
try this
var $a=<xt:browser detail="3" />
var $b=call chr $val=59
var $a=call str_replace $subject=$a;$search=(;$replace=($b
var $a=call str_replace $subject=$a;$search=);$replace=)$b
print $a
Copy code
the line
var $b=call chr $val=59
takes care of the semicolon
(semicolons are ignored if they are the last char on a line)