Utilizing facebox, I am initiating a small modal dialog with a form and attempting to retrieve the value from a text field on that form using javascript. Below is the HTML code:
<div id="dialog-form95" style="display:none">
<div class="block">
<form action="" method="post" name="form95">
<h3>Setting URL</h3>
<p></p>
<p><label>URL : </label></p><input type="text" class="text" id="du95" name="url"/>
<p><input type="submit" class="submit small" value="save" onclick="updateUrl(95,109); return false;"/></p>
</form>
</div>
</div>
This is the javascript onclick function being used:
function updateUrl(bid, cid){
alert(document.getElementById('du'+bid).value);
}
Even when hardcoding "du95", upon updating the textbox content and submitting, an empty alert dialog is displayed. Additionally, nothing appears in the JavaScript console.