473,387 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Add Netscape/mozilla Compatability?

77
Im using This nifty code that works Great in IE but not so great in Mozilla,
In ie if you add an image, the sidenote fits around it, but in mozilla the image just sits over the top. please help

preveiw

http://inny.ipbfree.com/index.php?sh...51&hl=,%20true

veiw in both browsers to see the problem.

Expand|Select|Wrap|Line Numbers
  1. /*
  2.  
  3. Unobtrusive Sidenotes v1.3.5 (Hosted)
  4. (c) Arc90, Inc.
  5.  
  6. http://www.arc90.com
  7. http://lab.arc90.com
  8.  
  9. Licensed under : Creative Commons Attribution 2.5 http://creativecommons.org/licenses/by/2.5/
  10.  
  11. */
  12.  
  13. /* Globals */
  14. var arc90_isIE = document.all? true: false;
  15. var arc90_sideCLRs = 4; // total colours declared in the CSS for sidenote usage
  16.  
  17. /* Pre-Load */
  18. function arc90_preload() {
  19.     var head = document.getElementsByTagName('HEAD');
  20.  
  21.     // add the css
  22.     var l = arc90_newNode('link');
  23.     try {
  24.         l.rel = "stylesheet";
  25.         l.type="text/css";
  26.         l.href="http://h1.ripway.com/Inny/clearsidenote.css";
  27.         // fully create the link then attach to the HEAD
  28.         head[0].appendChild(l);
  29.     } catch(e) {
  30.         l = null;
  31.     }
  32. }
  33. arc90_preload();
  34.  
  35. /* Main */
  36. function arc90_sidenote() {
  37.     /* Blogger Fix: removes the crappy empty 'clear: both' div */
  38.     D = document.getElementsByTagName('DIV');
  39.     for (var j = 0, k = D.length, c = 0; j < k; j++) {
  40.         var d = D[j];
  41.         if (d.innerHTML == '' && d.style.clear == 'both') 
  42.             d.style.clear = 'none';
  43.     }
  44.  
  45.     O = document.getElementsByTagName('SPAN');
  46.     for (var i = 0, l = O.length, c = 0; i < l; i++) {
  47.         var o = O[i];
  48.         if (o != null && o.className && o.className.indexOf('sidenote') >= 0) {
  49.             try {
  50.                 var s = arc90_newNode('div', '', 'arc90_sidenoteTXT arc90_sidenoteCLR' +c);
  51.                 var a = arc90_newNode('div', '', 'arc90_inline');
  52.                 a.innerHTML = arc90_gtlt(o.title);
  53.                 s.appendChild(a);
  54.                 o.parentNode.parentNode.insertBefore(s, o.parentNode);
  55.  
  56.                 o.className = 'arc90_sidenoteLNK arc90_sidenoteCLR' +c;
  57.                 c = c + 1 < arc90_sideCLRs? c+1: 0;
  58.             } catch (err) {
  59.                 o = null;
  60.             }
  61.         }
  62.     }
  63. }
  64.  
  65. function arc90_gtlt(s) {
  66.     s = s.replace(/>/g, '>');
  67.     s = s.replace(/</g, '<');
  68.     return s;
  69. }
  70.  
  71. /* Events */
  72. function arc90_isString(o) { return (typeof(o) == "string"); }
  73.  
  74. function arc90_addEvent(e, meth, func, cap) {
  75.     if (arc90_isString(e))    e = document.getElementById(e);
  76.  
  77.     if (e.addEventListener){
  78.         e.addEventListener(meth, func, cap);
  79.         return true;
  80.     }    else if (e.attachEvent)
  81.         return e.attachEvent("on"+ meth, func);
  82.     return false;
  83. }
  84. /* Nodes */
  85. function arc90_newNode(t, i, s, x, c) {
  86.     var node = document.createElement(t);
  87.     if (x != null && x != '') {
  88.         var n = document.createTextNode(x);
  89.         node.appendChild(n);
  90.     }
  91.     if (i != null && i != '')
  92.         node.id = i;
  93.     if (s != null && s != '')
  94.         node.className = s;
  95.     if (c != null && c != '')
  96.         node.appendChild(c);
  97.     return node;
  98. }
  99.  
  100. /* Add Events */
  101. arc90_addEvent(window, 'load', arc90_sidenote);
  102.  
