Thursday, April 12, 2007

Div Over Combo

[code][xmp]
Div over Combo box ---- Isnt possible at all,
this is like a bug in IE, i dont think that they have fixed it in IE7.
But if u r trying to make a MENU, then there is a simpler option for that,
this option overrides the all the z-index controls and if run in ur
system (i mean if its a page from ur hard disk itself),
then it can override any other windows(sites or windows or anything).
I will discuss that option here,

Most Techies seldom know that there is a method (or control or whatever u call it) "createPopup".
This method can override any window (including much hyped Combobox or Drop Down).

I will show u how to use it in this section,

[HTML]
[HEAD]
[TITLE]Popup Example[/TITLE]

[SCRIPT LANGUAGE="JScript"]
var oPopup = window.createPopup();
function ButtonClick()
{
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
oPopBody.innerHTML = "Click outside [B]popup[/B] to close.";
oPopup.show(50, 50, 180, 25, document.body);
}
[/SCRIPT]
[/HEAD]

[BODY]
[BUTTON onclick="ButtonClick()"]Click Me![/BUTTON][br]
[select]
[option value="0"]http://tutor2.brinskster.net[/option]
[/select]
[/BODY]
[/HTML]

Check out the above code, u'll really find its worth.

I will tell u another trick,
this trick works only if the file is in ur hard disk (u cannot use this script in ur website, as this doesn't work.)

As i have said, createPopup can override other windows(sites or windows or anything).
[HTML]
[HEAD]
[TITLE]Popup Example[/TITLE]

[SCRIPT LANGUAGE="JScript"]
var oPopup = window.createPopup();
function Override()
{
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
oPopBody.innerHTML = "Click outside [B]popup[/B] to close.";
oPopup.show(50, 50, 180, 25, document.body);
}
[/SCRIPT]
[/HEAD]

[BODY onLoad='javscript:setTimeout("Override();",5000)']
Don't be in this page, goto some other window, a popup will open after 5 secs....
[/BODY]
[/HTML]

I checked the above scripts in IE6 and its working perfectly...
(Dont' forget to replace [ with < and ] with >)......
Any suggestion, Queries r welcome
[/xmp][/code]