Jump to content

Option Select


Recommended Posts

HTML Source Code

<UL>
<LI><LABEL for=fvFirstName><SPAN>First Name</SPAN></LABEL> 
<DIV class="text-box clrfix"><SPAN><EM><INPUT id=fvFirstName tabIndex=1 maxLength=30 size=25 name=fvFirstName jQuery1274674944476="65"> </EM></SPAN></DIV></LI>
<LI><LABEL for=fvLastName><SPAN>Last Name</SPAN></LABEL> 
<DIV class="text-box clrfix"><SPAN><EM><INPUT id=fvLastName tabIndex=2 maxLength=30 size=25 name=fvLastName jQuery1274674944476="66"> </EM></SPAN></DIV></LI>
<LI><LABEL for=fvEmail><SPAN>E-Mail Address</SPAN></LABEL> 
<DIV class="text-box clrfix"><SPAN><EM><INPUT id=fvEmail tabIndex=3 maxLength=50 size=25 name=fvEmail jQuery1274674944476="56"> </EM></SPAN></DIV></LI>
<LI><LABEL for=fvConfirmEmail><SPAN>Confirm E-Mail Address</SPAN></LABEL> 
<DIV class="text-box clrfix"><SPAN><EM><INPUT id=fvConfirmEmail tabIndex=4 maxLength=50 size=25 name=fvConfirmEmail jQuery1274674944476="67"> </EM></SPAN></DIV></LI>
<LI><LABEL for=fvAddress1><SPAN>Address</SPAN> <SMALL>(Street address only. No P.O Boxes, please.)</SMALL></LABEL> 
<DIV class="text-box lg clrfix"><SPAN><EM>g
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="162">AA</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="163">AE</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="164">AK</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="165">AL</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="166">AP</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="167">AS</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="168">AR</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="169">AZ</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="170">CA</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="171">CO</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="172">CT</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="173">DC</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="174">DE</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="175">FL</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="176">FM</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="177">GA</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="178">GU</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="179">HI</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="180">IA</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="181">ID</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="182">IL</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="183">IN</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="184">KS</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="185">KY</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="186">LA</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="187">MA</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="188">MD</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="189">ME</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="190">MH</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="191">MI</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="192">MN</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="193">MO</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="194">MP</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="195">MS</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="196">MT</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="197">NC</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="198">ND</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="199">NE</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="200">NH</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="201">NJ</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="202">NM</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="203">NV</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="204">NY</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="205">OH</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="206">OK</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="207">OR</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="208">PA</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="209">PR</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="210">PW</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="211">RI</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="212">SC</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="213">SD</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="214">TN</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="215">TX</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="216">UT</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="217">VA</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="218">VI</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="219">VT</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="220">WA</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="221">WI</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="222">WV</A></LI>
<LI class=dd-li><A href="http://server09/index.html#" s_oc="null" jQuery1274674944476="223">WY</A></LI></UL></DIV>
<DIV class=dd-ft></DIV></DD></DL> </DIV></LI>
<LI><LABEL for=fvZip><SPAN>ZIP Code</SPAN></LABEL> 
<DIV class="text-box sm clrfix"><SPAN><EM><INPUT id=fvZip tabIndex=8 maxLength=10 size=10 name=fvZip jQuery1274674944476="70"> </EM></SPAN></DIV></LI>
<LI><LABEL for=fvEvePhone><SPAN>Phone</SPAN></LABEL> <SMALL>Ex. 555 555-5555</SMALL> 
<DIV class="text-box clrfix"><SPAN><EM><INPUT id=fvEvePhone class=med tabIndex=9 maxLength=18 size=18 name=fvEvePhone jQuery1274674944476="71"> </EM></SPAN></DIV></LI>
<LI><LABEL><SPAN>Gender</SPAN></LABEL> 
<DIV class="text-box clrfix">
<UL>

I have tried:

$oSelect = _IEFormElementGetObjByName ($oForm, "fvState")
For $i = 1 To 10
    _IEFormElementOptionselect ($oSelect, $state, 1, "byText")
    Sleep(1000)
    _IEFormElementOptionselect ($oSelect, $state, 1, "byValue")
    Sleep(1000)
    _IEFormElementOptionselect ($oSelect, 0, 1, "byIndex")
    Sleep(1000)
Next

Which isn't working, I am unsure how the jquery effects the drop down list. I have looked over the examples, and have the rest of the form working just fine. Any help?

Link to comment
Share on other sites

Try using the following:

$lines = _IETagNameGetCollection($oIE, 'li')

To get all of the elements that are "LI" tags.

Then you can use a for loop to find out which one to select. In the example below, I had it click on IL:

For $line In $lines
  If StringinStr($line.innerhtml, "IL") > 0 Then
    _IEAction($line, "click")
    ExitLoop
  EndIf
Next
Edited by Affe

[center][/center]

Link to comment
Share on other sites

Tried that, after loading DebugBar, I see the following for the form:

<LI><LABEL for=fvState><SPAN>State</SPAN></LABEL> 
<DIV class="text-box sm clrfix"><SELECT style="DISPLAY: none" id=fvState tabIndex=7 name=fvState oldblock="inline"> <OPTION class=select-title value="">Select</OPTION> <OPTION value=AA jQuery1274804442925="100">AA</OPTION><OPTION value=AE jQuery1274804442925="101">AE</OPTION><OPTION value=AK jQuery1274804442925="102">AK</OPTION> <OPTION value=AL jQuery1274804442925="103">AL</OPTION><OPTION value=AP jQuery1274804442925="104">AP</OPTION><OPTION value=AS jQuery1274804442925="105">AS</OPTION> <OPTION value=AR jQuery1274804442925="106">AR</OPTION><OPTION value=AZ

$oQuery = _IEFormElementGetObjByName ($oForm, "fvState")
    _IEFormElementSetValue($oQuery, 'AL jQuery1274804222486="103">AL')

I also tried what you suggested, and even wrote out the LI tags to the console, I get the links for name, last name, and e-mail address only, none of the rest of them show up for some reason.

You gave me some good ideas though, and I ran with it for an hour or so, no luck though.

Link to comment
Share on other sites

Tried that, after loading DebugBar, I see the following for the form:

<LI><LABEL for=fvState><SPAN>State</SPAN></LABEL> 
<DIV class="text-box sm clrfix"><SELECT style="DISPLAY: none" id=fvState tabIndex=7 name=fvState oldblock="inline"> <OPTION class=select-title value="">Select</OPTION> <OPTION value=AA jQuery1274804442925="100">AA</OPTION><OPTION value=AE jQuery1274804442925="101">AE</OPTION><OPTION value=AK jQuery1274804442925="102">AK</OPTION> <OPTION value=AL jQuery1274804442925="103">AL</OPTION><OPTION value=AP jQuery1274804442925="104">AP</OPTION><OPTION value=AS jQuery1274804442925="105">AS</OPTION> <OPTION value=AR jQuery1274804442925="106">AR</OPTION><OPTION value=AZ

$oQuery = _IEFormElementGetObjByName ($oForm, "fvState")
    _IEFormElementSetValue($oQuery, 'AL jQuery1274804222486="103">AL')

I also tried what you suggested, and even wrote out the LI tags to the console, I get the links for name, last name, and e-mail address only, none of the rest of them show up for some reason.

You gave me some good ideas though, and I ran with it for an hour or so, no luck though.

Hmm, if they didn't show up within the LI tags, you could try _IELinkGetCollection() and see if that picks them up.

I didn't see any Option tags in the HTML you had provided.

Edited by Affe

[center][/center]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...