Posts: 15
Threads: 3
Joined: Sep 2006
I want to know how to execute a javascript into a web page.
I have tried it, but without any result. Can somebody post an example?
Thanks!
Posts: 12,140
Threads: 142
Joined: Dec 2002
Some scripts can be executed using
web. Example:
Firefox: Resizeable_Textarea
Posts: 15
Threads: 3
Joined: Sep 2006
Gintaras Wrote:web "javascript:function ResizeTextArea(){document.post.message.rows*=2;}ResizeTextArea();"
I have seen this post yesterday, but my case is a little different. I need to execute a javascript that exist in the web.
I have tried writing:
web "javascript:show(8,3);"
without any result.
Posts: 12,140
Threads: 142
Joined: Dec 2002
Maybe exist better ways, but so far:
With the Find Html Element dialog, capture a link in the page. Change href attribute to execute your script. Then click. Also add code to save/restore previous href.
Htm el=htm("A" ...) ;;find element
BSTR savehref=el.el.getAttribute("href" 0) ;;save
el.el.setAttribute("href" "javascript:show(8,3)" 1) ;;change
el.Click ;;execute
el.el.setAttribute("href" savehref 1) ;;restore