ie.busy not working well [VBA]

In our code, ie.Busy (InternetExplorer.Application Object) is not very credible. Here is what we use and works: Enum READYSTATE READYSTATE_UNINITIALIZED = 0 READYSTATE_LOADING = 1 READYSTATE_LOADED = 2 READYSTATE_INTERACTIVE = 3 READYSTATE_COMPLETE = 4 End Enum Dim strUrl Dim ie As Object Set ie = CreateObject(“InternetExplorer.Application”) ‘…. ‘ do navigation… ‘ strUrl = “http://www.example.com/” ie.Navigate … Read more

reusing Internet Explorer COM Automation Object

Try This: Set IEObject = GetObject( ,”InternetExplorer.Application” ) *Notice the comma before “InternetExplorer.Application” EDIT: Try this: Dim IE As SHDocVw.InternetExplorer Set IE = GetObject(,”InternetExplorer.Application”) You can also try this: Dim ShellApp Set ShellApp = CreateObject(“Shell.Application”) Dim ShellWindows Set ShellWindows = ShellApp.Windows() Dim i For i = 0 To ShellWindows.Count – 1 If InStr(ShellWindows.Item(i).FullName, “iexplore.exe”) <> … Read more

Showing Placeholder text for password field in IE

You could also try this… it detects that the browser does not have support for placeholder and works for all input types function FauxPlaceholder() { if(!ElementSupportAttribute(‘input’,’placeholder’)) { $(“input[placeholder]”).each(function() { var $input = $(this); $input.after(‘<input id=”‘+$input.attr(‘id’)+’-faux” style=”display:none;” type=”text” value=”‘ + $input.attr(‘placeholder’) + ‘” />’); var $faux = $(‘#’+$input.attr(‘id’)+’-faux’); $faux.show().attr(‘class’, $input.attr(‘class’)).attr(‘style’, $input.attr(‘style’)); $input.hide(); $faux.focus(function() { $faux.hide(); $input.show().focus(); … Read more

with an inner not triggering :active state in IE 8

Right, terribly over-complicated solution (and still imperfect), but: if you don’t wrap the link text in the <span>, and instead just use the <span> as a place to put your background image and position it absolutely within the <a>, then the <span> (mostly) stops blocking the :active state. Test page: http://www.pauldwaite.co.uk/test-pages/2769392/3/ HTML <a class=”button” href=”#”> … Read more

Get existing IE via VBA

A compressed combination of the above answers, here’s what works for me. GetIE Function (No references required.) Function GetIE() As Object ‘return an object for the open Internet Explorer window, or create new one For Each GetIE In CreateObject(“Shell.Application”).Windows() ‘Loop to find If (Not GetIE Is Nothing) And GetIE.Name = “Internet Explorer” Then Exit For … Read more

Javascript “window.open” code won’t work in Internet Explorer 7 or 8

It’s the space in the second parameter that’s causing it. If you use “UploadPhoto” instead of “Upload Photo”, it works: $(‘#change_photo_link’).click(function(){ $id = $(‘#id’).attr(‘value’); window.open(“photo.upload.php?id=” + $id,”UploadPhoto”, “menubar=no,width=430,height=100,toolbar=no”); }); I can’t seem to find any official reasons as to why having a space in the windowName parameter of window.open() causes an error, but it’s likely … Read more

IE Enable/Disable Proxy Settings via Registry

The problem is that IE won’t reset the proxy settings until it either closes, or has its configuration refreshed. Below is the code that I’ve used to get this working: function Refresh-System { $signature = @’ [DllImport(“wininet.dll”, SetLastError = true, CharSet=CharSet.Auto)] public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int dwBufferLength); ‘@ $INTERNET_OPTION_SETTINGS_CHANGED … Read more