css

Expand|Select|Wrap|Line Numbers
  1. .arc90_sidenoteLNK { padding: 0 .3em; }
  2. .arc90_sidenoteTXT {
  3.     width: 12em;
  4.     line-height: 1.2em;
  5.     font-size: .8em;
  6.     padding: .5em;
  7. }
  8. div.arc90_sidenoteCLR0, div.arc90_sidenoteCLR2 {
  9.     margin: 1em 0 1em 1em;
  10.     float: right;
  11. }
  12. div.arc90_sidenoteCLR1, div.arc90_sidenoteCLR3 {
  13.     margin: 1em 1em 1em 0;
  14.     float: left;
  15. }
  16. .arc90_sidenoteCLR0 {
  17.     background-color:;
  18.     border: 1px solid #318484
  19. }
  20. .arc90_sidenoteCLR2 {
  21.     background-color:;
  22.     border: 1px solid #FF3535;
  23. }
  24. .arc90_sidenoteCLR1 {
  25.     background-color:;
  26.     border: 1px solid #F2D700;
  27. }
  28. .arc90_sidenoteCLR3 {
  29.     background-color:;
  30.     border: 1px solid #039B00;
  31. }
  32.  
Dec 10 '07 #1
14 1548
acoder
16,027 Expert Mod 8TB
This is written by someone else. Do they claim that it works in Mozilla/Netscape?
Dec 10 '07 #2
Inny
77
It does work in Mozzila AND IE now but ther problem is the resizer code. The resizer code kills this code in mozilla. I need to find out why So I can modify the resizer.
Dec 12 '07 #3
acoder
16,027 Expert Mod 8TB
It does work in Mozzila AND IE now but ther problem is the resizer code. The resizer code kills this code in mozilla. I need to find out why So I can modify the resizer.
So what is this resizer code?
Dec 12 '07 #4
Inny
77
Sorry, Ignnore comment about resizer, Wrong Thread.
Problem With This code is that Images do not remain within the 'sidenote' in mozilla.

To see this Mozilla Issue, Please see images below marked 'IE' and 'Mozilla'

IE screenshot


Moz screenshot
Dec 14 '07 #5
acoder
16,027 Expert Mod 8TB
The width of the sidenote is 12em and the image probably exceeds the dimensions. Maybe if you remove that, it may work.
Dec 17 '07 #6
Inny
77
The width of the sidenote is 12em and the image probably exceeds the dimensions. Maybe if you remove that, it may work.
You havent got a bloody clue have you! Admit it! Why guess and waste my time?
Dec 17 '07 #7
drhowarddrfine
7,435 Expert 4TB
The problem, as always, is IE, not Mozilla. But with an attitude like that, I'm not sure I want to tell why.
Dec 18 '07 #8
acoder
16,027 Expert Mod 8TB
You havent got a bl*** clue have you! Admit it! Why guess and waste my time?
Wow! I'm wasting your time! No, I won't admit to that because the clue is right in front of you if you had only bothered to try.

