Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling basic http authentication in HTA / VBScript

Status
Not open for further replies.

MarcusG79

Programmer
Feb 23, 2010
1
0
0
DE
Hi,

I'm using HTA (Hypertext Application) with VBScript to display multiple webcam-feeds in an Internet Explorer window. The HTA application provides a basic html layout, which is complemented at run time. It looks something like this:

Code:
<html>
	<head>
	...
	<script language="VBScript">
		...
		// display a single frame as img
		document.all.tags("span")(j).innerHTML = "<a href='[URL unfurl="true"]http://webcam1'[/URL] target='_blank'>
		<img src='[URL unfurl="true"]http://webcam1'[/URL] height='470' width='620' 	border='none' /> </a>"

		...
		// display a permanent feed as iframe
		document.all.tags("span")(j).innerHTML = "<a href='[URL unfurl="true"]http://webcam2'[/URL] border='none' target='_blank'>
		<iframe src='[URL unfurl="true"]http://webcam2'[/URL] height='470' width='620' frameborder='0' /> </a>"
		...
	</script>
	</head>

	<body onload="Slideshow">
	<p>
		<span id="container1"></span>
		<span id="container2"></span>
	</p>
	 ...
	</body>
</html>

Now we've restricted access to the webcams and I'm trying to figure out how to handle http basic authentication in VBScript, to no avail so far. Naturally, I don't want the user/password-msgbox to pop up every time the browser accesses another camera. Providing username and password in the url ('user:password@webcam2') doesn't work with the IE version we're using, either.

Can somebody point me in the right direction?

Thanks & Regards,
Marcus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top