The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

X button on Floating box

4 posters

Go down

X button on Floating box Empty X button on Floating box

Post by ultramonsterkill April 12th 2009, 6:34 pm

how do i add a (X)

X=Close

In my floating box

this is my site it is the the top right

http:pkmnjourney.forumotion.com
avatar
ultramonsterkill
New Member

Male Posts : 23
Reputation : 0
Language : english

View user profile http://pkmnjourney.forumotion.com

Back to top Go down

X button on Floating box Empty Re: X button on Floating box

Post by Sanket April 13th 2009, 7:42 am

It already has Do not display again button.
You cannot add a (X)
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

View user profile

Back to top Go down

X button on Floating box Empty Re: X button on Floating box

Post by ultramonsterkill April 14th 2009, 8:20 am

i mean on a floating box kust like ion mines!check it out in forums to see it!
avatar
ultramonsterkill
New Member

Male Posts : 23
Reputation : 0
Language : english

View user profile http://pkmnjourney.forumotion.com

Back to top Go down

X button on Floating box Empty Re: X button on Floating box

Post by Sanket April 14th 2009, 11:25 am

Sorry, i don't understand where you want me to look.
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

View user profile

Back to top Go down

X button on Floating box Empty Re: X button on Floating box

Post by ultramonsterkill April 16th 2009, 8:26 am

Look here..
there is a PUPUP in my forum here ios the link
and i want to close the pup up
>>>>>>>>>>>>>>>>. http://pkmnjourney.forumotion.com/index.htm <<<<<<<<<<<<<<<<3


Like a CLOSE PUPUP script
avatar
ultramonsterkill
New Member

Male Posts : 23
Reputation : 0
Language : english

View user profile http://pkmnjourney.forumotion.com

Back to top Go down

X button on Floating box Empty Re: X button on Floating box

Post by Rok April 16th 2009, 8:47 am

So you want a script to stop the pop-up from popping up?
Rok
Rok
Energetic

Male Posts : 6823
Reputation : 234
Language : idk

View user profile

Back to top Go down

X button on Floating box Empty Re: X button on Floating box

Post by RoNo April 17th 2009, 2:37 am

Try this > Rough Page Demo

Floating menu with close link button
Code:

<div id="floatdiv" style="
    position:absolute;
    width:200px;height:200px;left:0px;top:0px;
    padding:16px;background:#000000;
    border:2px solid #2266AA">


<font face="Comic Sans MS"><font color="blue">Welcome users. We are sure that you will have a great time staying here. We have lots of friendly staff. Don't be afraid to ask a question.
I can assure you that this forum will be the best one ever.
Good Luck.</font></font>
<font color="red">
by: Pkm God</font>&nbsp;&nbsp;&nbsp;&nbsp;

<a href="#" onclick="return floatingMenu.hide()""><img src="http://i85.photobucket.com/albums/k57/RoNo1/Xout.png" alt="Close" title="Close" border="0" width="16" height="16"></a>

</div>

<script type="text/javascript"><!--
/* Script by: www.jtricks.com
 * Version: 20071017
 * Latest version:
 * www.jtricks.com/javascript/navigation/floating.html
 */
var floatingMenuId = 'floatdiv';
var floatingMenu =
{
    targetX: -250,
    targetY: 10,

    hasInner: typeof(window.innerWidth) == 'number',
    hasElement: typeof(document.documentElement) == 'object'
        && typeof(document.documentElement.clientWidth) == 'number',

    menu:
        document.getElementById
        ? document.getElementById(floatingMenuId)
        : document.all
          ? document.all[floatingMenuId]
          : document.layers[floatingMenuId]
};

floatingMenu.move = function ()
{
    floatingMenu.menu.style.left = floatingMenu.nextX + 'px';
    floatingMenu.menu.style.top = floatingMenu.nextY + 'px';
}

