Show/Hide div's with XP SP2

S

Steve Coates

i have some real simple code that sets the style.display = 'none' when
an img is selected.

function HideDiv(obj)
{
obj.style.display = 'none';
}

and the image tag appears like this

<img src="..." onclick="HideDiv(this);"/>

works great!

NOT ANYMORE after installing SP2! anybody know of another way of
doing this without i.e. telling the user that we are going to
supposidly hack their computer.

tia, s
 
H

Hywel Jenkins

i have some real simple code that sets the style.display = 'none' when
an img is selected.

function HideDiv(obj)
{
obj.style.display = 'none';
}

and the image tag appears like this

<img src="..." onclick="HideDiv(this);"/>

works great!

NOT ANYMORE after installing SP2! anybody know of another way of
doing this without i.e. telling the user that we are going to
supposidly hack their computer.

Have you tried it with getElementById() and passing the ID to the
function rather than just "this"?
 
G

Grant Wagner

Steve said:
i have some real simple code that sets the style.display = 'none' when
an img is selected.

function HideDiv(obj)
{
obj.style.display = 'none';
}

and the image tag appears like this

<img src="..." onclick="HideDiv(this);"/>

works great!

NOT ANYMORE after installing SP2! anybody know of another way of
doing this without i.e. telling the user that we are going to
supposidly hack their computer.

The inclusion of any <script></script> tags on a page loaded from your
local hard disk run in the Local Computer security zone, which is now a
much more restrictive security zone than it was prior to Windows XP
Service Pack 2.

The solution is to give your HTML document the "Mark of the Web". To give
your document the "Mark of the Web":

<!-- saved from url=(0014)about:internet -->

<url:
http://www.microsoft.com/resources/documentation/ie/6/all/reskit/en-us/appendix.mspx
/>

Click "Local Machine Lockdown"
Scroll down to "Feature Impact"
[Read]

Please note that the moment you add the "Mark of the Web" to your
document, the page will run in the Internet security zone and is subject
to it's restrictions (no direct access to the file system, etc). If you
need to avoid the restrictions in the Local Computer security zone in
Windows XP Service Pack 2, but you still require functionality not
possible in the Internet security zone, then you'll need to use an HTA
file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top