Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 05-03-2007, 10:22 AM   #1 (permalink)
Inactive
 
Join Date: 05-01-07
Posts: 3
iTrader: 0 / 0%
Latest Blog:
None

mtaylor314 is liked by many
javascript help

Code:
function show_div(element) { for (var loop = 0; loop < divs.length; loop++) { Element.hide(divs[loop]); } makePositionedCoords(element,-yMousePos+(.4*yMousePos),xMousePos); Element.show(element); } function makePositionedCoords(element,x,y) { element = $(element); var pos = Element.getStyle(element, 'position'); if (pos == 'static' || !pos) { element._madePositioned = true; element.style.position = 'absolute'; if (window.opera) { element.style.top = 0; element.style.left = 0; } } element.style.top = -x; element.style.left = y; } function captureMousePosition(e) { if (document.layers) { xMousePos = e.pageX; yMousePos = e.pageY; xMousePosMax = window.innerWidth+window.pageXOffset; yMousePosMax = window.innerHeight+window.pageYOffset; } else if (document.all) { xMousePos = window.event.x+document.body.scrollLeft; yMousePos = window.event.y+document.body.scrollTop; xMousePosMax = document.body.clientWidth+document.body.scrollLeft; yMousePosMax = document.body.clientHeight+document.body.scrollTop; } else if (document.getElementById) { xMousePos = e.pageX; yMousePos = e.pageY; xMousePosMax = window.innerWidth+window.pageXOffset; yMousePosMax = window.innerHeight+window.pageYOffset; } } function hide_div(element) { Element.hide(element); }
That is my javascript that I have to display a hidden div

Code:
<div style="display:none; position:absolute;" id="foo"><table style="border:solid;"><tr><td>Insert foo <a href="">Link</a></td></tr></table></div>
I want the div to appear whenever they have the event onmouseover

Code:
<li class="linav"><a class="sidenav" onmouseover="show_div('foo');" href="">foo</a></li>
Unfortunately, the div appears in the upper left-hand corner of the browser. How do I get this to appear at the coordinates of the mouse and also to not disappear if they go into the <div>. I have placed all the hidden div's after the footer.
mtaylor314 is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 05-04-2007, 04:54 AM   #2 (permalink)
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 2,927
iTrader: 0 / 0%
Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
I've tried to solve your problem but there are so many errors...

I think you could help us by providing the full source code, so we can help you back.

Quote:
who is (I mean where is declared??) ??? :
- Element
- divs
- $(element)
and so on....

$(element) = function $(id) { return document.getElementById(id); } ???

this is so...
__________________
JUNE - JavaScript Framework
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-04-2007, 03:46 PM   #3 (permalink)
Inactive
 
StupidScript's Avatar
 
Join Date: 09-22-06
Location: Los Angeles
Posts: 678
iTrader: 0 / 0%
Latest Blog:
None

StupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really nice
I think they're using the "mochikit" Javascript library ... possibly trying to get the "MochiKit.Visual" set of scripts to function ... although it looks a lot like Java's "Element" interface (extends Node, the primary datatype for the DOM).
StupidScript is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need help with some javascript: thenextbesthang Coding Forum 1 10-06-2006 09:51 AM
Count-up from a particular year + Javascript within Javascript? Help! Azam.biz Coding Forum 3 06-06-2005 06:47 AM
Javascript Help. samer Coding Forum 2 09-08-2004 07:50 AM
I need some help with JavaScript. Can anyone help me please? CrAg Coding Forum 2 03-22-2004 05:56 AM
javascript webmaster@lostinteardrops Coding Forum 16 10-31-2003 08:19 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 02:16 PM.
© Copyright 2008 V7 Inc