July 22, 200916 yr Another technique that recently occurred to me relates to injecting JavaScript into an already-loaded web page within webviewer. Interestingly, this can be accomplished without *any* plugins. The utility in this is that you can submit a form post to a site requiring cookies, previous login, etc, and specify *only* those fields such as login/password, no need to code hidden fields, tokens, session parameter fields, dynamic timestamps, etc. To achieve this, after, say, loading http://www.google.com, you pause until page loads, then set the url to "javascript:void(document.f.q.value = 'whatyouwant to search for');" this will cause the search field to go to "whatyouwant to search for"; you'll see it in webviewer as if you typed it. Pause again, then set the URL to "javascript:document.f.submit();" and pause again; the form will submit. Goggle isn't the most useful example, since it can be searched with a 'get' request. By setting the javascript to void you are suppressing a return value so the current page is not lost. This should allow you to run Javascripts to click buttons on an external page, etc without plugins. This technique works because a javascript: in the URL causes the javascript to run immediately.
September 3, 200916 yr Hi fseipel. My attempt at this technique was unsuccessful. I just tried pasting in the javascript command into my url field after the page loaded. Can you point out what I'm doing wrong or post a simple demo? Thanks in advance.
Create an account or sign in to comment