Ahojte,
prosim ako upravit nizsie kod aby sa po oznaceni checkbox vysunulo pole pre "web stránku"?
Kód:
<div id="field_obrazokContainer" class="spFormRowOdd">
<div class="spFormPaymentInfo">
<input name="field_obrazokPayment" id="field_obrazokPayment" value="" type="checkbox" class="SPPaymentBox" onclick="SP_ActivatePayment( this )" />
<label for="field_obrazokPayment"> 'Logo' je platené pole. Cena je 5,00 €<br /></label>
<div style="margin-left:20px;">Kliknite na zaškrtnutie naľavo ak si prajete aktivovať túto možnosť</div>
</div>
<div class="spFormRowLeft">
<label for="field_obrazok">Logo</label>
</div>
<div class="spFormRowRight"><input name="field_obrazok" type="file" size="20" accept="image/*" id="field_obrazok" class="spFieldsData" style="width: 350px;" /> </div>
</div>
<div id="field_websiteContainer" class="spFormRowEven">
<div class="spFormRowLeft">
<label for="field_website">Web stránka</label>
</div>
<div class="spFormRowRight"><select name="field_website_protocol" id="field_website_protocol" size="1" class="spFieldsDataProtocol">
<option selected="selected" value="http">http</option>
<option value="https">https</option>
</select><span class="spFieldUrlProtocol">://</span><input type="text" name="field_website_url" value="" id="field_website_url" size="350" class="spFieldsData" maxlength="150" style="width: 350px;" /> </div>
</div>
</div>
Toto je HTML z formulara.
Skusal som nieco taketo ale nejde to
Kód:
<script type="text/javascript">
document.getElementById('field_obrazok').onclick = function(){
if (document.getElementById('field_obrazok').checked)
{
document.getElementById("field_website").style.display = "block";
}
else
{
document.getElementById("field_website").style.display = "none";
}
}
</script>
<style>
#field_website {display:none;}
</style>
Dakujem.