sandyd Posted June 15, 2007 Share Posted June 15, 2007 Hi all, Say I have a javascript function on a webpage called DoSomething(), how can I run that using the IE functions I have already used the IE functions to get a reference to the IE application, and to some form elements withing the page, just need to fire off the DoSomething function? Thanks in advance ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
autosc Posted June 15, 2007 Share Posted June 15, 2007 Hi all, Say I have a javascript function on a webpage called DoSomething(), how can I run that using the IE functions I have already used the IE functions to get a reference to the IE application, and to some form elements withing the page, just need to fire off the DoSomething function? Thanks in advance this might give you ideas ..... #include <IE.au3> $oIE = _IE_Example ("form") $oSubmit = _IEGetObjByName ($oIE, "submitExample") _IEAction ($oSubmit, "click") _IELoadWait ($oIE) Link to comment Share on other sites More sharing options...
sandyd Posted June 15, 2007 Author Share Posted June 15, 2007 The code in the webpage is this: <input type="button" class="button" value="Go >>" onclick="handleremctrlclick();"> as you can see there is no name for the button, so how can I click it? Any help would be most appreciated. ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
DaleHohm Posted June 15, 2007 Share Posted June 15, 2007 See the examples under _IEFormElementGetCollection using the optional index value and then use _IEAction with "click" on that object. 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...
Vindicator209 Posted June 15, 2007 Share Posted June 15, 2007 I think it can be done with: _IENavigate($oIE,"handleremctrlclick();") [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
DaleHohm Posted June 15, 2007 Share Posted June 15, 2007 I think it can be done with:_IENavigate($oIE,"handleremctrlclick();")If it is an autonomous function this is true, but if the function retrieves info from current form values or pays attention to what button/object is clicked you'll have trouble.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...
sandyd Posted June 18, 2007 Author Share Posted June 18, 2007 Its ok ppl, Found the code for the javascript function and managed to get the URL to follow through that. Thanks for everyones help ----[ SandyD ]--- 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