Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

Floating Div Javascript not working in FF

Floating Div Javascript Fire Fox



7:04 pm on Aug 28, 2009 (gmt 0)

5+ Year Member

I am trying to make a Floating div visible in both I.E. and Firefox. I can only get it to work in i.e. it works in I.e. when I put the code in the <HEAD> tag however not in Firefox. I can get it to work for both if I put the code outside of the HTML tags altogher however If it works in both it justifies my web page to the left in i.e. I have inserted every possible tag possible to center the page but it is still justifying the page to the left. Whats more is the code is a mixture of includes, css, and asp. The script that I am using for the "visibility" is as follows:

<script type="text/javascript">

// shows the pop up div

function showObject(e, element) {

document.getElementById(element.id).style.visibility = "visible";

document.getElementById(element.id).style.top = e.clientY;


// hides to pop up div

function hideObject(element) {

document.getElementById(element.id).style.visibility = "hidden";





8:15 pm on Aug 28, 2009 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Welcome aboard Taggert, without running the code, where does "clientY" come from?

Also, what does your FireFox error console have to say about it?


Featured Threads

Hot Threads This Week

Hot Threads This Month