shootie Posted February 29, 2008 Share Posted February 29, 2008 Hi, I have 2 embedded instances of IE in my form. I want to know how I can use a LinkClick from one instance to open in the other. Right now, when I use LinkClick it opens an outside instance of IE because the link has the target=_black parameter. I want to know how I can make the link open in the second instance of IE. I would do _IENavigate, but then it has a blank referrer. Help very much appreciated, thanks. Link to comment Share on other sites More sharing options...
shootie Posted February 29, 2008 Author Share Posted February 29, 2008 Or if this is possible in normal IE, that'd work great too. It doesnt _need_ to be embedded. It just needs to open the link with a click and not open multiple windows. Link to comment Share on other sites More sharing options...
shootie Posted February 29, 2008 Author Share Posted February 29, 2008 I've been able to open a link with target=_blank into the same instance of embedded IE that it was clicked from using $oLink.target = "_self" But how do I make the target the second instance of embedded IE? Link to comment Share on other sites More sharing options...
DaleHohm Posted February 29, 2008 Share Posted February 29, 2008 You need to first set (or know) the "name" of the window or frame you want to target. you can do it like this: $oIE.document.parentwindow.name = "thisIsTheName" then you can (re)write the target of the link to be target="thisIsTheName" 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 More sharing options...
shootie Posted February 29, 2008 Author Share Posted February 29, 2008 Can't get that to work. The first instance is $oIE and the second is $oIE2 The link is getting clicked from $oIE, and should open in $oIE2 Here's what I have: $oIE2.document.parentwindow.name = "sIE2" $oLink.target = "sIE2" _IELinkClickByText ($oIE, $sLinkText) But it's not working for some reason... Link to comment Share on other sites More sharing options...
DaleHohm Posted February 29, 2008 Share Posted February 29, 2008 Do you get the same result from _IEAction($oLink, "click") 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 More sharing options...
shootie Posted February 29, 2008 Author Share Posted February 29, 2008 (edited) Yes. It just opens a new instance of non-embedded IE. And also the referrer is wrong. It could work if I just made the target "_self", and then went back to the previous page, but then the loop stops. Edited February 29, 2008 by shootie Link to comment Share on other sites More sharing options...
DaleHohm Posted February 29, 2008 Share Posted February 29, 2008 Try it with normal browsers rather than embedded for testing. 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 More sharing options...
shootie Posted March 1, 2008 Author Share Posted March 1, 2008 Still doesn't work, it's even more erratic when I don't use embedded browsers. You seem to be the guru of IE, what can I do? Link to comment Share on other sites More sharing options...
shootie Posted March 1, 2008 Author Share Posted March 1, 2008 (edited) Could I maybe insert an iFrame into the page and have the link target the iframe? This might solve the problem... Tried this, got it to work, the problem is I can't check the refferrer of the link clicked. It needs to have the correct referrer. If i click a link from a page, lets call this page "surfpage", and open it in an iframe on that same page, will the page opened by that link that opened in the iframe have the referrer "surfpage" ? And is there a way to check the referrer of the link clicked that goes to the iframe to make sure? I'm using msgbox(0, "referrer", _IEpropertyget($oIE, "referrer")) But that only gets the referrer of the "surfpage", and i need the referrer of the page in the iframe. Also what I want to know is if adding an Iframe or rewriting the target of the link will be visible in the server log files. Edited March 1, 2008 by shootie Link to comment Share on other sites More sharing options...
DaleHohm Posted March 1, 2008 Share Posted March 1, 2008 I'm happy to help further, but please post a small self-contained, example of what you're doing to give me a starting point. I don't know the answer to the logfile question - why don't you test and see? 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 More sharing options...
shootie Posted March 1, 2008 Author Share Posted March 1, 2008 I can't really test the logfile thing, my website doesn't keep logs. As for the example, I'm not really sure how to do it, I'm making an autosurfer for a PTC site. Link to comment Share on other sites More sharing options...
DaleHohm Posted March 1, 2008 Share Posted March 1, 2008 I can't really test the logfile thing, my website doesn't keep logs. As for the example, I'm not really sure how to do it, I'm making an autosurfer for a PTC site.You can't post an example of the code that gave you errors or the errors you say you received? Please try again - you won't get much help otherwise.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 More sharing options...
shootie Posted March 1, 2008 Author Share Posted March 1, 2008 I got it working with no errors by creating an iframe in the page. But my question is is the link I click that goes into the iframe will have the referrer of the page that it was clicked from. And if using $oLink.target = "blahblah" will show up on the server logfiles. Link to comment Share on other sites More sharing options...
DaleHohm Posted March 1, 2008 Share Posted March 1, 2008 I don't know and it may depend on the webserver. You'll need to test in something that approximates your target system. 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now