Sign in to follow this  
Followers 0
cad29

_IEFormElementGetValue

6 posts in this topic

Hi need help is it possible to get value on a element even do this is not under INPUT type its under into table or tr

<TABLE>

<td align='left'><b>Item: </b>NAME</td>

</Table>

i want to have that name being copy i know how to used the _IEFormElementGetValue if it is under with INPUT TYPE theres problem but i cant do it if its under in the table please help thanks

Share this post


Link to post
Share on other sites



Since this pieve of data is in a table, see _IETableWriteToArray()

In general, if you construct a reference to the object containing the data you want, you can use one of these 4 properties to get what is contained: .innerText, .innerHTML, .outerText or .outerHTML (the .innerXXX properties are the most common -- see MSDN for more information).

For example:

$oThing = _IEGetObjByName($oIE, "something")
$sText = $oThing.innerText

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 what object that im going to refer into?is it the form object because i tried it doesnt work thanks

Share this post


Link to post
Share on other sites

The object that holds the data that you want of course.


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

Thanks dale for the reply ok heres the complete source

<FORM name=DataForm><INPUT type=hidden name=txtNo value='123456' >

<INPUT TYPE=hidden name=txtOptions value="NOTES,EDIT,STORY">

<INPUT TYPE=hidden name=txtStatusCodeType value="12">

<INPUT TYPE=hidden name=txtvalue="TESTING"></FORM>

<a name='general'></a>

<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%' ALIGN=CENTER>

<tr>

<td ALIGN=CENTER BGCOLOR='LIGHTBLUE'><H1><STRONG>Details</STRONG></H1></td>

</tr>

</TABLE>

<table border=0 cellpadding=0 cellspacing=0 width='100%'>

<tr>

<td align='left' width='25%'><b>NEEDTOGETVALUE: </b>123456 </td>

<td align='left' width='75%' nowrap><b>TXTVALUE </b>THIS IS JUST TESTING</td>

</tr>

</table>

Ok on that source i dont have problem on getting the value on "txtNo" i know how to get that value using a form _IEFormElementGetValue.But my problem is I want to get the value input in "TXTVALUE" I want to display what is the value of it like the inside value is "THIS IS JUST TESTING" i want a script to display this one

I tried this script but it doesnt work

$oIE =("www.examples.com", 1)

$oForm = _IEFormGetObjByName ($oIE, "DataForm")

$oThing = _IEGetObjByName($oForm, "txtNo")

$sText = $oThing.innerText

MsgBox(0,"Testing",$sText)

I got this problem

C:\Auto it script\testing.au3 (15) : ==> Variable must be of type "Object".:

when i replace the txtNo with general i dont have error but it just display the result of zero thanks again dale in advanced for the help

Share this post


Link to post
Share on other sites

<INPUT TYPE=hidden name=txtvalue="TESTING">

This is invalid syntax and is likely confusing the DOM: name=txtvalue="TESTING"

Also, please run your code in SciTe and pay attention to any messages it displays in the console. Please include those messages in any future questions about this.

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