Jump to content

Help- Problem with $oForm select


Recommended Posts

<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!

Link to comment
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
Link to comment
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

Link to comment
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
Link to comment
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

Link to comment
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!

Link to comment
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

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...