I just installed IE 7 RC1 and my application scripts stopped working. An example:
Dim IE, doc, pics
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "about:blank"
Do until IE.ReadyState = 4: WScript.Sleep 50: Loop
Set doc = IE.document
doc.write("test test <img src='abc.jpg'> test")
set pics = doc.all.tags("IMG")
pics.length now returns 0
Help! Help! What should I modify
Thanks in advance
kk
PS: It was still ok in the beta before RC1

IE 7 RC1 Breaks Scripts
Antarctica
The above script is complete. Just to make it more complete I have added two more lines:
Dim IE, doc, pics
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "about:blank"
Do until IE.ReadyState = 4: WScript.Sleep 50: Loop
Set doc = IE.document
doc.write("test test <img src='abc.jpg'> test")
set pics = doc.all.tags("IMG")
Wscript.echo pics.Length
Wscript.quit
Copy and paste to test.vbs. If working pics.Length should show 1 and not 0.
To double confirm I submit below a piece of code I submitted in an earlier bug report on the beta:
const HTMLText="<body>Some text<p><a href='a.html'>a</a><p><a href='b.html'>b</a><p><a href='c.html'>c</a></body>"
Dim IE, hrefs, href
for i=1 to 100
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "about:blank"
Do until IE.ReadyState = 4
WScript.Sleep 50
Loop
IE.document.write(HTMLText)
set hrefs = IE.document.all.tags("A")
for each href in hrefs
Wscript.echo href.href
next
IE.quit
set IE = nothing
next
It used to print out three lines in earlier versions of IE and the beta. Now it prints nothing.
Thanks.
drajwani
Please post workarounds soon!
Thanks in advance!
.net sukbir
Reinstalled IE 7. Put a document.close() as suggested by someone in msnews after document.write(). Didn't work either. Hope someone from IE7 team is monitoring this. connect.microsoft.com seems to have closed the doors for IE 7.
pschla
I uninstalled Windows Internet Explorer 7 RC1 and it is now back to IE 6 and my scripts now work fine.
I hope to return to IE 7 sometime in the near future. Hope this problem gets resolved soon.
Thanks
kk
S&#233;bastien Nunes
I would like to let all know that after I installed the golden IE7, everything works like before in IE6 with nothing amiss, and without me having to modify anything. Thanks Microsoft.
-kk
pasha2k
Thank you! That worked for me.
I had tried something like that before but I must have gotten it wrong, because it works now.
Darren France
Hi,
I am facing exatly the same Problem you have described, I haev to add aabout:blank to the trusted site to make my appliaction work.
Could you please let me know if you have figured out any alternative approach for this
Thanks,
Prabs
kiran1234
Urgent! Help! Help!
I have a long list of jobs held up because they use IE to extract objects in web pages.
Or how do I uninstall IE7 and get back to IE6 IE7 does not appear in Add/Remove Programs. Will uninstall leave my system in a pristine IE 6 state
JFLund
This is also an issue for me, so I hope someone can come up with a good solution. In my case, I am using the web browser control (not InternetExplorer.Application) in an MFC application. I am able to write content to the page by doing this:
(What I am doing is similar to this: http://ehartwell.com/Exoware/Tech/SettingHTMLViewTextDirectlyFromString.htm)
However, script does not run as it did before with IE6 (I get a scripting error in "about:blank" line 1). If I add "about:blank" to the trusted sites zone, then everything works fine, but I don't want to do that on user's machines as it would also affect regular instances of IE and could be a security risk.
Some possible solutions I see are:
Thanks,
Walt
alpefusk
shawn087
Try adding "about:blank" to your trusted sites list (you'll have to un-check the 'Require server verification (https:) for all sites in this zone).
I've run into a similar issue with IE embedded in VB, and this is the one trick that seems to work. Unfortunately, I don't know if this is the best way, but more importantly I'm not too keen on telling all my customers that they have to do this little hack to get scripting to work in our application. It's definitely something that worked in B3, but not RC1.
Wonder if there was a reason MS restricted this in RC1
WXS123
K. Kong,
Can you proved a full repro sample of this
IE7 will be listed in Add/Remove Programs as "Windows Internet Explorer 7" for uninstallation which will return you to IE6.
Thanks
-Dave
UniRyan
Hi,
Not sure whether it's' relevant to your problem, but try doing this:
HKLM\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BLOCK_LMZ_SCRIPT (registry key)
YourApplication.exe:DWORD(0x0) (registry value)