Jump to content



Photo

Help with vbs drop box list from IE


  • Please log in to reply
3 replies to this topic

#1 daillest319

daillest319

    Seeker

  • Active Members
  • 5 posts

Posted 12 April 2012 - 03:31 PM

Hi,
I'm wirinte a vbs script to automate through a webpage.
I was hoping someone can help me with selecting from a drop box list from IE webpage.I'm able to change the value but its not submitting it or updating the page with the year i selected.


the source code on the web page is the following


  function doChange()    {    var wsub1,wsub2,wDate;    wsub1 = document.JOBLISTFORM.month.selectedIndex;    wsub2 = document.JOBLISTFORM.year.selectedIndex;    wDate = document.JOBLISTFORM.year[wsub2].value + <select id="YEAR" name=year size="1" onChange="doChange()">           <option value="2001" >2001           <option value="2002" >2002           <option value="2003" >2003    {    var wsub1,wsub2,wDate;    wsub1 = document.JOBLISTFORM.month.selectedIndex;    wsub2 = document.JOBLISTFORM.year.selectedIndex;    wDate = document.JOBLISTFORM.year[wsub2].value + document.JOBLISTFORM.month[wsub1].value + "01";    CL(wDate);    }


-----------------------------------------------------

This is the code im using to change the value and submit it change the value but it does not submit/update the page with the year i slected.....
Dim oIE Set oIE = WScript.CreateObject("InternetExplorer.Application") oIE.Document.Forms(0).Item("YEAR").Value = 2003 oIE.Document.Forms(0).Submit






#2 Melba23

Melba23

    Yes, me!

  • Moderators
  • 15,318 posts

Posted 12 April 2012 - 03:43 PM

daillest319

I'm wirinte a vbs script

Welcome to the AutoIt forum where we help people writing AutoIt scripts. ;)

Perhaps you might do better posting in a VB forum if you want help in that language? :)

M23
StringSize - Automatically size controls to fit text - ExtMsgBox - A user customisable replacement for MsgBox

Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs

Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames

GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes

ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display

RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options

GUIListViewEx - Insert, delete, move, drag and sort ListView items


#3 daillest319

daillest319

    Seeker

  • Active Members
  • 5 posts

Posted 12 April 2012 - 03:47 PM

o sorry thanks for the head up

#4 Melba23

Melba23

    Yes, me!

  • Moderators
  • 15,318 posts

Posted 12 April 2012 - 03:48 PM

daillest319,

No problem. ;)

M23
StringSize - Automatically size controls to fit text - ExtMsgBox - A user customisable replacement for MsgBox

Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs

Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames

GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes

ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display

RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options

GUIListViewEx - Insert, delete, move, drag and sort ListView items





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users