floatingMenu.computeShifts = function ()
{
    var de = document.documentElement;

    floatingMenu.shiftX = 
        floatingMenu.hasInner 
        ? pageXOffset 
        : floatingMenu.hasElement 
          ? de.scrollLeft 
          : document.body.scrollLeft; 
    if (floatingMenu.targetX < 0)
    {
        floatingMenu.shiftX +=
            floatingMenu.hasElement
            ? de.clientWidth
            : document.body.clientWidth;
    }

    floatingMenu.shiftY =
        floatingMenu.hasInner
        ? pageYOffset
        : floatingMenu.hasElement
          ? de.scrollTop
          : document.body.scrollTop;
    if (floatingMenu.targetY < 0)
    {
        if (floatingMenu.hasElement && floatingMenu.hasInner)
        {
            // Handle Opera 8 problems
            floatingMenu.shiftY +=
                de.clientHeight > window.innerHeight
                ? window.innerHeight
                : de.clientHeight
        }
        else
        {
            floatingMenu.shiftY +=
                floatingMenu.hasElement
                ? de.clientHeight
                : document.body.clientHeight;
        }
    }
}

floatingMenu.calculateCornerX = function()
{
    if (floatingMenu.targetX != 'center')
        return floatingMenu.shiftX + floatingMenu.targetX;

    var width = parseInt(floatingMenu.menu.offsetWidth);

    var cornerX =
        floatingMenu.hasElement
        ? (floatingMenu.hasInner
          ? pageXOffset
          : document.documentElement.scrollLeft) +
          (document.documentElement.clientWidth - width)/2
        : document.body.scrollLeft +
          (document.body.clientWidth - width)/2;
    return cornerX;
};

floatingMenu.calculateCornerY = function()
{
    if (floatingMenu.targetY != 'center')
        return floatingMenu.shiftY + floatingMenu.targetY;

    var height = parseInt(floatingMenu.menu.offsetHeight);

    // Handle Opera 8 problems
    var clientHeight =
        floatingMenu.hasElement && floatingMenu.hasInner
        && document.documentElement.clientHeight
            > window.innerHeight
        ? window.innerHeight
        : document.documentElement.clientHeight

    var cornerY =
        floatingMenu.hasElement
        ? (floatingMenu.hasInner 
          ? pageYOffset
          : document.documentElement.scrollTop) +
          (clientHeight - height)/2
        : document.body.scrollTop +
          (document.body.clientHeight - height)/2;
    return cornerY;
};

floatingMenu.doFloat = function()
{
    var stepX, stepY;

    floatingMenu.computeShifts();

    var cornerX = floatingMenu.calculateCornerX();

    var stepX = (cornerX - floatingMenu.nextX) * .07;
    if (Math.abs(stepX) < .5)
    {
        stepX = cornerX - floatingMenu.nextX;
    }

    var cornerY = floatingMenu.calculateCornerY();

    var stepY = (cornerY - floatingMenu.nextY) * .07;
    if (Math.abs(stepY) < .5)
    {
        stepY = cornerY - floatingMenu.nextY;
    }

    if (Math.abs(stepX) > 0 ||
        Math.abs(stepY) > 0)
    {
        floatingMenu.nextX += stepX;
        floatingMenu.nextY += stepY;
        floatingMenu.move();
    }

    setTimeout('floatingMenu.doFloat()', 20);
};

// addEvent designed by Aaron Moore
floatingMenu.addEvent = function(element, listener, handler)
{
    if(typeof element[listener] != 'function' ||
      typeof element[listener + '_num'] == 'undefined')
    {
        element[listener + '_num'] = 0;
        if (typeof element[listener] == 'function')
        {
            element[listener + 0] = element[listener];
            element[listener + '_num']++;
        }
        element[listener] = function(e)
        {
            var r = true;
            e = (e) ? e : window.event;
            for(var i = element[listener + '_num'] -1; i >= 0; i--)
            {
                if(element[listener + i](e) == false)
                    r = false;
            }
            return r;
        }
    }

    //if handler is not already stored, assign it
    for(var i = 0; i < element[listener + '_num']; i++)
        if(element[listener + i] == handler)
            return;
    element[listener + element[listener + '_num']] = handler;
    element[listener + '_num']++;
};

floatingMenu.init = function()
{
    floatingMenu.initSecondary();
    floatingMenu.doFloat();
};

