login  Naam:   Wachtwoord: 
Registreer je!
 Forum

IE/FF Probleem

Offline stenno - 18/08/2005 18:11 (laatste wijziging 18/08/2005 18:12)
Avatar van stennoPHP interesse Ik heb hier een script dat het wel goed doet in Inter Explorer maar niet het goed doet in FireFox.

Hier het script:

  1. <html>
  2. <head>
  3. <title>Untitled</title>
  4. <script language="JavaScript" type="text/javascript">
  5. <!--
  6. function changeimage(imagenum,newfilename)
  7. {
  8. document.images[imagenum].src=newfilename;
  9. }
  10.  
  11. var divs = Array('iddiv1','iddiv2','iddiv3');
  12. var divs1 = Array('iddiv4','iddiv5','iddiv6');
  13. var div = Array('div1','div2','div3')
  14.  
  15. function Search1()
  16. {document.getElementById('iddiv').style.display = 'block';
  17. y = divs.length;
  18. for(x=0;x<y;x++)
  19. {
  20. if(parseFloat(document.getElementById(divs[x]).innerHTML) > parseFloat(document.form1.as.value) && parseFloat(document.getElementById(divs1[x]).innerHTML) < parseFloat(document.form1.sa.value))
  21. { document.getElementById(div[x]).style.display = 'block';
  22.  
  23. }
  24. else
  25. document.getElementById(div[x]).style.display = 'none';
  26. }
  27. }
  28. -->
  29. </script>
  30.  
  31. <style>
  32. <!--
  33.  
  34. A.type1:link {color:Red; text-decoration:none;}
  35. A.type1:visited {color:Red; text-decoration:none;}
  36. A.type1:active {color:Red; text-decoration:none;}
  37. A.type1:hover {color:darkRed; text-decoration:none;}
  38.  
  39. //-->
  40. </style>
  41.  
  42. </head>
  43. <BODY bgcolor="black" text="White" link="blue" alink="blue" vlink="blue">
  44.  
  45. <center>
  46. <img src="BANNER5.gif" width="749" height="210">
  47. </center>
  48.  
  49. <CENTER>
  50. <table border="0" cellspacing="0" cellpadding="0">
  51.  
  52. <tr>
  53. <td><A HREF="homepage.htm" onMouseOver="changeimage('aa441','image1on.gif');" onMouseOut="changeimage('aa441','image1.gif');" onClick="changeimage('aa441','image1off.gif');"><IMG src="image1.gif" name=aa441 border="1"></A></td>
  54. <td><A HREF="http://www.thelordsofgondor.com/register" onMouseOver="changeimage('aa447','image2on.gif');" onMouseOut="changeimage('aa447','image2.gif');" onClick="changeimage('aa447','image2off.gif');"><IMG src="image2.gif" name=aa447 border="1"></A></td>
  55. <td><A HREF="Guide.htm" onMouseOver="changeimage('aa386','image3on.gif');" onMouseOut="changeimage('aa386','image3.gif');" onClick="changeimage('aa386','image3off.gif');"><IMG src="image3.gif" name=aa386 border="1"></A></td>
  56. <td><A HREF="Calculation.htm" onMouseOver="changeimage('aa931','image4on.gif');" onMouseOut="changeimage('aa931','image4.gif');" onClick="changeimage('aa931','image4off.gif');"><IMG src="image4.gif" name=aa931 border="1"></A></td>
  57. <td><A HREF="farmlist.htm" onMouseOver="changeimage('aa030','image6on.gif');" onMouseOut="changeimage('aa030','image6.gif');" onClick="changeimage('aa030','image6off.gif');"><IMG src="image6.gif" name=aa030 border="1"></A></td>
  58. <td><A HREF="moc.htm" onMouseOver="changeimage('aa958','image7on.gif');" onMouseOut="changeimage('aa958','image7.gif');" onClick="changeimage('aa958','image7off.gif');"><IMG src="image7.gif" name=aa958 border="1"></A></td>
  59. <td><A HREF="faq.htm" onMouseOver="changeimage('aa284','image8on.gif');" onMouseOut="changeimage('aa284','image8.gif');" onClick="changeimage('aa284','image8off.gif');"><IMG src="image8.gif" name=aa284 border="1"></A></td>
  60. <td><A HREF="http://www.thelordsofgondor.com/forum" onMouseOver="changeimage('aa038','image5on.gif');" onMouseOut="changeimage('aa038','image5.gif');" onClick="changeimage('aa038','image5off.gif');"><IMG src="image5.gif" name=aa038 border="1"></A></td>
  61. </tr>
  62. </table></center>
  63. <HR size="3" width="100%">
  64. <BR>
  65.  
  66.  
  67. <center><font size="7" face="French Script MT,Vivaldi,Matura mt script capitals,times new roman"
  68. color="white"><b>Farmlist</b></font></center>
  69. <br>
  70.  
  71. <form name="form1">
  72. <center><table border="3" style="border-collapse:collapse;" cellspacing="0" cellpadding="5" width="550">
  73.  
  74. <tr>
  75. <th align="center" valign="middle" height="30" Colspan="4"><font size="4">Put your stats below:</font></th>
  76. </tr>
  77.  
  78. <tr>
  79. <td align="center" width="25%">Total Fightingforce:</td>
  80. <td align="center" width="25%"><input type="text" name="as" size="15" value="0"></td>
  81. <td align="center" width="25%">Strike action:</td>
  82. <td align="center" width="25%"><input type="text" name="sa" size="15" value="0"></td>
  83.  
  84. </tr>
  85.  
  86. </Table></center><BR>
  87.  
  88. <center>
  89.  
  90. <table>
  91. <tr>
  92. <td><input type="reset" name="reset" value="Reset" /></td>
  93. <td><input onclick="Search1()" type="button" value='Search'></td>
  94. </tr>
  95. </table>
  96.  
  97. <Br><Br>
  98.  
  99. <table id="iddiv" style='display:none' width="800" border="1" style="border-collapse:collapse;" bordercolor="" cellpadding="10" cellspacing="">
  100. <tr><td colspan="5" align="center" bgcolor="darkblue"><font size="5">Possible targets to attack:</font></td></tr>
  101. <tr align="center"><td>KOC name:</td><td>Total Fighting Force:</td><td>Defensive action:</td><td>Gold:</td><td>Updated time:</td></tr>
  102. <tr style='display:none'align="center" id='div1'><td colspan="1"><A class="type1" HREF="http://www.kingsofchaos.com" class= target="black">Warhol </a></td><td align="center" colspan="1" id='iddiv1'>1</td><td colspan="1" align="center" id='iddiv4'>4</td><td colspan="1">0 Gold</td><td colspan="1">18:00 GMT+1 </td></tr>
  103. <tr style='display:none'align="center" id='div2'><td colspan="1"><A class="type1" HREF="http://www.kingsofchaos.com" class= target="black">Stenno </a></td><td align="center" colspan="1" id='iddiv2'>2</td><td colspan="1" align="center" id='iddiv5'>5</td><td colspan="1">0 Gold</td><td colspan="1">18:00 GMT+1 </td></tr>
  104. <tr style='display:none'align="center" id='div3'><td colspan="1"><A class="type1" HREF="http://www.kingsofchaos.com" class= target="black">Arquero_1 </a></td><td align="center" colspan="1" id='iddiv3'>3</td><td colspan="1" align="center" id='iddiv6'>6</td><td colspan="1">0 Gold</td><td colspan="1">18:00 GMT+1 </td></tr>
  105.  
  106. </table>
  107.  
  108. </center>
  109.  
  110. </form>
  111.  
  112. </body>
  113. </html>


