Hi Experts!
In a manual process, when I click the save button, it will pop-up a confirm() javascript function, so I need to click the "OK" to proceed. I am automating an upload function in a web page.
I have a problem executing an onclick function in a web page using VBA.
see below the javascript code of the "save" button.
I have no problem in clicking the "save" button, I can do that using code below
Set ElementNameV = HTMLDoc.getElementsByName("cmdsave")
ElementNameV(0).click
The problem is when I click the "save" button, the confirm pop-up will appear and the macro will stop running from there unless the pop-up had been pressed.
and so I came up in another solution removing the pop-up message using the code below.
Using that code, I am able to attach the attachment without any problem, the pop-up is gone and I am able to click save.
But the problem is, I am able to attach the file but it is not uploading in the site. Then when I review the HTML code of the web page.
using the onClick function it calls the submitbutton_click(); Javascript function, and the code for that is below
Reviewing the javascript codes, I think the upload will only run when I execute the javascript function "uploadobj.startupload();" but then I had no success in running the javascript function.
here are the codes I have tried so far:
Re Post in : http://www.mrexcel.com/forum/newthre...newthread&f=10
http://www.vbaexpress.com/forum/show...274#post324274
Bookmarks