Quick Search
Sunbelthost Hosting - Colocation and Dedicated Servers

Threads: 21,836
Posts: 83,484
Members: 24,424
Newest member: acecase

Web Hosting


 
  #1  
Old 31 Jul 2010, 03:04 PM
thezwallrus thezwallrus is offline
Newbie
 
Join Date: Jul 2010
Posts: 5
timeout script fail

hi all,

i'm working on a google maps application and have set up a custom form to handle what type of markers the person would like to view. when a person clicks on this form, with both a text box and a down-arrow to the right, it should show the box, which doesn't work for the image. but I digress, I'll ask about that later.

the more important concern is that I want this box to disappear when the user doesn't want it. so I used an onmouseout with a timeout set. (if you know of any better way, please let me know! especially clicking anywhere else on the screen) then, when the onmouseover event is triggered, I have it set to clear the timeout. but it doesn't! here's the code:

Code:
var inputTimeout

function toggleDown() {
	document.getElementById("d_arrow").innerHTML = "<img src='images/d_arrow2.png' />";
	clearTimeout(inputTimeout);
};

function toggleUp() {
	document.getElementById("d_arrow").innerHTML = "<img src='images/d_arrow.png' />";
	inputTimeout = setTimeout("inputClose();", 5000);
};

function inputClose() {
	document.getElementById("input_dropdown").style.display = "none";
};

function dropDown() {
	document.getElementById('input_dropdown').style.display = "block";	
};

<div class="input_cont" onmouseover="this.className='input_cont_hi';toggleDown();" onmouseout="this.className='input_cont';toggleUp();" onclick="dropDown();">
please help! :]
Reply With Quote
Reply

Tags
javascript, problem, timeout

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to get a script to make sense Extreme Client & Server Side Scripting (PHP, ASP, JavaScript) 7 22 Jun 2010 03:21 PM
PHP Script suggestion needed denno020 Client & Server Side Scripting (PHP, ASP, JavaScript) 3 29 Mar 2010 02:52 AM
Looking for a fast and reliable page hits script JohnD Client & Server Side Scripting (PHP, ASP, JavaScript) 8 22 Mar 2010 02:16 PM
I need help debugging a relatively simple script - I have commented it fully Gebnar Web Design, HTML Reference and CSS 0 22 Jan 2008 01:13 PM


All times are GMT -5. The time now is 10:02 PM.


 

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Forums Copyright © 2004-2010, WebDevForums.com. Web design by Miami Web Design. All Rights Reserved.