Het probleem is dat de colspan van de laatste tabel niet werkt in FireFox.

Het gaat omdit stukje:

  1. <table id="iddiv" style='display:none' width="800" border="1" style="border-collapse:collapse;" bordercolor="" cellpadding="10" cellspacing="">
  2. <tr><td colspan="5" align="center" bgcolor="darkblue"><font size="5">Possible targets to attack:</font></td></tr>
  3. <tr align="center"><td>KOC name:</td><td>Total Fighting Force:</td><td>Defensive action:</td><td>Gold:</td><td>Updated time:</td></tr>
  4. <tr style='display:none'align="center" id='div1'><td colspan="1"><A class="type1" HREF="http://www.kingsofchaos.com" class= target="black">Warhol </a></td><td align="center" colspan="1" id='iddiv1'>1</td><td colspan="1" align="center" id='iddiv4'>4</td><td colspan="1">0 Gold</td><td colspan="1">18:00 GMT+1 </td></tr>
  5. <tr style='display:none'align="center" id='div2'><td colspan="1"><A class="type1" HREF="http://www.kingsofchaos.com" class= target="black">Stenno </a></td><td align="center" colspan="1" id='iddiv2'>2</td><td colspan="1" align="center" id='iddiv5'>5</td><td colspan="1">0 Gold</td><td colspan="1">18:00 GMT+1 </td></tr>
  6. <tr style='display:none'align="center" id='div3'><td colspan="1"><A class="type1" HREF="http://www.kingsofchaos.com" class= target="black">Arquero_1 </a></td><td align="center" colspan="1" id='iddiv3'>3</td><td colspan="1" align="center" id='iddiv6'>6</td><td colspan="1">0 Gold</td><td colspan="1">18:00 GMT+1 </td></tr>
  7.  
  8. </table>