// Some browsers init scrollbars only after
// full document load.
floatingMenu.initSecondary = function()
{
    floatingMenu.computeShifts();
    floatingMenu.nextX = floatingMenu.calculateCornerX();
    floatingMenu.nextY = floatingMenu.calculateCornerY();
    floatingMenu.move();
}

if (document.layers)
    floatingMenu.addEvent(window, 'onload', floatingMenu.init);
else
{
    floatingMenu.init();
    floatingMenu.addEvent(window, 'onload',
        floatingMenu.initSecondary);
}


//--></script>

<script type="text/javascript">
floatingMenu.hide = function()
{
    floatingMenu.menu.style.display='none';
    return false;
}

floatingMenu.show = function()
{
    floatingMenu.menu.style.display='block';
    return false;
}
//--></script>

X button on Floating box Xout
RoNo
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

View user profile http://bf2mercenaries.forumotion.com/

Back to top Go down

X button on Floating box Empty Ty So Much

Post by ultramonsterkill April 17th 2009, 10:25 am

Ty So Much but is there a way i can put teh Close Button On TOP LEFT
avatar
ultramonsterkill
New Member

Male Posts : 23
Reputation : 0
Language : english

View user profile http://pkmnjourney.forumotion.com

Back to top Go down

X button on Floating box Empty Re: X button on Floating box

Post by RoNo April 17th 2009, 1:30 pm

Sure, here's a different X button > Demo v2

Change/add images: (you probably know this)
<img src="Your Graphic URL.Here" title, size etc.

Code:

<div id="floatdiv" style="
    position:absolute;
    width:200px;height:200px;left:0px;top:0px;
    padding:16px;background:#000000;
    border:2px solid #2266AA">


<a href="#" onclick="return floatingMenu.hide()""><img src="http://i85.photobucket.com/albums/k57/RoNo1/Xout2.gif" alt="Close" title="Close" border="0" width="13" height="13"></a>&nbsp;&nbsp;&nbsp;
<font face="Comic Sans MS"><font color="blue">Welcome users. We are sure that you will have a great time staying here. We have lots of friendly staff. Don't be afraid to ask a question.
I can assure you that this forum will be the best one ever.
Good Luck.</font></font>
<font color="red">
by: Pkm God</font>&nbsp;&nbsp;&nbsp;&nbsp;

</div>

<script type="text/javascript"><!--
/* Script by: www.jtricks.com
 * Version: 20071017
 * Latest version:
 * www.jtricks.com/javascript/navigation/floating.html
 */
var floatingMenuId = 'floatdiv';
var floatingMenu =
{
    targetX: -250,
    targetY: 10,

    hasInner: typeof(window.innerWidth) == 'number',
    hasElement: typeof(document.documentElement) == 'object'
        && typeof(document.documentElement.clientWidth) == 'number',

    menu:
        document.getElementById
        ? document.getElementById(floatingMenuId)
        : document.all
          ? document.all[floatingMenuId]
          : document.layers[floatingMenuId]
};

floatingMenu.move = function ()
{
    floatingMenu.menu.style.left = floatingMenu.nextX + 'px';
    floatingMenu.menu.style.top = floatingMenu.nextY + 'px';
}

floatingMenu.computeShifts = function ()
{
    var de = document.documentElement;

    floatingMenu.shiftX = 
        floatingMenu.hasInner 
        ? pageXOffset 
        : floatingMenu.hasElement 
          ? de.scrollLeft 
          : document.body.scrollLeft; 
    if (floatingMenu.targetX < 0)
    {
        floatingMenu.shiftX +=
            floatingMenu.hasElement
            ? de.clientWidth
            : document.body.clientWidth;
    }

    floatingMenu.shiftY =
        floatingMenu.hasInner
        ? pageYOffset
        : floatingMenu.hasElement
          ? de.scrollTop
          : document.body.scrollTop;
    if (floatingMenu.targetY < 0)
    {
        if (floatingMenu.hasElement && floatingMenu.hasInner)
        {
            // Handle Opera 8 problems
            floatingMenu.shiftY +=
                de.clientHeight > window.innerHeight
                ? window.innerHeight
                : de.clientHeight
        }
        else
        {
            floatingMenu.shiftY +=
                floatingMenu.hasElement
                ? de.clientHeight
                : document.body.clientHeight;
        }
    }
}

