wo ligt der fehler bei java


  • fritz
  • 1059 Aufrufe 9 Antworten

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • wo ligt der fehler bei java

    das soll ein script für rollende augen sein und wenn ich das in der homepage ( erstellt mit netobjects fusion7) einbaue unter body dann sehe ich über mein logo, ein text.:

    TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>

    woran könnte das liegen??






    -----------------------------------------------------------

    PHP-Quellcode

    1. <BODY>
    2. <SCRIPT LANGUAGE="JavaScript1.2">
    3. <!-- Original: [email]demigod@psxexchange.com[/email] -->
    4. <!-- Web Site: [url]http://www.psxexchange.com[/url] -->
    5. <!-- This script and many more are available free online at -->
    6. <!-- The JavaScript Source!! [url]http://javascript.internet.com[/url] -->
    7. <!-- Begin
    8. var brOK = false, mie = false;
    9. if (document.layers || document.all) brOK = true;
    10. if (document.all) mie = true;
    11. var ex = 0, ey = 0;
    12. var ae, le, re, x0, y0, tid, realx, realy;
    13. function navMove(e) {
    14. ex = e.pageX;
    15. ey = e.pageY;
    16. moveeye()
    17. return routeEvent(e);
    18. }
    19. function mieMove() {
    20. ex = document.body.scrollLeft + event.x;
    21. ey = document.body.scrollTop + event.y;
    22. moveeye();
    23. }
    24. function moveeye() {
    25. dy = ey - y0 - 20;
    26. dx1 = ex - x0 - 20;
    27. dx2 = ex - x0 - 60;
    28. r = Math.sqrt(dx1 * dx1 + dy * dy);
    29. if (r < 20) r = 20;
    30. dx1 = dx1 * 10 / r + x0 + 10;
    31. dy1 = dy * 10 / r + y0 + 10;
    32. r = Math.sqrt(dx2 * dx2 + dy * dy);
    33. if (r < 20) r = 20;
    34. dx2 = dx2 * 10 / r + x0 + 50;
    35. ae.left = x0;
    36. ae.top = y0;
    37. le.left = dx1;
    38. le.top = dy1;
    39. re.left = dx2;
    40. re.top = dy1;
    41. }
    42. function setHandlers() {
    43. if (!mie) {
    44. y0 = document.eyeballs.top;
    45. x0 = document.eyeballs.left;
    46. ae = document.eyeballs;
    47. le = document.lefteye;
    48. re = document.righteye;
    49. window.captureEvents(Event.MOUSEMOVE);
    50. window.onMouseMove = navMove;
    51. }
    52. else {
    53. y0 = document.all.eyeballs.style.pixelTop;
    54. x0 = document.all.eyeballs.style.pixelLeft;
    55. ae = document.all.eyeballs.style;
    56. le = document.all.lefteye.style;
    57. re = document.all.righteye.style;
    58. window.document.onmousemove = mieMove;
    59. }
    60. realx = x0 + 0.1;
    61. realy = y0 + 0.1;
    62. moveall();
    63. }
    64. function moveall() {
    65. rx = realx + 40;
    66. ry = realy + 40;
    67. rx += (ex - rx) * 0.1;
    68. ry += (ey - ry) * 0.1;
    69. realx = rx - 40;
    70. realy = ry - 40;
    71. x0 = Math.round(realx);
    72. y0 = Math.round(realy);
    73. moveeye();
    74. tid = setTimeout('moveall()', 100);
    75. }
    76. function placeeyes(x, y) {
    77. if (brOK) {
    78. ex = x + 40;
    79. ey = y + 40;
    80. s = '<DIV ID ="dummy" STYLE="position:absolute; ' +
    81. 'top:'+y+'; left:'+x+'; width:10; height:10;"> </DIV>';
    82. s += '<DIV ID="eyeballs" STYLE="position:absolute; ' +
    83. 'top:'+y+'; left:'+x+'; width:80; height:40;"><IMG SRC=' +
    84. '"whites.gif" border=0></DIV>';
    85. s += '<DIV ID="lefteye" STYLE="position:absolute; ' +
    86. 'top:'+(y+10)+'; left:'+(x+10)+'; width:20; height:20;">' +
    87. '<IMG SRC="pupil.gif" border=0></DIV>';
    88. s += '<DIV ID="righteye" STYLE="position:absolute; ' +
    89. 'top:'+(y+10)+'; left:'+(x+50)+'; width:20; height:20;">' +
    90. '<IMG SRC="pupil.gif" border=0></DIV>';
    91. document.writeln(s);
    92. }
    93. }
    94. function clearEyes() {
    95. if (tid) clearTimeout(tid);
    96. }
    97. placeeyes(200, 100);
    98. window.onload = setHandlers;
    99. window.onunload = clearEyes;
    100. // End -->
    101. </script>
    Alles anzeigen

    ---------------------------------------------------------------------------

    wieso bekomme ich hir das script nicht rein???
  • Hab das untere Script grade bei mir ausprobiert und es geht einwandfrei.

    Mach mal aus

    PHP-Quellcode

    1. TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
    das hier:

    PHP-Quellcode

    1. <TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>


    Mfg,n3o
    [SIZE="4"]
    Got [COLOR="DeepSkyBlue"]/[/color][COLOR="Blue"]/[/color]/M Power?
    [/SIZE]
  • ich kenn mich noch nicht so damit aus deswegen meine frage. wo finde ich den quellcode und wo im quellcode soll das stehen??


    edit// habe den qelltext in netobjekt fusion7 gefunden aber ich kann das nicht ändern???der steht auf einen grauen hintergrund. warum?:confused:
  • Keine Ahnung ich benutze diese Prog nicht.
    Am besten wärs wohl so:
    Rechtsklick auf die HTML Datei -> Öffnen mit -> Text Editor -> Suchen (Strg+F) -> Ins Suchfeld: 'TOPMARGIN=0 LEFTMARGIN=0' -> Suchen -> Finden -> Bearbeiten (wie oben beschrieben) -> Strg + S (speichern) -> Anschauen -> Fertig

    Wenn du so vorgehst dann muss es klappen ^^
    [SIZE="4"]
    Got [COLOR="DeepSkyBlue"]/[/color][COLOR="Blue"]/[/color]/M Power?
    [/SIZE]