Closed Bug 282012 Opened 20 years ago Closed 20 years ago

The stylesheet is not respected; no styles are applied.

Categories

(SeaMonkey :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Cloink_Friggson, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Following on from the "URL" & "Summary" statements, I KNOW there is no problem with the stylesheet because I have found that Moz DOES respect the stylesheet if one uses document.open(); ..write(); ..close(); ...Thereby circumventing this particular problem. I *CANNOT* use this method in my js code because no browser correctly back()s or forward()s, due to everything being generated dynamically from database tables. (So I'll have to include my own back/forward buttons on the page.) I should point out that the html-text coming from the javascript: DOES contain a valid stylesheet, in the <head> portion of the html. (This is clear from the fact it does use the stylesheet with exactly the same html-text being used in the open(); write(html); close(); methods together.) Given that the same occurs in Firefox, I doubt that my slightly out-of-date version of Moz is the problem. (I did try installing a beta version of 1.7 last time I reported a bug, but that just caused me more grief so reverted to 1.5. And I did search for the bug, but nothing leapt out at me, though I can't believe I'm the first person to come across this problem.) Reproducible: Always Steps to Reproduce: It happens if you have a SRC='javascript:Render();'-type directive on a straight html-page with FRAMESETs (i.e. one that's NOT been dynamically gen'd - but of course IS dynamically gen'ing one of the frames). As stated in "Details", you can also reproduce it by using the location.replace() method with a 'javascript:"<html page>"' Actual Results: No stylesheet styles applied, default Moz styles. Expected Results: Styles applied.
Please provide a URL in the URL field that reproduces the problem, or (better) attach a small testacase using this link: https://bugzilla.mozilla.org/attachment.cgi?bugid=282012&action=enter Please also verify that the bug still occurs in the latest nightly build - a lot of bugs have been fixed since 1.5: http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-trunk/
If I attached all my files, you'd be bewildered, my text editor has about 20 files open right now. It happens in Firefox 1.0 so I'd be very surprised if it's been fixed in Moz. I nearly raised it against Firefox, but the form pre-filled the client box with Moz so I thought I'd better raise it against Moz. I know you're going to tell me to download the latest release, but I'm only a modem user and the last time I did that I had to revert to 1.5 cos it just caused me grief and sorry, but I'm sticking to a stable version, I'm just a user of Moz, not a developer of it. This should demonstrate - but remember, the same thing happens if the location.replace method has been used with a 'javascript:...' url. <HTML> <HEAD> <TITLE>Stylesheet doesn't get applied</TITLE> <LINK HREF=###YOUR STYLESHEET### REL=stylesheet TYPE=text/css> <SCRIPT> function js_func(){ return '<HTML><HEAD><TITLE>Dynamically Generated Frame</TITLE>'+ '<LINK HREF=###YOUR STYLESHEET### REL=stylesheet TYPE=text/css>'+ '</HEAD><BODY>'+ '<DIV CLASS=###YOUR STYLE###>Style doesn't work</DIV>'+ '</BODY></HTML>'; } </SCRIPT> </HEAD> <FRAMESET> <FRAME NAME=temp ID=tfrm SRC="javascript:top.js_func()"> </FRAMESET> </HTML>
Testcase works fine; stylesheet is loaded and the text is green. Marking worksforme, but please attach a testcase showing the problem if you have one. Reopen the bug then. One other thing. If your <link>s href is a relative URI, not an absolute one, then you're seeing bug 230989.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: