Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] Browser Check



******    message to minivend-users from "Thomas Hecker" <thomas.hecker@x9media.com>     ******

Hi List!
I'm really sorry to bug you with those beginner questions, but I'm not very
firm with Perl, so I hope that you can help me.
I want to check the user's browser, to return conditionally based
stylesheets.

I've used this function:

<LINK REL="stylesheet" TYPE="text/css"
HREF="http://tradecontact.x9media.com/images/[if explicit]
                     [condition]
                     $ms = 'MSIE';
                     $browser = '[data session browser]';
                     $pos = index($browser, $ms);
                     return 1 if  $pos > -1;
                     return 0;
                     [/condition]
                     [then]
                     styles.css
                     [/then]
                     [else]
                     nnstyles.css
                     [/else]
                     [/if]">

The problem is, that it doesent work. Minivend always returns nnstyles.css .
I think it's because the browser string in the session database contains
some semi-colons, so the the initialization of the $browser -variable stops
when the first semi-colon is encountered.
When I initialize $browser with something else like "testtestMSIE" the
function works fine.

Can anyone help me with that Problem.

Thanks 1000x

Tom

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: