hey, ik heb een javascriptfunctie
en heb dit form:
mijn functie werkt echter niet en firebug geeft volgende error :document.post has no properties
iemand een idee?
alvast bedankt!
PHP:
function helpline(help) {
document.post.helpbox.value = eval(help + "_help");
}
en heb dit form:
PHP:
<form action="/NB_schrijven.php?mode=bewerk&id=18" method="post" id="post" name="post" onsubmit="return Valideren()">
<span class="NB_text">In welke categorie past het bericht?<br>
<input type="radio" name="categorie" value="0" >Nieuws<br>
<input type="radio" name="categorie" value="1" >Competitie<br>
<input type="radio" name="categorie" value="2" >Meerdaalliga<br>
<input type="radio" name="categorie" value="3" CHECKED >Tornooi<br><br></span>
<span class="NB_text">Titel:</span><br>
<input type="text" name="titel" size="45" maxlength="75" style="width:450px" tabindex="2" class="veld" value="Provinciaal jeugdcriterium"><br><br>
<span class="NB_text">Bericht:</span><br>
<input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="bbstyle(0)" onMouseOver="helpline('b')">
<input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="bbstyle(2)" onMouseOver="helpline('i')">
<input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="bbstyle(4)" onMouseOver="helpline('u')">
<input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onClick="bbstyle(14)" onMouseOver="helpline('p')">
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')">
<span class="NB_text">Textkleur:</span>
<select class="select" name="addbbcode18" onChange="bbfontstyle('<font color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + '>', '</font>');this.selectedIndex=0;" onMouseOver="helpline('s')">
<option style="color:black; background-color: #FAFAFA" value="#444444">Standaard</option>
<option style="color:darkred; background-color: #FAFAFA" value="darkred">Donkerrood</option>
<option style="color:red; background-color: #FAFAFA" value="red">Rood</option>
<option style="color:orange; background-color: #FAFAFA" value="orange">Oranje</option>
<option style="color:brown; background-color: #FAFAFA" value="brown">Bruin</option>
<option style="color:yellow; background-color: #FAFAFA" value="yellow">Geel</option>
<option style="color:green; background-color: #FAFAFA" value="green">Groen</option>
<option style="color:olive; background-color: #FAFAFA" value="olive">Olijf</option>
<option style="color:cyan; background-color: #FAFAFA" value="cyan">Cyaan</option>
<option style="color:blue; background-color: #FAFAFA" value="blue">Blauw</option>
<option style="color:darkblue; background-color: #FAFAFA" value="darkblue">Donkerblauw</option>
<option style="color:indigo; background-color: #FAFAFA" value="indigo">Indigo</option>
<option style="color:violet; background-color: #FAFAFA" value="violet">Violet</option>
<option style="color:white; background-color: #FAFAFA" value="white">Wit</option>
<option style="color:black; background-color: #FAFAFA" value="black">Zwart</option>
</select>
<span class="NB_text"><a href="javascript:bbstyle(-1)" onMouseOver="helpline('a')">Sluit tags</a><br></span>
<input type="text" name="helpbox" size="45" maxlength="100" style="width:700px; font-size:10px" class="veld" value="Tip: BBCode kan je toepassen op geselecteerde tekst" />
<textarea name="bericht" rows="15" cols="35" wrap="virtual" style="width:700px" tabindex="3" class="veld" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">
</textarea>
<input type="submit" accesskey="s" tabindex="6" name="opslaan" class="button" value="Opslaan!">
</form>
mijn functie werkt echter niet en firebug geeft volgende error :document.post has no properties
iemand een idee?
alvast bedankt!