+ Reply to Thread
Results 1 to 2 of 2

Using VBA To Execute Javascript Function

  1. #1
    Registered User
    Join Date
    08-08-2014
    Location
    Southfield, Michigan
    MS-Off Ver
    MS 2010
    Posts
    2

    Using VBA To Execute Javascript Function

    Hello all,

    I am having trouble with getting a javascript function to execute in vba. My script so far takes me to the website, logs in, goes to the correct page, and changes the drop down menu to the correct option. On this dropdown menu page there is no submit button until the drop down changes and I use .FireEvent (onchange) to make the submit button appear. The trouble I am having is with getting the submit button hit to open the new window. It seems that the submit is in a Function which I do not know how to manipulate in vba.

    The script that shows where I run the javascript to get the submit button to appear is shown below.
    Please Login or Register  to view this content.
    This is the source code showing the javascript which references a doPostBack
    Please Login or Register  to view this content.

    This is the source code for the post back function which I assume is what I need to hit submit.
    Please Login or Register  to view this content.
    Any help with this would be greatly appreciated. If any more information is needed please do let me know and I will provide what I can.

    Thanks!

  2. #2
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Using VBA To Execute Javascript Function

    This may sound way out there but sometimes to fire a java event I cant' figure out I just use send keys enter button once I already clicked the submit button. Nothing like tricking the script to make it think your a person rather than a computer. Most people don't like send keys though.
    Thank those who have helped you by clicking the Star * below their name and please mark your post [SOLVED] if it has been answered satisfactorily.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to Execute Javascript in IE
    By sugaprasad in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2014, 06:07 AM
  2. Execute javascript code on a webpage with VBA
    By menyanthe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2009, 05:23 AM
  3. Javascript function converting to Excel function
    By kamila in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-31-2007, 07:06 AM
  4. [SOLVED] How can I call a JavaScript Function from Excel VBA
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-17-2006, 10:40 AM
  5. Execute javascript help
    By Ramthebuffs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2006, 10:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1