login  Naam:   Wachtwoord: 
Registreer je!
 Forum

Werkt niet in Firefox

Offline No_Ob - 26/01/2010 16:24
Avatar van No_ObNieuw lid Hallo allemaal,

Ik ben volledig nieuw in Javascript en sta op het punt mezelf wat aan te doen 

Mijn form:
  1. <form method="post" action="" id="form1">
  2. <table class="tablenoborder">
  3. <tr id="sorttags">
  4. <td style="width:33%;">
  5. <div class="choicestagcloud">Choose amount of tags:<br /><font style="font-size:10px;">Default setting: 50</font></div>
  6. <select name="amount" id="amount">
  7. <option value="default" id="defaultamount">-- Default --</option>
  8. <option value="25">25</option>
  9. <option value="50">50</option>
  10. <option value="75">75</option>
  11. <option value="100">100</option>
  12. <option value="125">125</option>
  13. <option value="150">150</option>
  14. <option value="175">175</option>
  15. <option value="200">200</option>
  16. <option value="225">225</option>
  17. <option value="250">250</option>
  18. <option value="300">300</option>
  19. </select>
  20. </td>
  21. <td style="width:33%;">
  22. <div class="choicestagcloud">Order by:<br /><font style="font-size:10px;">Default setting: Name</font></div>
  23. <select name="orderby" id="orderby">
  24. <option value="default" id="defaultorderby">-- Default --</option>
  25. <option value="name">Name</option>
  26. <option value="count">Count</option>
  27. </select>
  28. </td>
  29. <td style="width:33%;">
  30. <div class="choicestagcloud">Sort:<br /><font style="font-size:10px;">Default setting: Random</font></div>
  31. <select name="order" id="order">
  32. <option value="default" id="defaultorder">-- Default --</option>
  33. <option value="ASC">Ascending</option>
  34. <option value="DESC">Descending</option>
  35. <option value="RAND">Random</option>
  36. </select>
  37. </td>
  38. </tr>
  39. <tr id="manualtags">
  40. <td style="width:33%;">
  41. <div class="choicestagcloud">Search tags manually<br /><font style="font-size:10px;">Default setting: cell-systems</font></div>
  42. <input type="text"
  43. name="manual-search"
  44. id="manually"
  45. value="Search tags manually"
  46. onblur="if(this.value=='') this.value='Search tags manually';"
  47. onfocus="if(this.value=='Search tags manually') this.value='';"
  48. ></input>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td id="submitbutton">
  53.  
  54. </td>
  55. </tr>
  56. </form>


De javascript functions
  1. function tagcloud_set_defaults()
  2. {
  3. document.getElementById("manually").readOnly = true;
  4. document.getElementById("radio1").checked = true;
  5. document.getElementById("manualtags").disabled = true;
  6. document.getElementById("submitbutton").innerHTML = '<input type="submit" name="submittagform" value="Search the tags"></input>';
  7. }
  8. function cs_tags_change_disabled1()
  9. {
  10. var ForM=document.getElementById("manualtags");
  11. ForM.disabled = true;
  12.  
  13. var ForM=document.getElementById("sorttags");
  14. ForM.disabled = false;
  15.  
  16. var ForM=document.getElementById("manually");
  17. ForM.readOnly = true;
  18.  
  19. var predefine = document.getElementById("amount").options.value = 'default';
  20. predefine.selected = true;
  21.  
  22. var predefine = document.getElementById("orderby").options.value = 'default';
  23. predefine.selected = true;
  24.  
  25. var predefine = document.getElementById("order").options.value = 'default';
  26. predefine.selected = true;
  27.  
  28. document.getElementById("submitbutton").innerHTML = '<input type="submit" name="submittagform" value="Search the tags"></input>';
  29. }
  30.  
  31. //On radio 2
  32. function cs_tags_change_disabled2()
  33. {
  34. var ForM=document.getElementById("sorttags");
  35. ForM.disabled = true;
  36.  
  37. var ForM=document.getElementById("manualtags");
  38. ForM.disabled = false;
  39.  
  40. var predefine = document.getElementById("amount").options.value = '';
  41. predefine;
  42.  
  43. var predefine = document.getElementById("orderby").options.value = '';
  44. predefine;
  45.  
  46. var predefine = document.getElementById("order").options.value = '';
  47. predefine;
  48.  
  49. var ForM=document.getElementById("manually");
  50. ForM.readOnly = false;
  51.  
  52. document.getElementById("submitbutton").innerHTML = '<input type="submit" name="manually" value="Search the tags"></input>';
  53. }


Er hangen een x aantal php functies tussen maar dat is niet belangrijk nu 

Dit werkt volledig in IE maar NIET in Firefox.. Helemaal niks behalve de radio button die selected moet zijn.


kan iemand me a.u.b helpen  

1 antwoord

Gesponsorde links
Offline TotempaaltJ - 27/01/2010 18:43 (laatste wijziging 27/01/2010 19:50)
Avatar van TotempaaltJ PHP interesse Dit kan niet:
  1. var predefine = document.getElementById("amount").options.value = 'default';
  2. predefine.selected = true;

Ik weet nog even niet hoe ik het moet uitleggen, maar ik denk dat je dit wilt:
  1. var predefine = document.getElementById("amount");
  2. predefine.options.value = 'default';
  3. predefine.selected = true;

Een stukje verder doe je ong hetzelfde, dat gaat ook fout!


---
van Martijn: ;)
van Thomas (AKA Martijn btw): 
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.189s