login  Naam:   Wachtwoord: 
Registreer je!
 Forum

POPUP vlaggetjes, vaagheid :P

Offline Damage - 07/11/2005 10:09 (laatste wijziging 07/11/2005 10:50)
Avatar van DamagePHP interesse Hey ik heb dus bijvoorbeeld een nieuws systeem.

Als ik vlaggetjes wil toevoegen moet ik dus

vlag drukken en dan komt er een popup... in die popup staan de vlaggetjes... maar dan komt het probleem... als ik er 1 aan klikt zet die ze allemaal in het form... ik weet niet hoe ik het moet oplossen.

Kan iemand mij helpen?

  1. Dit is de code die ik gebruikt (javascript) ik heb het in php gedaan omdat ik met meerdere forms werkt. Dat werkt ook trouwens. Het gaat puur omdat als ik bijv 1 aan klikt dat die dan allemaal er in zet en dat moet niet, alleen die ene die je aan klikt.
  2.  
  3. <?
  4.  
  5. } else {
  6.  
  7. echo "<script>";
  8. echo "function popupinser(){";
  9.  
  10. echo "opener.document.forms['cmsform'].elements['$type'].value += ':ALB:';";
  11. echo "opener.document.forms['cmsform'].elements['$type'].value += ':AND:';";
  12. echo "opener.document.forms['cmsform'].elements['$type'].value += ':ARG:';";
  13. echo "opener.document.forms['cmsform'].elements['$type'].value += ':AUS:';";
  14. echo "opener.document.forms['cmsform'].elements['$type'].value += ':AUST:';";
  15. echo "opener.document.forms['cmsform'].elements['$type'].value += ':BR:';";
  16. echo "opener.document.forms['cmsform'].elements['$type'].value += ':BEL:';";
  17. echo "opener.document.forms['cmsform'].elements['$type'].value += ':BOL:';";
  18. echo "opener.document.forms['cmsform'].elements['$type'].value += ':BH:';";
  19. echo "opener.document.forms['cmsform'].elements['$type'].value += ':BRA:';";
  20. echo "opener.document.forms['cmsform'].elements['$type'].value += ':BUL:';";
  21. echo "opener.document.forms['cmsform'].elements['$type'].value += ':CAN:';";
  22. echo "opener.document.forms['cmsform'].elements['$type'].value += ':CAR:';";
  23. echo "opener.document.forms['cmsform'].elements['$type'].value += ':CHIL:';";
  24. echo "opener.document.forms['cmsform'].elements['$type'].value += ':CHI:';";
  25. echo "opener.document.forms['cmsform'].elements['$type'].value += ':COL:';";
  26. echo "opener.document.forms['cmsform'].elements['$type'].value += ':CRO:';";
  27. echo "opener.document.forms['cmsform'].elements['$type'].value += ':CYP:';";
  28. echo "opener.document.forms['cmsform'].elements['$type'].value += ':CR:';";
  29. echo "opener.document.forms['cmsform'].elements['$type'].value += ':DEN:';";
  30. echo "opener.document.forms['cmsform'].elements['$type'].value += ':DK:';";
  31. echo "opener.document.forms['cmsform'].elements['$type'].value += ':EST:';";
  32. echo "opener.document.forms['cmsform'].elements['$type'].value += ':EURO:';";
  33. echo "opener.document.forms['cmsform'].elements['$type'].value += ':FI:';";
  34. echo "opener.document.forms['cmsform'].elements['$type'].value += ':FIN:';";
  35. echo "opener.document.forms['cmsform'].elements['$type'].value += ':FRC:';";
  36. echo "opener.document.forms['cmsform'].elements['$type'].value += ':GER:';";
  37. echo "opener.document.forms['cmsform'].elements['$type'].value += ':ICE:';";
  38. echo "opener.document.forms['cmsform'].elements['$type'].value += ':HUN:';";
  39. echo "opener.document.forms['cmsform'].elements['$type'].value += ':IND:';";
  40. echo "opener.document.forms['cmsform'].elements['$type'].value += ':INDO:';";
  41. echo "opener.document.forms['cmsform'].elements['$type'].value += ':INTER:';";
  42. echo "opener.document.forms['cmsform'].elements['$type'].value += ':IRAN:';";
  43. echo "opener.document.forms['cmsform'].elements['$type'].value += ':IRAQ:';";
  44. echo "opener.document.forms['cmsform'].elements['$type'].value += ':IRE:';";
  45. echo "opener.document.forms['cmsform'].elements['$type'].value += ':ISR:';";
  46. echo "opener.document.forms['cmsform'].elements['$type'].value += ':ITY:';";
  47. echo "opener.document.forms['cmsform'].elements['$type'].value += ':JAP:';";
  48. echo "opener.document.forms['cmsform'].elements['$type'].value += ':KAZ:';";
  49. echo "opener.document.forms['cmsform'].elements['$type'].value += ':KOR:';";
  50. echo "opener.document.forms['cmsform'].elements['$type'].value += ':LAT:';";
  51. echo "opener.document.forms['cmsform'].elements['$type'].value += ':LS:';";
  52. echo "opener.document.forms['cmsform'].elements['$type'].value += ':LIT:';";
  53. echo "opener.document.forms['cmsform'].elements['$type'].value += ':LUX:';";
  54. echo "opener.document.forms['cmsform'].elements['$type'].value += ':MAC:';";
  55. echo "opener.document.forms['cmsform'].elements['$type'].value += ':MAL:';";
  56. echo "opener.document.forms['cmsform'].elements['$type'].value += ':MALT:';";
  57. echo "opener.document.forms['cmsform'].elements['$type'].value += ':MEX:';";
  58. echo "opener.document.forms['cmsform'].elements['$type'].value += ':MOL:';";
  59. echo "opener.document.forms['cmsform'].elements['$type'].value += ':MON:';";
  60. echo "opener.document.forms['cmsform'].elements['$type'].value += ':MOR:';";
  61. echo "opener.document.forms['cmsform'].elements['$type'].value += ':NED:';";
  62. echo "opener.document.forms['cmsform'].elements['$type'].value += ':NZ:';";
  63. echo "opener.document.forms['cmsform'].elements['$type'].value += ':NOR:';";
  64. echo "opener.document.forms['cmsform'].elements['$type'].value += ':PER:';";
  65. echo "opener.document.forms['cmsform'].elements['$type'].value += ':PHIL:';";
  66. echo "opener.document.forms['cmsform'].elements['$type'].value += ':POL:';";
  67. echo "opener.document.forms['cmsform'].elements['$type'].value += ':POR:';";
  68. echo "opener.document.forms['cmsform'].elements['$type'].value += ':ROM:';";
  69. echo "opener.document.forms['cmsform'].elements['$type'].value += ':RF:';";
  70. echo "opener.document.forms['cmsform'].elements['$type'].value += ':SM:';";
  71. echo "opener.document.forms['cmsform'].elements['$type'].value += ':SIN:';";
  72. echo "opener.document.forms['cmsform'].elements['$type'].value += ':SR:';";
  73. echo "opener.document.forms['cmsform'].elements['$type'].value += ':SLO:';";
  74. echo "opener.document.forms['cmsform'].elements['$type'].value += ':SA:';";
  75. echo "opener.document.forms['cmsform'].elements['$type'].value += ':SPA:';";
  76. echo "opener.document.forms['cmsform'].elements['$type'].value += ':SWE:';";
  77. echo "opener.document.forms['cmsform'].elements['$type'].value += ':SWI:';";
  78. echo "opener.document.forms['cmsform'].elements['$type'].value += ':SYR:';";
  79. echo "opener.document.forms['cmsform'].elements['$type'].value += ':TAI:';";
  80. echo "opener.document.forms['cmsform'].elements['$type'].value += ':TIB:';";
  81. echo "opener.document.forms['cmsform'].elements['$type'].value += ':TUN:';";
  82. echo "opener.document.forms['cmsform'].elements['$type'].value += ':TUR:';";
  83. echo "opener.document.forms['cmsform'].elements['$type'].value += ':UKR:';";
  84. echo "opener.document.forms['cmsform'].elements['$type'].value += ':UK:';";
  85. echo "opener.document.forms['cmsform'].elements['$type'].value += ':URU:';";
  86. echo "opener.document.forms['cmsform'].elements['$type'].value += ':USA:';";
  87. echo "opener.document.forms['cmsform'].elements['$type'].value += ':VEN:';";
  88. echo "}";
  89. echo "</script>";
  90. ?>


En dan nu me html

  1. Dit heb ik natuurlijk voor alle landen...
  2.  
  3. <a href="javascript:popupinser(':ALB:');"><img src="images/flags/Albania.gif" border="0"></a>


Alvast bedankt voor u reactie!

0 antwoorden

Gesponsorde links
Er zijn nog geen reacties op dit bericht.
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.191s