floatingMenu.calculateCornerX = function()
{
    if (floatingMenu.targetX != 'center')
        return floatingMenu.shiftX + floatingMenu.targetX;

    var width = parseInt(floatingMenu.menu.offsetWidth);

    var cornerX =
        floatingMenu.hasElement
        ? (floatingMenu.hasInner
          ? pageXOffset
          : document.documentElement.scrollLeft) +
          (document.documentElement.clientWidth - width)/2
        : document.body.scrollLeft +
          (document.body.clientWidth - width)/2;
    return cornerX;
};

floatingMenu.calculateCornerY = function()
{
    if (floatingMenu.targetY != 'center')
        return floatingMenu.shiftY + floatingMenu.targetY;

    var height = parseInt(floatingMenu.menu.offsetHeight);

    // Handle Opera 8 problems
    var clientHeight =
        floatingMenu.hasElement && floatingMenu.hasInner
        && document.documentElement.clientHeight
            > window.innerHeight
        ? window.innerHeight
        : document.documentElement.clientHeight

    var cornerY =
        floatingMenu.hasElement
        ? (floatingMenu.hasInner 
          ? pageYOffset
          : document.documentElement.scrollTop) +
          (clientHeight - height)/2
        : document.body.scrollTop +
          (document.body.clientHeight - height)/2;
    return cornerY;
};

floatingMenu.doFloat = function()
{
    var stepX, stepY;

    floatingMenu.computeShifts();

    var cornerX = floatingMenu.calculateCornerX();

    var stepX = (cornerX - floatingMenu.nextX) * .07;
    if (Math.abs(stepX) < .5)
    {
        stepX = cornerX - floatingMenu.nextX;
    }

    var cornerY = floatingMenu.calculateCornerY();

    var stepY = (cornerY - floatingMenu.nextY) * .07;
    if (Math.abs(stepY) < .5)
    {
        stepY = cornerY - floatingMenu.nextY;
    }

    if (Math.abs(stepX) > 0 ||
        Math.abs(stepY) > 0)
    {
        floatingMenu.nextX += stepX;
        floatingMenu.nextY += stepY;
        floatingMenu.move();
    }

    setTimeout('floatingMenu.doFloat()', 20);
};

// addEvent designed by Aaron Moore
floatingMenu.addEvent = function(element, listener, handler)
{
    if(typeof element[listener] != 'function' ||
      typeof element[listener + '_num'] == 'undefined')
    {
        element[listener + '_num'] = 0;
        if (typeof element[listener] == 'function')
        {
            element[listener + 0] = element[listener];
            element[listener + '_num']++;
        }
        element[listener] = function(e)
        {
            var r = true;
            e = (e) ? e : window.event;
            for(var i = element[listener + '_num'] -1; i >= 0; i--)
            {
                if(element[listener + i](e) == false)
                    r = false;
            }
            return r;
        }
    }

    //if handler is not already stored, assign it
    for(var i = 0; i < element[listener + '_num']; i++)
        if(element[listener + i] == handler)
            return;
    element[listener + element[listener + '_num']] = handler;
    element[listener + '_num']++;
};

floatingMenu.init = function()
{
    floatingMenu.initSecondary();
    floatingMenu.doFloat();
};

// Some browsers init scrollbars only after
// full document load.
floatingMenu.initSecondary = function()
{
    floatingMenu.computeShifts();
    floatingMenu.nextX = floatingMenu.calculateCornerX();
    floatingMenu.nextY = floatingMenu.calculateCornerY();
    floatingMenu.move();
}

if (document.layers)
    floatingMenu.addEvent(window, 'onload', floatingMenu.init);
else
{
    floatingMenu.init();
    floatingMenu.addEvent(window, 'onload',
        floatingMenu.initSecondary);
}


//--></script>

<script type="text/javascript">
floatingMenu.hide = function()
{
    floatingMenu.menu.style.display='none';
    return false;
}

floatingMenu.show = function()
{
    floatingMenu.menu.style.display='block';
    return false;
}
//--></script>

Cool
RoNo
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

View user profile http://bf2mercenaries.forumotion.com/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum