W
William
My first time posting to clj , I have already read
http://jibbering.com/faq/#FAQ2_3 before posting.
javascript function in question:
saveText() is as follows:
function saveText( scroll_list, t_area, listToBeUpdated ) {
alert( listToBeUpdated.name );
// need to know which list to add the value in textarea back into
for(var i = 0; i < scroll_list.options.length; i++) {
if( scroll_list.options.selected == true ) {
scroll_list.options.text = t_area.value;
break;
}
}
// push new value to the corresponding scrolling_list
// then use this scrolling_list to update the dummylist
if ( listToBeUpdated.name == "bo_fo_emails" ) {
// push ( \@BO_FO_EMAILS, t_area.value );
}
}
The webpage is produced with the following Perl code:
print $query->td(
$query->textarea(-name=>'BOFOEmails',
-onChange=>"saveText( this.form.bo_fo_emails,
this.form.BOFOEmails,
this.form.bo_fo_emails )"),
$query->p,
$query->button(-name=>'ADD',
-value=>'Confirm Modifications',
-onClick=>"move(index, this.form.BOFOEmails,
this.form.bo_fo_emails)"),
$query->button(-name=>'REMOVE',
-value=>'Edit Selected Entry',
-onClick=>"edit( this.form.bo_fo_emails,
this.form.BOFOEmails)"));
Basically, I am trying to remove scroll_list.options.text from
@BO_FO_EMAILS and replace it with t_area.value.
Order of elements does matter in BO_FO_EMails. ie.
scroll_list.options.text must be in the same relative position as
t_area.value in @BO_FO_EMAILS.
Problem:
push ( \@BO_FO_EMAILS, t_area.value );
gives a javascript error "Error on Page". How do I update @BO_FO_EMAILS
within the javascript function saveText()?
http://jibbering.com/faq/#FAQ2_3 before posting.
javascript function in question:
saveText() is as follows:
function saveText( scroll_list, t_area, listToBeUpdated ) {
alert( listToBeUpdated.name );
// need to know which list to add the value in textarea back into
for(var i = 0; i < scroll_list.options.length; i++) {
if( scroll_list.options.selected == true ) {
scroll_list.options.text = t_area.value;
break;
}
}
// push new value to the corresponding scrolling_list
// then use this scrolling_list to update the dummylist
if ( listToBeUpdated.name == "bo_fo_emails" ) {
// push ( \@BO_FO_EMAILS, t_area.value );
}
}
The webpage is produced with the following Perl code:
print $query->td(
$query->textarea(-name=>'BOFOEmails',
-onChange=>"saveText( this.form.bo_fo_emails,
this.form.BOFOEmails,
this.form.bo_fo_emails )"),
$query->p,
$query->button(-name=>'ADD',
-value=>'Confirm Modifications',
-onClick=>"move(index, this.form.BOFOEmails,
this.form.bo_fo_emails)"),
$query->button(-name=>'REMOVE',
-value=>'Edit Selected Entry',
-onClick=>"edit( this.form.bo_fo_emails,
this.form.BOFOEmails)"));
Basically, I am trying to remove scroll_list.options.text from
@BO_FO_EMAILS and replace it with t_area.value.
Order of elements does matter in BO_FO_EMails. ie.
scroll_list.options.text must be in the same relative position as
t_area.value in @BO_FO_EMAILS.
Problem:
push ( \@BO_FO_EMAILS, t_area.value );
gives a javascript error "Error on Page". How do I update @BO_FO_EMAILS
within the javascript function saveText()?