|
|
|
date: Tue, 10 Mar 2009 21:24:30 +0000,
group: uk.net.web.authoring
back
Conditional CSS statements
A colleague has developed a site for me which runs in Joomla and has a
separate property listings module installed. The output from the property
search file is displayed with the addition of a pipe "|" at the end of each
statement, and we can't work out how to remove it, as the javascript code
which handles the output is encrypted.
So, my question is whether it's possible to create a conditional statement
that looks for a certain character and applies a css statement that
overrides what's already coded into a results (parsed) file? And of course,
if anyone knows how to phrase that statement, there's a large beer
waiting...
Hope that makes sense!
date: Tue, 3 Mar 2009 10:58:41 -0000
author: Trent SC lid
|
Re: Conditional CSS statements
Message-ID: <JKGdnTV1Asv8kDDUnZ2dnUVZ8gSWnZ2d@posted.plusnet> from Trent
SC contained the following:
>A colleague has developed a site for me which runs in Joomla and has a
>separate property listings module installed. The output from the property
>search file is displayed with the addition of a pipe "|" at the end of each
>statement, and we can't work out how to remove it, as the javascript code
>which handles the output is encrypted.
There may be a way of hiding a single character, but I don't know it
What happens if you remove the pipe symbol before the output gets to the
browser.
e.g. something like
$output=str_replace("|","",$output);
Of course, it may be that the js needs the character to tell it that
it's the end of a record. There could be a lot of different factors
going on here.
So you could remove the character with javascript.
<script type="text/javascript">
var outputstring = "This is the |output| from the search.|";
var newoutput = outputstring.replace(/\|/g, "");
document.write(outputstring);
document.write("<br />Modified output = " + newoutput);
</script>
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
date: Tue, 03 Mar 2009 14:58:02 +0000
author: Geoff Berrow
|
Re: Conditional CSS statements
>>A colleague has developed a site for me which runs in Joomla and has a
>>separate property listings module installed. The output from the property
>>search file is displayed with the addition of a pipe "|" at the end of
>>each
>>statement, and we can't work out how to remove it, as the javascript code
>>which handles the output is encrypted.
>
> There may be a way of hiding a single character, but I don't know it
>
> What happens if you remove the pipe symbol before the output gets to the
> browser.
>
> e.g. something like
> $output=str_replace("|","",$output);
>
> Of course, it may be that the js needs the character to tell it that
> it's the end of a record. There could be a lot of different factors
> going on here.
>
> So you could remove the character with javascript.
>
> <script type="text/javascript">
>
> var outputstring = "This is the |output| from the search.|";
> var newoutput = outputstring.replace(/\|/g, "");
>
> document.write(outputstring);
> document.write("<br />Modified output = " + newoutput);
>
> </script>
Thanks for the suggestion, Geoff. I think the pipe is indeed a record-end
indicator, but as we don't have access to the javascript that controls the
output (it's encrypted), I was hoping to attack the problem via a
conditional CSS statement...
date: Tue, 3 Mar 2009 22:27:51 -0000
author: Trent SC lid
|
Web site not displaying correctly with Firefox (ok with IE7)
Hi all
Bit of a long shot this one.
I originally setup a blog on www.squarespace.com but as I have not
updated it in some years thought I would download it locally to my pc
before uploading it as a static display to my own bit of webspace (works
out at about £30 pa rather than £145 pa.)
Locally the site opens fine in both IE and Firefox (3.07) but having
uploaded it to my website something has broken and it does not display
normally using Firefox (IE is still okay)
Does any one have any suggestions.
Site is here www.wobbleyworld.com
Cheers
Alan
date: Tue, 10 Mar 2009 21:24:30 +0000
author: Alan
|
Re: Web site not displaying correctly with Firefox (ok with IE7)
In article ,
Alan wrote:
> Hi all
>
> Bit of a long shot this one.
>
> I originally setup a blog on www.squarespace.com but as I have not
> updated it in some years thought I would download it locally to my pc
> before uploading it as a static display to my own bit of webspace (works
> out at about £30 pa rather than £145 pa.)
>
> Locally the site opens fine in both IE and Firefox (3.07) but having
> uploaded it to my website something has broken and it does not display
> normally using Firefox (IE is still okay)
>
> Does any one have any suggestions.
>
> Site is here www.wobbleyworld.com
FF is having difficulty finding the styles. It can be kicked into fairly
suddenly finding them, curiously enough, by using the web developer add
on and calling for Edit CSS.
There are quite some things wrong with CSS and the W3C validator reports
unhappiness with character encoding and a few other things but perhaps
these are incidental.
--
dorayme
date: Wed, 11 Mar 2009 09:18:17 +1100
author: dorayme
|
Re: Web site not displaying correctly with Firefox (ok with IE7)
At 09:18:17 on Wed, 11 Mar 2009, dorayme
wrote in
:
>FF is having difficulty finding the styles.
Because they're in a file called display/dynamic1.html. Renaming the
file to display/dynamic1.css should make a noticeable difference...
--
Molly Mockford
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety - Benjamin Franklin
(My Reply-To address *is* valid, though may not remain so for ever.)
date: Tue, 10 Mar 2009 22:22:26 +0000
author: Molly Mockford
|
Re: Web site not displaying correctly with Firefox (ok with IE7)
On Tue, 10 Mar 2009 21:24:30 +0000, Alan wrote in
:
>Locally the site opens fine in both IE and Firefox (3.07) but having
>uploaded it to my website something has broken and it does not display
>normally using Firefox (IE is still okay)
>
>Does any one have any suggestions.
My guess would be that the web host is serving display/dynamic1.html as
text/html where you need it to be text/css. Renaming the file as
dynamic1.css (and fixing the reference of course) may improve things.
--
Owen Rees
[one of] my preferred email address[es] and more stuff can be
found at <http://www.users.waitrose.com/~owenrees/index.html>
date: Tue, 10 Mar 2009 22:26:25 +0000
author: Owen Rees
|
Re: Web site not displaying correctly with Firefox (ok with IE7)
In article ,
Owen Rees wrote:
> On Tue, 10 Mar 2009 21:24:30 +0000, Alan wrote in
> :
>
> >Locally the site opens fine in both IE and Firefox (3.07) but having
> >uploaded it to my website something has broken and it does not display
> >normally using Firefox (IE is still okay)
> >
> >Does any one have any suggestions.
>
> My guess would be that the web host is serving display/dynamic1.html as
> text/html where you need it to be text/css. Renaming the file as
> dynamic1.css (and fixing the reference of course) may improve things.
FF is odd man out in my stable, perhaps it has less error correction or
tolerance?
--
dorayme
date: Wed, 11 Mar 2009 09:46:06 +1100
author: dorayme
|
Re: Web site not displaying correctly with Firefox (ok with IE7)
On Wed, 11 Mar 2009 09:46:06 +1100, dorayme
wrote in
:
>FF is odd man out in my stable, perhaps it has less error correction or
>tolerance?
See https://developer.mozilla.org/en/Incorrect_MIME_Type_for_CSS_Files
CSS is not HTML so it is just plain wrong to serve it with content type
text/html. Browsers silently applying unspecified fixups when presented
with incorrect content is one of the reasons why so much of the web is
such a mess.
--
Owen Rees
[one of] my preferred email address[es] and more stuff can be
found at <http://www.users.waitrose.com/~owenrees/index.html>
date: Wed, 11 Mar 2009 00:54:00 +0000
author: Owen Rees
|
Re: Web site not displaying correctly with Firefox (ok with IE7)
Owen Rees wrote:
> On Wed, 11 Mar 2009 09:46:06 +1100, dorayme
> wrote in
> :
>
>> FF is odd man out in my stable, perhaps it has less error correction or
>> tolerance?
>
> See https://developer.mozilla.org/en/Incorrect_MIME_Type_for_CSS_Files
>
> CSS is not HTML so it is just plain wrong to serve it with content type
> text/html. Browsers silently applying unspecified fixups when presented
> with incorrect content is one of the reasons why so much of the web is
> such a mess.
>
Thanks for the suggestions folks - the only thing that is really
puzzling me is that the site displays okay locally using Firefox, its
just when I upload it to my ISP that it does not.
Could it be that they have some form of different web server running
(not sure what I might use locally!)
date: Wed, 11 Mar 2009 21:05:02 +0000
author: Alan
|
Re: Web site not displaying correctly with Firefox (ok with IE7)
On Wed, 11 Mar 2009 21:05:02 +0000, Alan put finger to keyboard and
typed:
>Owen Rees wrote:
>> On Wed, 11 Mar 2009 09:46:06 +1100, dorayme
>> wrote in
>> :
>>
>>> FF is odd man out in my stable, perhaps it has less error correction or
>>> tolerance?
>>
>> See https://developer.mozilla.org/en/Incorrect_MIME_Type_for_CSS_Files
>>
>> CSS is not HTML so it is just plain wrong to serve it with content type
>> text/html. Browsers silently applying unspecified fixups when presented
>> with incorrect content is one of the reasons why so much of the web is
>> such a mess.
>>
>Thanks for the suggestions folks - the only thing that is really
>puzzling me is that the site displays okay locally using Firefox, its
>just when I upload it to my ISP that it does not.
>
>Could it be that they have some form of different web server running
>(not sure what I might use locally!)
Unless you've actually got a web server running on your PC (which is
unlikely, and you'd know if you had), then locally any browser is just
taking the files from the filesystem. So they aren't being served with
any kind of content-type at all - the browser is acting as a
filesystem browser rather than a web browser, and will just make the
best of what it's given by looking at the content. On a web server,
though, it will be given a content-type by the server and that will
override the brower's own internal fallback.
Mark
--
Blog: http://mark.goodge.co.uk
Stuff: http://www.good-stuff.co.uk
date: Wed, 11 Mar 2009 21:30:02 +0000
author: Mark Goodge
|
|
|