Sign in to follow this  
Followers 0
fincoop

Map/Navbar in IE

6 posts in this topic

Here's the problem. The code I am trying to use within IE has a JPG image that is carved up into sections using <map> code. I can't click on the image, there's no text, so I'm at a bit of a loss.

</div><map name="Map"><area shape="rect" coords="19,30,48,44" href="java script:safeLinkClicked=true; if(buildFormonsubmit('frmParams'))submitForm('SAVE');"> 

<area shape="rect" coords="70,23,145,44" href="java script:safeLinkClicked=true; if(buildFormonsubmit('frmParams'))submitForm('BALANCECHECK');">

<area shape="rect" coords="158,23,234,44" href="java script:safeLinkClicked=true; if(buildFormonsubmit('frmParams'))submitForm('CONTRACTCHECK'); "> 

<area shape="rect" coords="158,51,243,58" href="java script:safeLinkClicked=true; if(buildFormonsubmit('frmParams'))submitForm('SUBMIT');">

<area shape="rect" coords="227,2,243,17" href="java script:safeLinkClicked=true;pinFloatingNavb script:safeLinkClicked=true; showWindow(1);"></map><script type="text/javascript">

I need to click on BALANCECHECK and CONTRACTCHECK above...

TIA

Share this post


Link to post
Share on other sites

Could you post a link to the site? :)

_IEImgClick() doesn't work either?

Share this post


Link to post
Share on other sites

Could you post a link to the site? :)

_IEImgClick() doesn't work either?

I can't, the site is private and requires a login. _IMGClick doesn't work because a single image is cut several ways using the <map>. What other info would be useful to you?

Share this post


Link to post
Share on other sites

I think you have three choices.

First, you can get the coordinates of the Map object using _IEPropertyGet and then use MouseClick based on what you find

Second, Map elements are supposed to be part of the return for _IELink*, but I haven't test it. So you should be able to use _IELinkClickByIndex

Third, you should be able to activate the Javascript directly with $oIE.parentwindow.Eval("submitForm('CONTRACTCHECK');") for example.

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 think you have three choices.

First, you can get the coordinates of the Map object using _IEPropertyGet and then use MouseClick based on what you find

Second, Map elements are supposed to be part of the return for _IELink*, but I haven't test it. So you should be able to use _IELinkClickByIndex

Third, you should be able to activate the Javascript directly with $oIE.parentwindow.Eval("submitForm('CONTRACTCHECK');") for example.

Dale

Option 3 didn't work for me, threw an error on execution. Option two worked great, especially with the sample code in the _IELinkGetCollection help that helps find which index contains the link you want to click. I tried to modify the MsgBox code here to display the index # but couldn't get it to jive.

Anyway, thanks very much for the help!

Share this post


Link to post
Share on other sites

Cool. Glad to know that _IELink* code works with image maps.

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