Preset value of HTML Forms - iPhone SDK

Posted by laura on Stack Overflow See other posts from Stack Overflow or by laura
Published on 2010-03-18T18:49:54Z Indexed on 2010/03/18 18:51 UTC
Read the original article Hit count: 398

Filed under:
|
|
|
|

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!

© Stack Overflow or respective owner

Related posts about xcode

Related posts about iphone-sdk