Hi, i have to use code abode but it is not work:
<select name="field_soure_default[value]" class="form-select" id="edit-field-soure-default-value" >
- None -
choloco
myamilo
yahoo
other
>
and one text box:
<input type="text" name="field_source[0][value]" id="edit-field-source-0-value" size="60" value="" class="form-text required text" />
i have to change code abode:
$("#edit-field-soure-default-value").change(function() {
var num = parseInt($(this).val());
$("edit-field-source-0-value").html("");
for(var i = 0; i < num; i++) {
$("edit-field-source-0-value").append("
");
}
});
but it's not works.
and i am to change :
$(function()
{
$('#edit-field-soure-default-value')
.after( '' )
.find( 'option' ).each( function()
{
var $option = $(this);
$option
.data( '$input', $( '' + $option.text() + ':
').appendTo( '#edit-field-source-0-value' ).hide() )
.bind( 'toggle-input', function()
{
var $option = $(this);
var $input = $option.data( '$input' );
if ( $option[0].selected )
{
$input.show();
} else {
$input.hide();
}
})
.bind( 'click', function()
{
$(this).siblings().andSelf().trigger( 'toggle-input' );
})
.trigger( 'toggle-input' )
;
})
;
});
and it's not work.
Please help!