Jump to content

onClick vs _IENavigate


fhanna
 Share

Recommended Posts

In the past I have utilized the _IENavigate function to link to sites with no problem. Now it appears the results are different due to java scriptiing within the link. If I physically click on the link then the result is different than the script I run to navigate.

My question: How do I execute the js via IE functions?

Example of html code:

<tr>

<td width=50 valign=top><script src='/lib/dls_url.js' language='javascript'></script><ahref="https://dba.iacd.scdata.org/doc1/0771694928"

onclick="goDLS('https://dba.iacd.scdata.org/doc1/0771694928','34679','1257','','','','36701665');return(false);">1</a></td>

<td width=150>Main Document </td>

<td width=400>3 pages</td>

</tr>

Link to comment
Share on other sites

In the past I have utilized the _IENavigate function to link to sites with no problem. Now it appears the results are different due to java scriptiing within the link. If I physically click on the link then the result is different than the script I run to navigate.

My question: How do I execute the js via IE functions?

Example of html code:

<tr>

<td width=50 valign=top><script src='/lib/dls_url.js' language='javascript'></script><ahref="https://dba.iacd.scdata.org/doc1/0771694928"

onclick="goDLS('https://dba.iacd.scdata.org/doc1/0771694928,34679,1257,,,,36701665');return(false);">1</a></td>

<td width=150>Main Document </td>

<td width=400>3 pages</td>

</tr>

I'm pretty sure you're looking for _IEAction ($oLink, "click").... the help file actually mentions using _IEAction for javascript events if you look under _IELinkClickByText. Let me know if thats what your looking for.

EDIT because its not worth another post: Ha Dale I swear I try to help you out fielding some of the IE.au3 questions I swear! Oh well I'll learn someday....

Edited by someone
While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Link to comment
Share on other sites

The remark in the helpfile for _IELinkClickByText is referring to onclick events attached to things like <DIV> elements (even though they appear to be links, they would not be found). This one is actually a link (<A>), so you can use _IELinkClickByText - that function actually does a $oLink.click which activates the onclick event.

So _IELinkClickByText($oIE, "1") or _IELinkClickByIndex should do the job for you.

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

The remark in the helpfile for _IELinkClickByText is referring to onclick events attached to things like <DIV> elements (even though they appear to be links, they would not be found). This one is actually a link (<A>), so you can use _IELinkClickByText - that function actually does a $oLink.click which activates the onclick event.

So _IELinkClickByText($oIE, "1") or _IELinkClickByIndex should do the job for you.

Dale

Thank you!!!

Works!!!

Would like to expand. I am processing multiple links from 1 page as mentioned by storing the urls in an array and _IENavigating to each page, taking an action then _IENavigate to the next.

Now that I would link via _IELinkClickByText would I need to page back to the web page for the second link, etc, etc. but prefer to go to subsequent links. Is that possible by storing the info in the array and if so an example is greatly appreciated.

Thanking you in advance.

Link to comment
Share on other sites

Now that I would link via _IELinkClickByText would I need to page back to the web page for the second link, etc, etc. but prefer to go to subsequent links. Is that possible by storing the info in the array and if so an example is greatly appreciated.

I don't understand the question.

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 don't understand the question.

Dale

First, thank you for your support, and secondly, sorry for the confustion.

I have a web page that will have multiple links. Followig extracted code for example:

<onclick="goDLS('https://dba.iacd.scdata.org/doc1/0771694928,34679,1257,,,,36701665');return(false);">1</a></td>

<onclick="goDLS('https://dba.iacd.scdata.org/doc1/0771694929,34679,1257,,,,36701665');return(false);">2</a></td>

<onclick="goDLS('https://dba.iacd.scdata.org/doc1/0771694930,34679,1257,,,,36701665');return(false);">3</a></td>

As mentioned I retrieved the links and stored in an array and _IENavigated to each. You help me by doing an onclick IE function for js issues.

Since I have multiple documents, ie 1, 2, 3 is there a way to store additional info in the array (as I am doing for _IENavigate) so as I do not have to return to the webpage with the multiple links to do the second, third _IELinkClickByText or Index.

IOW store the necessary url info to pass from one main page to the next via the _IELinkClickByText or Index without the multiple link page having to be displayed after the initial display.

I hope this is a little clearer.

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