Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
<script> tag closing off divs (in FF)
Old 01-13-2009, 10:21 AM <script> tag closing off divs (in FF)
Average Talker

Posts: 15
Trades: 0
Hey guys,

Just wondering if anyone had encountered an issue like this. I've been coding something into an existing CMS, the content is generated offline and uploaded (Actinic v9 to be precise). Now I've spent a while on this and its baffling me, its nothing to do with the software but how Firefox is outputting the file.

When FF gets to even just literally <script></script> it is placing two </div> tags in front of it, closing off the area its in and forcing the script to run in the wrong place. IE is fine!

Has anyone come across a problem like this?

Regards,

Leonard
Gentleman_ is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-13-2009, 11:14 AM Re: <script> tag closing off divs (in FF)
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
If you can see these </div> tags in the source, it isn't being done by a browser.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-13-2009, 11:39 AM Re: <script> tag closing off divs (in FF)
Average Talker

Posts: 15
Trades: 0
As far as I can tell I'm afraid it is...

...all signs point to that as the html file on disk opened in notepad doesn't show this error in the code. Opening in Firefox and viewing source and generated source backs this up... the generated source contains this error, which is what leads me to believe it is Firefox generating these tags. At this stage I don't know what else it could be unless you have any other suggestions?

EDIT:
I know you know your stuff Chris, so just wanted to add that I hope that didn't sound snotty. I've been scouring over the code to try and work out this issue and as far as I can tell its a FF bug not anything else. I will try and clean up some code to post to try and demo this.

Last edited by Gentleman_; 01-13-2009 at 11:42 AM.. Reason: Didn't want to sound rude!
Gentleman_ is offline
Reply With Quote
View Public Profile
 
Old 01-13-2009, 11:56 AM Re: <script> tag closing off divs (in FF)
Average Talker

Posts: 15
Trades: 0
Right, I found the solution! It came down to some residual code coming from Actinics labyrinth like template system. When cleaning up the code to post it I found that the Product box divs I was inserting the code into was nested between a <table ...> and a </table>. No rows or cells, just that. Took them out, problem solved.

I guess Firefox sees that and figures I'm an idiot and it probably knows better. Well it was half right, but it didn't know better in this occassion! Thought I'd report it in case someone bumps into a similar issue in the future.
Gentleman_ is offline
Reply With Quote
View Public Profile
 
Old 01-13-2009, 12:54 PM Re: <script> tag closing off divs (in FF)
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
The various classes of browsers have slightly different ways of dealing with malformed code, which is why it is important to form it correctly, and since there is no standard as to what a browser is supposed to do with bad code, it is hard to predict what will happen. Glad you got it figured out.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 01-13-2009, 03:05 PM Re: <script> tag closing off divs (in FF)
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Browsers by themselves do not arbitrarily add code - they render (sometimes badly) what is sent TO them by the server.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-13-2009, 04:22 PM Re: <script> tag closing off divs (in FF)
Skilled Talker

Posts: 79
Location: Devon, England
Trades: 0
Actually there is a method to make firefox appear to add code. Try rendering some bad code such as the following:

HTML Code:
aaa<table><td> hello </table> bbb
Firefox will only use the code you have supplied it, which in this case is bad code. Doing a view source will show our bad code.

Now try highlighting the text and doing a view selected source. This time the code will be different and the table will have closing tags added. This is because the view selection source builds the code instead of showing your root code.
__________________
Please add to my Talkupation if I was helpful. Thanks.


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
paaaaaaaaaa is offline
Reply With Quote
View Public Profile Visit paaaaaaaaaa's homepage!
 
Reply     « Reply to <script> tag closing off divs (in FF)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28375 seconds with 12 queries