Kan iemand mij vertellen, Hoe komt dit en Hoe los ik het op??

8 antwoorden

Gesponsorde links
Offline dreamworld - 18/08/2005 18:34 (laatste wijziging 18/08/2005 18:37)
Avatar van dreamworld HTML beginner <A class="type1" HREF="http://www.kingsofchaos.com" class= target="black">

moet dat nie zijn:

<A class="type1" HREF="http://www.kingsofchaos.com" class="black">

of:
<A class="type1" HREF="http://www.kingsofchaos.com" target="_blank">

of
<A class="type1" HREF="http://www.kingsofchaos.com" class="black" target="_blank">
Offline MothZone - 18/08/2005 18:37
Avatar van MothZone PHP ver gevorderde zal wel eerder dit zijn denk ik:

<A class="type1" HREF="http://www.kingsofchaos.com" target="_blanc">
Offline dreamworld - 18/08/2005 18:38
Avatar van dreamworld HTML beginner
Citaat:
zal wel eerder dit zijn denk ik:

<A class="type1" HREF="http://www.kingsofchaos.com" target="_blanc">


Die kan nie, want _blanc bestaat nie 
Offline Martijn1989 - 18/08/2005 21:04
Avatar van Martijn1989 PHP ver gevorderde target=_blank is het 
Offline stenno - 18/08/2005 23:57
Avatar van stenno PHP interesse
ok ik heb de target=_blank verandert maar hou het zelfde probleem met die colspan.

voer het script anders zelf maar eens in je htmlkit en kijk maar een in Firefox en in Internet Explorer. De colspan doet het niet in Firefox.

Dus als iemand weet wat het probleem is, Heel graag^^ 
Offline dreamworld - 19/08/2005 00:36 (laatste wijziging 19/08/2005 00:48)
Avatar van dreamworld HTML beginner
Citaat:
voer het script anders zelf maar eens in je htmlkit en kijk maar een in Firefox en in Internet Explorer. De colspan doet het niet in Firefox.


Done, in IE en FF geeft ie allebei hetzelfde weer.. Ik zie dan Farmlist met daaronder de mogelijkheid om 2 velden (naast elkaar) in te vullen en kan dan op reset of search te duwen... Druk ik dan op search dan gaat ie daarna idd de soep in..

Maar verwijder: style='display:none' eens waar de tabel begint en probeer het nog eens (hier doet ie het dan in IE & FF)

En der staan nog een paar meer foutjes in zie ik.. je haalt dan ook css en html door elkaar, beter is dit gescheiden te houden.
Offline Rens - 19/08/2005 10:48
Avatar van Rens Gouden medaille

