I have a snipit of javaScript running right under the
tag. The script works great... but in IE the script shows up as a blank line at the top of my document and is pushing my page down about 20 pixels... I tried a few CSS tricks but its not fixing the problem... Anyone know how to fix this.
2007-03-30
07:23:51
·
6 answers
·
asked by
Trance K
2
in
Computers & Internet
➔ Programming & Design
It looks great in Firefox but not in IE 6 or 7... The code doesn't work unless its in the body... its a package some one else developed
2007-03-30
07:45:16 ·
update #1
thanks everybody... I put the code in a hidden div... works great!
2007-03-30
14:04:09 ·
update #2
move the tag to the bottom of the
...
if you don't have a make one before the
scripts go here!
UPDATE
if it has to be in the body, it requires the page is actually loaded.
If you put it in the top, but don't actually do anything, just define the main code as a function, you can use
it's saves the onload function until the body is actually loaded.
SECOND UPDATE:
Congrats! it's bit sloppy to put it in a hidden div... but HEY! IT WORKS!
2007-03-30 07:37:59
·
answer #1
·
answered by jake cigar™ is retired 7
·
1⤊
0⤋
Try moving the script to the very end of the body tag (right before )
It seems like the script tag is creating an invisible space where it is located and may not be possible to remove it through other measures (like css you tried) unless you dig through the .js code itself to find the problem.
So, unless you understand the .js code enough to actually fix the spacing issue, place the code after everything else on the page loads.
That way you will have moved the empty space to the very bottom of the page instead of having it at the top which results in pushing all other contents down.
2007-03-30 09:13:12
·
answer #2
·
answered by jk 1
·
0⤊
0⤋
Collin, please let us know precisely what command it really is it is not any longer operating like you imagine it is going to. the reply ought to haven't from now on some thing to do with Java, on the grounds that javascript is thoroughly unrelated to Java. the subsequent question - when we come across out that what you're attempting to do is really criminal - is to work out even if javascript is grew to grow to be on in the browser or no longer. In IE meaning pass to methods > internet concepts > protection tab and note what the protection factor is wanting to. If it really is "intense", then javascript probable should not be run. do not take the advice to ignore IE and use Firefox. I agree that Firefox is more advantageous perfect - i exploit it ninety 5% of the time myself - yet extremely some the individuals on the internet nevertheless use IE so that you do not prefer to push aside them. there is an fairly cool Javascript debugging ecosystem for Firefox, notwithstanding, called "Firebug", it extremely is definitely worth having. yet in no way ignore about IE, a minimum of no longer in case you want each and everybody else to run your pages effectively. you ought to at an absolute minimum try each and every thing antagonistic to IE exceedingly thoroughly on the grounds that it is what maximum folk nevertheless run. Get IE 7 also, because it brings in tabbed surfing and decreases Firefox's advantages somewhat.
2016-12-03 00:58:25
·
answer #3
·
answered by ? 4
·
0⤊
0⤋
IE in many cases (for some users) does a different CSS trip from what other browsers do. It's notorious for that! (Also could you be running into its nags about intercepting active content?) First of all, try it on other users' computers to see if it persists there...Then look at, say, CSS Hacks & Filters to find hints about getting around some of IE's nasty habits...Good luck!
2007-03-30 07:43:01
·
answer #4
·
answered by fjpoblam 7
·
0⤊
0⤋
Are you using IE7?
I have found on IE 7 it is MUCH more picky when running Java, yet the same Script in 6.x and Firefox, it runs fine.
2007-03-30 07:36:21
·
answer #5
·
answered by SL-INC (Scott) 2
·
0⤊
0⤋
You should show us the code.
2007-03-30 09:37:41
·
answer #6
·
answered by Joey 2
·
0⤊
0⤋