PDA

View Full Version : access + vba + javascript



poseido
03-25-2013, 06:24 AM
Hello

I'm developing a database that based on data on a table, log in to a webpage, and fills in information on a form.
automation is done in VBA for access, but my problem riseswhen one of the fields to fill in it's not possible to write in it, but I have to open a popupwindow trough JAVASCRIPT on the page, select a value and the field fills in with that vaule.

the code in the page is:

<input type="submit" name="xm" value="...." id="xm" class="button3" onclick="javascript:return module_fyitem();">

if I call it from my VBA in access like this:
Call ie.Document.parentwindow.execScript("module_fyitem()", "Javascript")

it opens the popup window, BUT, does not retuirn then value once clicked.

for sure the problem is that javascript called from the webpage includes the "return" of the data, but my call from VBA.. not.


any solution?

SamT
05-26-2013, 10:52 AM
:dunno
Call ie.Document.parentwindow.execScript("module_fyitem(<input type="submit" name="xm" value="...." id="xm" class="button3")", "Javascript"):confused3