wedsxcrfv Posted January 14, 2008 Share Posted January 14, 2008 (edited) Well, im trying to go to a page, run a little bit of javascript on that page, but i cant! Well, my script simply goes to the webpage, but then i want the script to run the javascript just as i would insert it in the adress bar. Edited January 14, 2008 by wedsxcrfv I am not English... But that matters nothing, I'm Dutch and i SPEAK English so it doesnt matter :P Link to comment Share on other sites More sharing options...
wedsxcrfv Posted January 14, 2008 Author Share Posted January 14, 2008 Oops, i changed dthe name, problem I am not English... But that matters nothing, I'm Dutch and i SPEAK English so it doesnt matter :P Link to comment Share on other sites More sharing options...
DaleHohm Posted January 14, 2008 Share Posted January 14, 2008 See #452387 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...
wedsxcrfv Posted January 14, 2008 Author Share Posted January 14, 2008 I still dont understand it... $oIE.document.parentwindow.execScript('var x = 9; alert(x * 12);') ^This replaced by the value of the window ^Replace by my javascript? I think, but i dont get it I am not English... But that matters nothing, I'm Dutch and i SPEAK English so it doesnt matter :P Link to comment Share on other sites More sharing options...
DaleHohm Posted January 14, 2008 Share Posted January 14, 2008 Suggest you give a better description and sample code or go here and get them to post the problem description for you: http://psychichotline.net/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...
wedsxcrfv Posted January 15, 2008 Author Share Posted January 15, 2008 (edited) jkjkjkh Edited February 18, 2012 by wedsxcrfv I am not English... But that matters nothing, I'm Dutch and i SPEAK English so it doesnt matter :P Link to comment Share on other sites More sharing options...
DaleHohm Posted January 15, 2008 Share Posted January 15, 2008 And where is it that you tried using eval or execscript? 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...
wedsxcrfv Posted January 15, 2008 Author Share Posted January 15, 2008 $iescherm2 = _IEDocGetObj ($iescherm) $iescherm2.parentwindow.setTimeout("java script: {document.getElementById('imembername').value = " & $naam & "} var p = '" & $gebruikernaam & ".'; var ds = new Array('" & $domein & "'); for (var i = 0; i < ds.length; i ++){document.getElementById('idomain').options[i] = new Option(p + ds[i], p + ds[i])} sleep('1');",0) I am not English... But that matters nothing, I'm Dutch and i SPEAK English so it doesnt matter :P Link to comment Share on other sites More sharing options...
Danp2 Posted January 15, 2008 Share Posted January 15, 2008 Why is there a space between "java" and "script:"? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
DaleHohm Posted January 15, 2008 Share Posted January 15, 2008 (edited) Why is there a space between "java" and "script:"?The forum software puts it there when you save your post. Not the OP's doing.Dale Edited January 15, 2008 by DaleHohm 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...
DaleHohm Posted January 15, 2008 Share Posted January 15, 2008 $iescherm2 = _IEDocGetObj ($iescherm) $iescherm2.parentwindow.setTimeout("java script: {document.getElementById('imembername').value = " & $naam & "} var p = '" & $gebruikernaam & ".'; var ds = new Array('" & $domein & "'); for (var i = 0; i < ds.length; i ++){document.getElementById('idomain').options[i] = new Option(p + ds[i], p + ds[i])} sleep('1');",0)setTimeout creates a similar outcome to eval and execScript, but it works differently. When you pass a delay of 0 milliseconds however you are adding the complexity of a timer and asynchronous execution for no apparent reason. Unless you have a really good reason to use setTimeout you should not be using it. Please test with a much simpler javascript statement and see if you can get eval and/or execScript working and then work your way back to what you have. If there are errors in your script code it will fail silently. 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