Re: Perl and Browser compatibility
by davorg (Chancellor) on Feb 14, 2007 at 08:30 UTC
|
Perl knows nothing about browsers. And browsers know nothing about Perl.
Browsers simply interpret the HTML and/or Javascript that your Perl program creates. If the HTML or Javascript doesn't work in every browser then you will have a problem.
The solution is to look at your HTML and Javascript and work out how to achieve the effects you want in a cross-browser manner (sticking to W3C standards would be a good start). You then write a Perl program that creates that HTML and Javascript.
| [reply] |
|
Well, Internet Explorer might know something about Perl ;)
(This has nothing at all to do with CGI though and doesn't have any bearing on the OP's question.)
| [reply] |
|
Check your JavaScript for errors. W3C validator doesn't check errors in your JavaScript code. It's validate only markup (HTML+CSS).
| [reply] |
|
Perl knows nothing about browsers. And browsers know nothing about Perl.
While this is true, it misses the point. Code written in Perl can most definitely know something about browsers.
While I very much doubt it has anything to do with the OP's question, CGI.pm does in fact check the user agent to work around a bug in IE3.01 on macs.
-sauoq
"My two cents aren't worth a dime.";
| [reply] |
Re: Perl and Browser compability
by pajout (Curate) on Feb 14, 2007 at 10:48 UTC
|
With respect of davorg's advice, I recommend The W3C Markup Validation Service.
But don't forget that browsers, specially MSIE's, don't fit W3C recommendations/specifications fully. | [reply] |
|
I validated using the above link.
Its fine.
"Passed validation"
| [reply] |
|
Here's what's wrong then :) IE is notoriously known for disrespecting standards. Unfortunately, like many others, you'll have to "code for IE". Sometimes both coding for standards and IE is close to impossible, unfortunately.
| [reply] |
|
|
| [reply] |
|
|
Re: Perl and Browser compability
by varian (Chaplain) on Feb 14, 2007 at 08:54 UTC
|
CGI offers you much flexibility but it's not a fix for the browser incompatibility problems.
My experience is that Mozilla based browsers are more forgiving for HTML syntax errors than IE. (e.g. if you failed to include a closing markup </div> or </table>). So if my Perl code looks okay yet breaks with IE clients my first reaction is to check again the hierarchy and syntax of the generated HTML.
| [reply] |
Re: Perl and Browser compatibility
by pankaj_it09 (Scribe) on Feb 15, 2007 at 08:34 UTC
|
Hey I have solved the first problem.
It was the Embedded CSS which was creating the problem.
I removed the CSS and put it in an External CSS.
Now I have to solve the link problem.
| [reply] |
Re: Perl and Browser compatibility
by dpavlin (Friar) on Feb 15, 2007 at 16:22 UTC
|
| [reply] |
Re: Perl and Browser compatibility
by Moron (Curate) on Feb 15, 2007 at 15:03 UTC
|
The HTTP::BrowserDetect module provides methods for detecting the os and browser. The distinction could at least be used to redirect or inline branch users of technically unsupportable platforms (whatever they might be ;)) to provide them with a reduced-service version of your site.
;)Although, in practice, in the corporate Windows environment I would be also tempted to let the problem happen and cry non-responsibility for Microsoft problems ... "I can't help it if the corporate standard is to choose a browser that has faults I can't support ;)"
| [reply] |
Re: Perl and Browser compatibility
by Sagacity (Monk) on Feb 15, 2007 at 16:30 UTC
|
Your first step (with respect to the reply by moron) is to announce that you have achieved success and completion with the project using the Firefox browser. All those who wish to use this new interface should use this browser until further coding (and additional funding) can be implemented to accommodate non-compliant browsers. Then it's time to start hacking as davorg and the others have suggested.
Using CSS may also bring rise to problems in the future using IE. MS seems to have some version problems with that, even though they have work-arounds, it will become an ongoing task to maintain the compliance of CSS and IE browsers.
| [reply] |
Re: Perl and Browser compatibility
by DrHyde (Prior) on Feb 15, 2007 at 10:15 UTC
|
Well *I* just ignore IE. I find that this improves my mental health. | [reply] |
|
I am in corporate world so I can't ignore IE . :-)
| [reply] |
|
So am I, and I can. That's partly because we don't try to do anything fancy, but also because our HTML is written to comply with standards, and IE's compatibility these days is a *lot* better than it used to be. People who tell you that IE blithely ignores standards are, to a certain extent, FUDding.
| [reply] |
Re: Perl and Browser compatibility
by mr_mischief (Monsignor) on Feb 18, 2007 at 18:32 UTC
|
I suggest installing the Firebug extension for Firefox. It'll show you errors in your Javascript and let you debug it. That's almost certainly where your issues lie.
| [reply] |
Re: Perl and Browser compability
by Anonymous Monk on Feb 15, 2007 at 04:28 UTC
|
I can't see what Davorg has written. | [reply] |