PDA

View Full Version : Runnung JavaScripts as a button.



chacanger
01-19-2011, 02:52 PM
Hi

I have a slightly difficult task of automating a web page that is layed out with columns and rows of information that includes some strange buttons that have no names, a piece of InfoPath Forms Service and to top it all off a search on a webpage for certian text.

It's going to be hard to explain but I'll do my best.

Firstly I need to type into a field which I can put in the value 0000/000000000, then I need to press a drop down box, I can get this to work...

Sub OpenQTM()

Dim ie As InternetExplorer
Set ie = New InternetExplorer

AccRef = "ss_ct100_m_g_6ef75031_9119_4f7f_b93b_cc0ad577877a_NTREF"
WrkList = "ct100_m_g_6ef75031_9119_4f7f_b93b_cc0ad577877a_Locatorlist"

ie.Navigate "The web page I open"
Do Until ie.ReadyState = READYSTATE_COMPLETE

Loop

ie.Visible = True
ie.StatusBar = False
ie.Toolbar = False

ie.Document.getelementbyid(AcRef).Value = "0000/000000000"
ie.Document.getelementbyid(WrkList).Value = "GLOBAL"

'This is were the button needs pressing...

The button seems to be a picture of a folder, I tried copying it into Excel to see exactly what sort of object it was, but it seems to just be plain text with no hyperlink and the picture, however it seems there is a hidden HTML Text Box. It has a huge name that has all the names of the column titles in the web page. I do have an example screen-shot of what the page looks like but I can't upload it until I post 5 posts. Also looking into it a bit more some of the buttons which are pictures run javascripts to get to another page with the accounts info.

I won't go into the InfoPath part just yet because this is another long thing to explain. :eek:

If anyone has any solutions I would love to hear them, please note though I can't use external programs as the network disables the use of any uploads.

Many Thanks

Chacanger

p45cal
02-23-2011, 05:34 AM
If you're allowed to go to
http://slayeroffice.com/tools/modi/v2.0/modi_help.html
then bookmark it as instructed.
This should allow you to explore a bit more.
Similarly, if you use FireFox, you can try the Firebug add-on, which itself has further add-ons to enhance it.

I hardly ever use IE but, at least on mine (IE8, on XP sp3) there is a Tools|DeveloperTools with an F12 shortcut that has loads of stuff.
Also, in my surfing I came across someone recommending an online utility for IE: http://www.firebugger.com/

chacanger
02-23-2011, 11:10 AM
If you're allowed to go to
http://slayeroffice.com/tools/modi/v2.0/modi_help.html
then bookmark it as instructed.
This should allow you to explore a bit more.
Similarly, if you use FireFox, you can try the Firebug add-on, which itself has further add-ons to enhance it.

I hardly ever use IE but, at least on mine (IE8, on XP sp3) there is a Tools|DeveloperTools with an F12 shortcut that has loads of stuff.
Also, in my surfing I came across someone recommending an online utility for IE: http://www.firebugger.com/

I think I might have to give up on the idea actually, thanks for the help though, there wree to many things to think about on this project.