Crew algemeen
Ik heb je code even W3C valid gemaakt.

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Untitled</title>
  5. <script language="JavaScript" type="text/javascript">
  6. <!--
  7. function changeimage(imagenum,newfilename)
  8. {
  9. document.images[imagenum].src=newfilename;
  10. }
  11.  
  12. var divs = Array('iddiv1','iddiv2','iddiv3');
  13. var divs1 = Array('iddiv4','iddiv5','iddiv6');
  14. var div = Array('div1','div2','div3')
  15.  
  16. function Search1()
  17. {document.getElementById('iddiv').style.display = 'block';
  18. y = divs.length;
  19. for(x=0;x<y;x++)
  20. {
  21. if(parseFloat(document.getElementById(divs[x]).innerHTML) > parseFloat(document.form1.as.value) && parseFloat(document.getElementById(divs1[x]).innerHTML) < parseFloat(document.form1.sa.value))
  22. { document.getElementById(div[x]).style.display = 'block';
  23.  
  24. }
  25. else
  26. document.getElementById(div[x]).style.display = 'none';
  27. }
  28. }
  29. -->
  30. </script>
  31.  
  32. <style>
  33. <!--
  34.  
  35. A.type1:link {color:Red; text-decoration:none;}
  36. A.type1:visited {color:Red; text-decoration:none;}
  37. A.type1:active {color:Red; text-decoration:none;}
  38. A.type1:hover {color:darkRed; text-decoration:none;}
  39.  
  40. //-->
  41. </style>
  42.  
  43. </head>
  44. <BODY bgcolor="black" text="White" link="blue" alink="blue" vlink="blue">
  45.  
  46. <center>
  47. <img src="BANNER5.gif" width="749" height="210">
  48. </center>
  49.  
  50. <CENTER>
  51. <table border="0" cellspacing="0" cellpadding="0">
  52.  
  53. <tr>
  54. <td><A HREF="homepage.htm" onMouseOver="changeimage('aa441','image1on.gif');" onMouseOut="changeimage('aa441','image1.gif');" onClick="changeimage('aa441','image1off.gif');"><IMG src="image1.gif" name=aa441 border="1"></A></td>
  55. <td><A HREF="http://www.thelordsofgondor.com/register" onMouseOver="changeimage('aa447','image2on.gif');" onMouseOut="changeimage('aa447','image2.gif');" onClick="changeimage('aa447','image2off.gif');"><IMG src="image2.gif" name=aa447 border="1"></A></td>
  56. <td><A HREF="Guide.htm" onMouseOver="changeimage('aa386','image3on.gif');" onMouseOut="changeimage('aa386','image3.gif');" onClick="changeimage('aa386','image3off.gif');"><IMG src="image3.gif" name=aa386 border="1"></A></td>
  57. <td><A HREF="Calculation.htm" onMouseOver="changeimage('aa931','image4on.gif');" onMouseOut="changeimage('aa931','image4.gif');" onClick="changeimage('aa931','image4off.gif');"><IMG src="image4.gif" name=aa931 border="1"></A></td>
  58. <td><A HREF="farmlist.htm" onMouseOver="changeimage('aa030','image6on.gif');" onMouseOut="changeimage('aa030','image6.gif');" onClick="changeimage('aa030','image6off.gif');"><IMG src="image6.gif" name=aa030 border="1"></A></td>
  59. <td><A HREF="moc.htm" onMouseOver="changeimage('aa958','image7on.gif');" onMouseOut="changeimage('aa958','image7.gif');" onClick="changeimage('aa958','image7off.gif');"><IMG src="image7.gif" name=aa958 border="1"></A></td>
  60. <td><A HREF="faq.htm" onMouseOver="changeimage('aa284','image8on.gif');" onMouseOut="changeimage('aa284','image8.gif');" onClick="changeimage('aa284','image8off.gif');"><IMG src="image8.gif" name=aa284 border="1"></A></td>
  61. <td><A HREF="http://www.thelordsofgondor.com/forum" onMouseOver="changeimage('aa038','image5on.gif');" onMouseOut="changeimage('aa038','image5.gif');" onClick="changeimage('aa038','image5off.gif');"><IMG src="image5.gif" name=aa038 border="1"></A></td>
  62. </tr>
  63. </table></center>
  64. <HR size="3" width="100%">
  65. <BR>
  66.  
  67.  
  68. <center><font size="7" face="French Script MT,Vivaldi,Matura mt script capitals,times new roman"
  69. color="white"><b>Farmlist</b></font></center>
  70. <br>
  71.  
  72. <form name="form1" action="bestandsnaam.html">
  73. <center><table border="3" style="border-collapse:collapse;" cellspacing="0" cellpadding="5" width="550">
  74.  
  75. <tr>
  76. <th align="center" valign="middle" height="30" Colspan="4"><font size="4">Put your stats below:</font></th>
  77. </tr>
  78.  
  79. <tr>
  80. <td align="center" width="25%">Total Fightingforce:</td>
  81. <td align="center" width="25%"><input type="text" name="as" size="15" value="0"></td>
  82. <td align="center" width="25%">Strike action:</td>
  83. <td align="center" width="25%"><input type="text" name="sa" size="15" value="0"></td>
  84.  
  85. </tr>
  86.  
  87. </Table></center><BR>
  88.  
  89. <center>
  90.  
  91. <table>
  92. <tr>
  93. <td><input type="reset" name="reset" value="Reset" /></td>
  94. <td><input onclick="Search1()" type="button" value='Search'></td>
  95. </tr>
  96. </table>
  97.  
  98. <Br><Br>
  99.  
  100. <table id="iddiv" width="800" border="1" style="border-collapse:collapse;display:none" cellpadding="10">
  101. <tr><td colspan="5" align="center"><font size="5">Possible targets to attack:</font></td></tr>
  102. <tr align="center"><td>KOC name:</td><td>Total Fighting Force:</td><td>Defensive action:</td><td>Gold:</td><td>Updated time:</td></tr>
  103. <tr style='display:none'align="center" id='div1'><td colspan="1"><A class="type1" HREF="http://www.kingsofchaos.com" target="_blank">Warhol </a></td><td align="center" colspan="1" id='iddiv1'>1</td><td colspan="1" align="center" id='iddiv4'>4</td><td colspan="1">0 Gold</td><td colspan="1">18:00 GMT+1 </td></tr>
  104. <tr style='display:none'align="center" id='div2'><td colspan="1"><A class="type1" HREF="http://www.kingsofchaos.com" target="_blank">Stenno </a></td><td align="center" colspan="1" id='iddiv2'>2</td><td colspan="1" align="center" id='iddiv5'>5</td><td colspan="1">0 Gold</td><td colspan="1">18:00 GMT+1 </td></tr>
  105. <tr style='display:none'align="center" id='div3'><td colspan="1"><A class="type1" HREF="http://www.kingsofchaos.com" target="_blank">Arquero_1 </a></td><td align="center" colspan="1" id='iddiv3'>3</td><td colspan="1" align="center" id='iddiv6'>6</td><td colspan="1">0 Gold</td><td colspan="1">18:00 GMT+1 </td></tr>
  106.  
  107. </table>
  108.  
  109. </center>
  110.  
  111. </form>
  112.  
  113. </body>
  114. </html>


Je had er een bgcolor instaan, darkblue, die bestaat niet.

En op regel 72 moet je nog iets aanpassen:
  1. <form name="form1" action="bestandsnaam.html">

Je had er geen action bij staan.
Nu moet je bestandsnaam.html ff veranderen in de naam die jij aan dat bestandje hebt gegeven.
Offline stenno - 19/08/2005 18:01 (laatste wijziging 21/08/2005 21:08)
Avatar van stenno PHP interesse Geprobeerd maar helaas het werkt niet.
Weet iemand waarrom de colspan niet werkt in FireFox bij een tabel met (display:'none')'s erin
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.252s