New topic: 

How to change HTMLheader for specific platform

<http://forums.realsoftware.com/viewtopic.php?t=45752>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        trueclou          Post subject: How to change HTMLheader for 
specific platformPosted: Mon Oct 29, 2012 3:21 am                         
Joined: Tue Mar 16, 2010 6:21 am
Posts: 9                Hi!

I want to have different HTMLheaders sent for different platforms to optimize 
the scaling etc. for different devices, especially for the iPhone.

I thought I can do this my changing the HTMLheader string in the 
Websession.Preparesession event. My code first looked like this:

If Session.Platform = WebSession.PlatformType.iPhone then
  HTMLHeader = "<meta name="viewport" content="width=752, initial-scale=0.4, 
user-scalable=yes">"
end if


This of course didn't work due to the "wrong" quotation marks in the string 
assignment. Changing it to the following did compile but doesn't seem to work. 

If Session.Platform = WebSession.PlatformType.iPhone then
  HTMLHeader = "<meta name=%22viewport%22 content=%22width=752, 
initial-scale=0.4, user-scalable=yes%22>"
end if


Any ideas where the error is?

Thanks,
Christoph   
                             Top                charonn0          Post subject: 
Re: How to change HTMLheader for specific platformPosted: Mon Oct 29, 2012 3:42 
am                                 
Joined: Mon Apr 02, 2007 2:08 am
Posts: 946
Location: San Francisco, CA, USA                Try:
If Session.Platform = WebSession.PlatformType.iPhone then
  HTMLHeader = "<meta name=""viewport"" content=""width=752, initial-scale=0.4, 
user-scalable=yes"">"
end if


Within a string, two quotes ("") mean a literal single quote rather than then 
end of the string.

I don't know whether this has anything to do with setting the header works or 
not, though.      
_________________
Boredom Software  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to