From: Mike G. v. a. <we...@ma...> - 2010-03-20 01:08:40
|
Log Message: ----------- added id tags as well as name tags to input items Modified Files: -------------- pg/macros: AppletObjects.pl Revision Data ------------- Index: AppletObjects.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/AppletObjects.pl,v retrieving revision 1.24 retrieving revision 1.25 diff -Lmacros/AppletObjects.pl -Lmacros/AppletObjects.pl -u -r1.24 -r1.25 --- macros/AppletObjects.pl +++ macros/AppletObjects.pl @@ -158,7 +158,7 @@ $base_64_encoded_answer_value =~ s/\r|\n//g; # get rid of line returns # debug version of the applet state answerBox and controls my $debug_input_element = qq!\n<textarea rows="4" cols="80" - name = "$appletStateName">$decoded_answer_value</textarea><br/>!; + name = "$appletStateName" id = "$appletStateName">$decoded_answer_value</textarea><br/>!; if ($getState=~/\S/) { # if getStateAlias is not an empty string $debug_input_element .= qq! <input type="button" value="$getState" @@ -193,14 +193,14 @@ } my $state_input_element = ($debugMode) ? $debug_input_element : - qq!\n<input type="hidden" name = "$appletStateName" value ="$base_64_encoded_answer_value">!; + qq!\n<input type="hidden" name = "$appletStateName" id = "$appletStateName" value ="$base_64_encoded_answer_value">!; my $reset_button_str = ($reset_button) ? - qq!<input type='submit' name='previewAnswers' value='return this question to its initial state' onClick="setAppletStateToRestart('$appletName')"><br/>! + qq!<input type='submit' name='previewAnswers' id ='previewAnswers' value='return this question to its initial state' onClick="setAppletStateToRestart('$appletName')"><br/>! : '' ; # <input type="button" value="reinitialize applet" onClick="getQE('$appletStateName').value='$base64_initialState'"/><br/> # always base64 encode the hidden answer value to prevent problems with quotes. # - $state_storage_html_code = qq!<input type="hidden" name="previous_$appletStateName" value = "$base_64_encoded_answer_value">! + $state_storage_html_code = qq!<input type="hidden" name="previous_$appletStateName" id = "previous_$appletStateName" value = "$base_64_encoded_answer_value">! . $state_input_element. $reset_button_str ; my $answerBox_code =''; |