The 'probably' and 'maybe' was because I hadn't tested it so couldn't guarantee that it would work. Perhaps if you are more appreciative of the free help and guidance that you're given, you might get a better response.
Dec 18 '07 #9
NeoPa
32,556 Expert Mod 16PB
You havent got a bloody clue have you! Admit it! Why guess and waste my time?
Stupidity is sort of excusable - but why broadcast it? I'd want to keep that sort of knowledge to myself.
Dec 18 '07 #10
Dasty
101 Expert 100+
You havent got a bloody clue have you! Admit it! Why guess and waste my time?
The sad part is, that acoder is actually right. Your arc90_sidenoteTXT class has fixed width of 12em which causes your overflow. :(
Dec 18 '07 #11
Inny
77
So a thread here is only intresting enough for every tom dick and harry to pipeup if somebody loses it?
Where were all you loud mouths all this time ?
I tried removed the 12em width but it didnt work!
the frustration stems from the vagueness of replies which dont help (free or otherwise) somebody who is new to js.
If you want to help, try giving an example, dont assume the person asking will automatically know exactly what you mean and exactly how to fix it. Thats arrogance, were not all code einsteins!

My comment came from another thread here where I was screwed around with guesses and repeated questions about errors when acoder simply didnt know.
you couldve said "sorry, its got me stumped", but no, you just went on and on telling stuff that didnt work, being vague and evasive, and wasted my time.

a more helpful person on another site had it sussed and showed me how to fix it
straight off.

If you dont know ,you dont know, thats ok, but dontr pretent and further frustrate folk.
Dec 20 '07 #12
NeoPa
32,556 Expert Mod 16PB
I'm sure that's all very funny (and I'll leave it here for everyone to see) but I'm afraid that as you were warned specifically about this particular breaking of the rules (Unacceptable Behaviour) I have banned your account.
It is a temporary ban as that's what the rules indicate. Any repetition of this of course, will lead to a permanent ban.
Dec 20 '07 #13
NeoPa
32,556 Expert Mod 16PB
For anyone who is specifically insulted within this post, please don't concern yourself. I would be very surprised if anyone out there is actually stupid enough not to realise that to be insulted by someone with these views is no criticism at all.
Keeping the post visible, shows we do not use our powers to censor criticism (besides it's worth a laugh).
Dec 20 '07 #14
acoder
16,027 Expert Mod 8TB
To clear things up a bit...
So a thread here is only intresting enough for every tom dick and harry to pipeup if somebody loses it?
Of course.
I tried removed the 12em width but it didnt work!
It should work and testing shows that it does. The fact that it didn't means that something else is causing it not to work.
the frustration stems from the vagueness of replies which dont help (free or otherwise) somebody who is new to js.
If you want to help, try giving an example, dont assume the person asking will automatically know exactly what you mean and exactly how to fix it. Thats arrogance, were not all code einsteins!
It's not arrogance. It's an assumption that you will understand what is being said. If you don't, all you have to do is ask and we will provide an example or a better explanation.
My comment came from another thread here where I was screwed around with guesses and repeated questions about errors when acoder simply didnt know.
you couldve said "sorry, its got me stumped", but no, you just went on and on telling stuff that didnt work, being vague and evasive, and wasted my time.
It wasn't guesswork. It was simply to eliminate other possibilities. You didn't give the full information. If you make one change, it could cause new errors in your code. I wasn't stumped. I might've solved it in the end if you had the patience.
Dec 20 '07 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if...
57
by: Piotr Wolski | last post by:
how to make my page that it was correct with every browser standard? for example when i change HTML's table size it has no effect when i see it under mozilla and has effect under Internet...
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
9
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to...
2
by: Ron D | last post by:
What is the equivalent of if (window.event.srcElement.id == "txt1ST_INIT_NM") in Netscape?
2
by: MV | last post by:
Hi, I want to try and get a lottery type script to run in these two browsers before i put it on my site. It runs OK in I.E.6 and my friend says it works in netscape 7 so i can't see the problem...
5
by: Simon Wigzell | last post by:
I pulled some 3rd party code off the internet that makes a span visible on mouseover of a link. It works fine in IE, doesn't work for Netscape, it goes into "Unknown", see it here :...
2
by: John | last post by:
The following code works OK in IE 6.0 but does not work in Netscape 7. The image does not shift when one scrolls down but stays stationary in Netscape. Please help Thank you John function...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.