![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
|
pop up page ..!!!!!
while my brother was browsing some thing attracted me .
Please enter this site and see the table , coz when you clicked on the name "tallium" it will open a popup or some thing i dont know its name so i need ti know how can i make that http://www.imperialmu.com/index.php?op=rankings Thanks .. |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Oct 2005
Posts: 29
Rep Power: 0
![]() |
I think that site was made from flash.
__________________
Conflict Online |
|
|
|
|
|
#3 |
|
Programming Guru
![]() |
It doesn't have to be? Click any of the poster's names on the side of this forum. It's essentially the exact same thing.
Here's the javascript for hiding and showing an object: /* GET AN OBJECT */
var objects = new Array();
var type = 0;
if (document.getElementById)
{
type = 1;
}
else if (document.all)
{
type = 2;
}
else if (document.layers)
{
type = 3;
}
function get_object(idname)
{
if (typeof(objects[idname]) == "undefined")
{
if (type == 1)
{
objects[idname] = document.getElementById(idname);
}
else if (type == 2)
{
objects[idname] = document.all[idname];
}
else if (type == 3)
{
objects[idname] = document.layers[idname];
}
}
return objects[idname];
}
/* HIDE/SHOW AN OBJECT */
function hide(contID)
{
dynobj = get_object(contID)
if (dynobj.style.display == "")
{
dynobj.style.display = "none";
}
else
{
dynobj.style.display = "";
}
return false;
}Then you can use that by creating an object: <div id="my_object">This is some content that can toggle hidden/shown</div> Then finally a link to toggle the object: <a href="#" onclick="hide('my_object')">Hide/Show</a>If you want the <div> to overlap what's beneath it, you have to do some position: fixed; attribute or something. Do a little research. I've never tried it. |
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Why are you browser-sniffing for 'getElementById'?? Really, really, really old model?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|