Preset value of HTML Forms - iPhone SDK
- by laura
Hi.
I'm trying to preset the value of a dropdown menu and the value of a text box in an HTML form. As soon as the user taps the button in my iPhone app, it enters the webview and I was hoping to preset one of the dropdown menus and text field.
How do I go about this?
I want to set the dropdown to value "4" and the text field to "Giro Apps"
Here's the relevant HTML form code:
<select id="advSrcId" class="list" onchange="showOther($('advSrcId').options[$('advSrcId').selectedIndex].value)" name="advSrcId">
<option selected="" value="">Select</option>
<option value="1">Google</option>
<option value="2">Facebook</option>
<option value="3">Friend Referral</option>
<option value="4">Other</option>
</select>
<div id="otherAdvsrc" style="">
<p>
Please give details here:
<br/>
<input class="text" type="text" value="" name="advsrc"/>
<br/>
</p>
</div>
TIA!