Sign in to follow this  
Followers 0
AlecKieu

Help- Problem with $oForm select

9 posts in this topic

<tr>
      <td align=right>
      
      birth date&nbsp;
      </td>
      <td>
<SELECT name="birthmonth" id="birthmonth">
<OPTION  value="-1">Month
<OPTION  SELECTED value="0">01
<OPTION  value="1">02
<OPTION  value="2">03
<OPTION  value="3">04
<OPTION  value="4">05
<OPTION  value="5">06
<OPTION  value="6">07
<OPTION  value="7">08
<OPTION  value="8">09
<OPTION  value="9">10
<OPTION  value="10">11
<OPTION  value="11">12
</SELECT>

<SELECT name="birthyear" id="birthyear">
<OPTION  value="-1">Year
<OPTION  SELECTED value="1980">1980
<OPTION  value="1981">1981
<OPTION  value="1982">1982
<OPTION  value="1983">1983
<OPTION  value="1984">1984
<OPTION  value="1985">1985
<OPTION  value="1986">1986
<OPTION  value="1987">1987
<OPTION  value="1988">1988
<OPTION  value="1999">1999
<OPTION  value="2000">2000
<OPTION  value="2001">2001
</SELECT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    </tr>

This is my code for the form select:

$oBirthMonth = _IEFormElementGetObjByName($oForm, "birthmonth")

_IEFormElementOptionselect($oBirthMonth , $pBirthMonth )

$oBirthYear = _IEFormElementGetObjByName($oForm, "birthyear")

_IEFormElementOptionselect($oBirthYear , $pBirthYear )

It's not working.

Anyone here can help me.

Thank!

Share this post


Link to post
Share on other sites



<tr>
      <td align=right>
      
      birth date&nbsp;
      </td>
      <td>
<SELECT name="birthmonth" id="birthmonth">
<OPTION  value="-1">Month
<OPTION  SELECTED value="0">01
<OPTION  value="1">02
<OPTION  value="2">03
<OPTION  value="3">04
<OPTION  value="4">05
<OPTION  value="5">06
<OPTION  value="6">07
<OPTION  value="7">08
<OPTION  value="8">09
<OPTION  value="9">10
<OPTION  value="10">11
<OPTION  value="11">12
</SELECT>

<SELECT name="birthyear" id="birthyear">
<OPTION  value="-1">Year
<OPTION  SELECTED value="1980">1980
<OPTION  value="1981">1981
<OPTION  value="1982">1982
<OPTION  value="1983">1983
<OPTION  value="1984">1984
<OPTION  value="1985">1985
<OPTION  value="1986">1986
<OPTION  value="1987">1987
<OPTION  value="1988">1988
<OPTION  value="1999">1999
<OPTION  value="2000">2000
<OPTION  value="2001">2001
</SELECT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    </tr>

This is my code for the form select:

$oBirthMonth = _IEFormElementGetObjByName($oForm, "birthmonth")
_IEFormElementOptionselect($oBirthMonth , $pBirthMonth )

$oBirthYear = _IEFormElementGetObjByName($oForm, "birthyear")
_IEFormElementOptionselect($oBirthYear , $pBirthYear )

It's not working.

Anyone here can help me.

Thank!

What's not working? Getting the object reference, or setting the value? Exactly what error do you see in the console if you put _IEErrorHandlerRegister() at the top and run it from SciTE?

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

This is a form with select option.

I have a list of text file sort like this

ID| Name | Birth Date | Address

EX:

10001 | Kathy Brown | 09 | 09 | 1980 | 123 Hawaii beach....

And I want to make an autoIT that automatic update the data.

I have tried several times with another $oSelect but the birth date not change :D

Share this post


Link to post
Share on other sites

This is a form with select option.

I have a list of text file sort like this

ID| Name | Birth Date | Address

EX:

10001 | Kathy Brown | 09 | 09 | 1980 | 123 Hawaii beach....

And I want to make an autoIT that automatic update the data.

I have tried several times with another $oSelect but the birth date not change :D

You didn't answer the question. I'll try again:

What's not working? Getting the object reference, or setting the value? Exactly what error do you see in the console if you put _IEErrorHandlerRegister() at the top and run it from SciTE?

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Hi bro,

It's not setting the value,

Other field like text box it working fine.

:D

Share this post


Link to post
Share on other sites

If you don't know what the SciTe console is, please say so. Otherwise do what is requested if you expect to get help.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

I know about it, but there is no error message.

It's not setting the value in select box.

This is my code to make change in select box

$oBirthMonth = _IEFormElementGetObjByName($oForm, "birthmonth")

_IEFormElementOptionselect($oBirthMonth , $pBirthMonth )

$oBirthYear = _IEFormElementGetObjByName($oForm, "birthyear")

_IEFormElementOptionselect($oBirthYear , $pBirthYear )

Please can you help by make an html form like this and try for me.

with:

ID

Name

Birth Date

Address

........

Thank you!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\TooL\Dest\FormUpdate.au3"

>Exit code: 0 Time: 18054.200

Edited by AlecKieu

Share this post


Link to post
Share on other sites

If you want to see those functions work, run (don't just read) the examples in the helpfile. Then figure out what makes your code different.

You should create your own stand-alone example to test with and if you continue to have trouble it will be something you can post here for more help.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
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
Sign in to follow this  
Followers 0