Jump to content

Unselectable <DIV>


atitthaker

Recommended Posts

Hi @ll,

 

I am having an application, in this application I want to use a <DIV> as a dialog and so I am putting it over my other form elements and I want to make background elements as unselectable...

 

Way I am going for is: I am putting a div with the window size on my form elements and on that <div> I am rendering my dialog <div>. My in between <DIV> is with the property UNSELECTABLE="yes", So as it's over my other form elements, belower elements are unselectable.

 

This works fine for my machine(running IE 7) but the same is not working for my collegues (running IE 6).

 

So this attribute, "UNSELECTABLE" is available for IE 7 only or so? If so how can I achieve the same functionality with browser compatibility, or atleast it runs on most versions of Internext Explorer?

 

I have created <DIV> with following properties...

 

<DIV ID="divDisInterface" UNSELECTABLE="ON" STYLE="position:absolute; top:0px; left:0px; width:1000px; height:1000px; background:green; display='none';z-index=2;          filter:progid:DXImageTransform.Microsoft.Alpha( Opacity=5, FinishOpacity=5, Style=1,

            StartX=0,  FinishX=10, StartY=0, FinishY=10)">

            This is my text

 

</DIV>

 

Initially my div is not visible but when the dialog <DIV> is visible, I am also setting above div's display style to "" and it is visible. But Unselectable attribute is not working with IE 6.

 

Thanks...

 

Link to comment
https://forums.phpfreaks.com/topic/40125-unselectable/
Share on other sites

Thanks for reply...

 

If you have got my point, Do you know any other way to implement the same thing???

 

I want to make a <div> which acts as a dialog and it won't allow you to select anything on the page beneath it...

 

So how can I do that.

 

 

Link to comment
https://forums.phpfreaks.com/topic/40125-unselectable/#findComment-197589
Share on other sites

Thanks for reply...

 

If you have got my point, Do you know any other way to implement the same thing???

 

I want to make a <div> which acts as a dialog and it won't allow you to select anything on the page beneath it...

 

So how can I do that.

 

 

 

You can simply override onselectstart... make just in IE, though.

Link to comment
https://forums.phpfreaks.com/topic/40125-unselectable/#findComment-198056
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.