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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internet Explorer Security Bug

Status
Not open for further replies.

csr500

Programmer
Sep 11, 2007
6
0
0
Good evening everyone

I am having some security issues with my code in Internet Explorer, everytime I go to my portfolio website I get that stupid IE banner, which says IE has blocked some content to prevent harm to your pc.

I will be honest my Javascript knowledge is basic at best and I found this piece of code which did what I wanted, basically have six or seven various images and on load an image was selected and used as a hyperlink to launch the site.

All of the code can be found

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" SP" "<html xmlns="<head>
<title>Cameron S Richmond | Webdesigner </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="The portfolio website for Cameron S Richmond, a London based web designer">
<meta name="keywords" content="Webdesign, web design, design, web, webdesigner, web, designer, HTML, HTML web, HTML web design, Flash, Flash web, Flash web design, Flash, Animation, Creative motion graphics, Graphics, Graphic Design, Design, 3D, 3D modelling, model 3D, London web design, Design London, Web design London, London Design Web, Cameron Richmond" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="container">

<h1>Cameron S Richmond</h1>
<h2>Webdesigner</h2>
<div id="image">
<a href="javascript:void(0);" onClick="window.open('flash.html', '','width=1270,height=826, scrollbars=auto');">
<script type="text/javascript" ><!--
function image() { };
image = new image();
number = 0;
// imageArray

image[number++] = "<img src='i/home/image_1.jpg' alt='Portfolio 1'>"
image[number++] = "<img src='i/home/image_2.jpg' alt='Portfolio 2'>"
image[number++] = "<img src='i/home/image_3.jpg' alt='Portfolio 3'>"
image[number++] = "<img src='i/home/image_4.jpg' alt='Portfolio 4'>"
image[number++] = "<img src='i/home/image_5.jpg' alt='Portfolio 5'>"
image[number++] = "<img src='i/home/image_6.jpg' alt='Portfolio 6'>"
image[number++] = "<img src='i/home/image_7.jpg' alt='Portfolio 7'>"

increment = Math.floor(Math.random() * number); document.write(image[increment]);
//-->
</script></a>
</div>
<p>System requirements: Broadband connection, 1280 x 1024 resolution, Flash 8 plug-in, IE6.0 or Firefox 1.5 </p>

</div>

</body>
</html>

Any help of reslving this matter, ie not getting tha banner would really really be very much appreciated.

Thanking everyone in advance

Cameron
 
Can you provide a link? I copied your code, and couldn't reproduce your issue.

-----------------------------------------
I cannot be bought. Find leasing information at
 
Are you viewing the site from your own PC or are you viewing it online?

Internet Explorer will flag up a security notice if you try to run Javascript on a page located on the machine used to view it. However, when served from a remote machine it will be OK.

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
Thank you both for your quick and speedy responses,

I completely forgot about the whole JavaScript running on your own pc issue, when the site is live it is fine, I do feel very silly.

Cheers

Cameron
 
Cameron,

Just some friendly advice... if you're going to advertise your services as someone who can build web sites, it's probably a good advice to learn to do so without relying solely on JavaScript to output content to the page.

It is considered very bad practice, as it can hamper accessibility and SEO - not good things at all if your [potential] clients happen to view your source.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top