KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to submit a form through onclick event on tag. I have tried triggering document.myform.submit(), this.form.submit(), parentNode.submit() etc. but none of this is working! Using a submit button, the code works fine. But I want to use tag in place of that. Need some help. <form id="myform" name="myform" method="POST" action="process_edit_questionnaire.php?project=<?php echo $project_id; ?>"> <input name="module" type="hidden" value="<?php echo $module_id;?>"/> <input name="project" type="hidden" value="<?php echo $project_id;?>"/> <input name="hidden_ques_id" type="hidden" value="<?php echo $data_array_ques[$j]['ques_id'];?>"/> <div id="question_block"> <div id="serial_block"> <p id="s_original_<?php echo $j+1; ?>"><a href="#" onclick="showSelectBox(<?php echo $j+1; ?>)">Serial : <?php if($data_array_ques[$j]['ques_position']==NULL){ echo $j+1; } else { echo $data_array_ques[$j]['ques_position']; } ?></a></p> <p id="s_select_box_<?php echo $j+1; ?>" style="display: none;">Serial : <select name="serial"> <?php for($p=1;$p<=count($data_array_ques);$p++){ ?> <option value="<?php echo $p; ?>" <?php if($p==$data_array_ques[$j]['ques_position']){ echo "selected=\"selected\"";} ?> ><?php echo $p; ?></option> <?php } ?> </select> </p> </div>
Tags (comma-separated)
Save Edits
Cancel