Sign in to follow this  
Followers 0
cad29

_IEForm DUPLICATE

8 posts in this topic

Hi im having a problem of putting value in a form because the input name is the same

heres the code

<TD align="LEFT" nowrap>

<INPUT name="PUTVALUE" onchange="JS_UpdateFlag('PUTVALUE',1)" type="Text" size="10" maxlength="40" value="VALUE1">

</TD>

<TD align="LEFT" nowrap>

<INPUT name="PUTVALUE" onchange="JS_UpdateFlag('PUTVALUE,2)" type="Text" size="10" maxlength="40" value="VALUE2">

</TD>

<TD align="CENTER" nowrap>

I was able to put value in VALUE1 automatically since thats the first one but i cant send input in the Value2 because it goes into the first one any help please thanks

Share this post


Link to post
Share on other sites



Any help please thanks

Share this post


Link to post
Share on other sites

__ IEFormElementGetObjByName has an index parameter designed just for this situation.

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

Hi dale thanks for the reply yah i already used the _IEFormElementGetObjByName

$oForm = _IEFormGetObjByName ($oFrame, "exampleform")

$oText = _IEFormElementGetObjByName ($oForm, "PUTVALUE")

_IEFormElementSetValue ($oText,"TESTING")

this script will replace the value in the value="VALUE1"

how about if i want to replaced the VALUE2?

Thanks for the help

Share this post


Link to post
Share on other sites

Hi dale thanks for the reply yah i already used the _IEFormElementGetObjByName

$oForm = _IEFormGetObjByName ($oFrame, "exampleform")

$oText = _IEFormElementGetObjByName ($oForm, "PUTVALUE")

_IEFormElementSetValue ($oText,"TESTING")

this script will replace the value in the value="VALUE1"

how about if i want to replaced the VALUE2?

Thanks for the help

_IEFormElementGetObjByName ( ByRef $o_object, $s_name [, $i_index = 0] )

The index value lets you get a reference to subsequent elements with the same name... use 1 instead of the default.

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

Hi Dale thanks for the reply

i tried this script and it doesnt work

$oText = _IEFormElementGetObjByName ($oForm, "PUTVALUE"[, "VALUE1"= 1])

_IEFormElementSetValue ($oText,"TESTING")

it gives me an error of ERROR: syntax error

$oText = _IEFormElementGetObjByName ($oForm, "PUTVALUE"[, "VALUE1"= 1]

can you plese show some script the index that im using is the VALUE1 and i want to replaced it with a new value

thanks a lot Dale you are a big help

Share this post


Link to post
Share on other sites

That was a cut and paste from the syntax given in the helpfile. Square brackets signify optional parameters.

valid syntax would be:

$oText = _IEFormElementGetObjByName ($oForm, "PUTVALUE", 1)

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

Hi Dale thanks a lot my script is working now thanks for the help

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