Click here to Skip to main content
15,905,322 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: clearInterval Not working on IE Pin
NeverHeardOfMe3-Sep-10 11:44
NeverHeardOfMe3-Sep-10 11:44 
GeneralRe: clearInterval Not working on IE Pin
Not Active3-Sep-10 17:11
mentorNot Active3-Sep-10 17:11 
GeneralRe: clearInterval Not working on IE Pin
NeverHeardOfMe3-Sep-10 22:29
NeverHeardOfMe3-Sep-10 22:29 
GeneralRe: clearInterval Not working on IE Pin
Not Active4-Sep-10 3:44
mentorNot Active4-Sep-10 3:44 
GeneralRe: clearInterval Not working on IE Pin
greendragons4-Sep-10 22:44
greendragons4-Sep-10 22:44 
GeneralRe: clearInterval Not working on IE Pin
NeverHeardOfMe4-Sep-10 23:30
NeverHeardOfMe4-Sep-10 23:30 
GeneralRe: clearInterval Not working on IE Pin
greendragons4-Sep-10 23:56
greendragons4-Sep-10 23:56 
Questiononmouseorver for child element Pin
greendragons3-Sep-10 2:13
greendragons3-Sep-10 2:13 
i was creating little animation using javascript....but got stuck


<br />
<html><br />
	<head><br />
		<style type="text/css"><br />
			body{}<br />
			.imgC{width:350px; height:300px;}<br />
			#divV{background-color:#000000; opacity:0.6; filter:alpha(opacity=60);<br />
				  width:350px; height:70px;}<br />
			#mainDiv{width:100%; height:100%; background-color:#c3c3c3; top:0px; left:0px;<br />
						position:absolute;}	  <br />
		</style><br />
		<script language="javascript"><br />
			window.onload=inItAll;<br />
			<br />
			function inItAll()<br />
			{<br />
				document.getElementById("img1").onmouseover = cursorOver;<br />
				document.getElementById("img1").onmouseout = cursorOut;<br />
				document.getElementById("divV").onmouseout = cursorVOut;<br />
				<br />
								<br />
			}<br />
			<br />
			function cursorOver()<br />
			{<br />
				<br />
				if(!document.getElementById("divV"))<br />
				{<br />
					var Y1 = document.getElementById("img1").offsetTop;<br />
					var X1 = document.getElementById("img1").offsetLeft;<br />
					var Elem = document.createElement("div");<br />
					Elem.id="divV";<br />
					Elem.cssClass="divVc";<br />
					Elem.style.position="absolute";<br />
					Elem.style.top = 230+Y1+"px";<br />
					Elem.style.left = X1+"px";<br />
					document.getElementById("div1").appendChild(Elem);<br />
				}<br />
			}<br />
			<br />
			function cursorOut(e)<br />
			{<br />
				var Y1 = document.getElementById("img1").offsetTop;<br />
				var Y2 = Y1 + 300;<br />
				var X1 = document.getElementById("img1").offsetLeft;<br />
				var X2 = X1 + 350;<br />
				if (!e)<br />
					  var e = window.event;<br />
<br />
			    if (e.pageX || e.pageY) {<br />
					  posx = e.pageX;<br />
					  posy = e.pageY;<br />
					  <br />
					 }<br />
				 else if (e.clientX || e.clientY) {<br />
						  posx = e.clientX <br />
						  posy = e.clientY <br />
					 }<br />
					  <br />
					 if(posx>=X1 && posx<=X2 && posy>=Y1 && posy<=Y2)<br />
					  {<br />
							<br />
						<br />
					  }<br />
					  else<br />
					  {<br />
						<br />
						var Elem = document.getElementById("divV");<br />
						document.getElementById("div1").removeChild(Elem);<br />
						<br />
							<br />
						<br />
					  }<br />
			<br />
			}<br />
			<br />
			function cursorVOut()<br />
			{<br />
				<br />
				var Elem = document.getElementById("divV");<br />
				document.getElementById("div1").removeChild(Elem);<br />
		<br />
			}<br />
			<br />
		</script><br />
	</head><br />
	<body><br />
		<div id="mainDiv"><br />
			<div id="div1"><br />
				<center><br />
					<img src="images/1.jpg" id="img1" class="imgC"/><br />
				</center><br />
			</div><br />
		</div><br />
		<br />
	</body><br />
</html>	<br />


everything works fine except document.getElementById("divV").onmouseout = cursorVOut;
this part is not working.....
when i bring cursor on image(img1) a small div appears at the bottom of image and if i move my cursor out it should disappear...the problem is when i move my cursor away frm divV to mainDiv event doesn,t work......
AnswerRe: onmouseorver for child element Pin
NeverHeardOfMe5-Sep-10 4:08
NeverHeardOfMe5-Sep-10 4:08 
QuestionHow to unblock the pop-under window using javascript? Pin
jasimmd2-Sep-10 4:46
jasimmd2-Sep-10 4:46 
AnswerRe: How to unblock the pop-under window using javascript? Pin
User 17164922-Sep-10 4:54
professionalUser 17164922-Sep-10 4:54 
AnswerRe: How to unblock the pop-under window using javascript? Pin
J4amieC2-Sep-10 4:54
J4amieC2-Sep-10 4:54 
QuestionScrolling of images.. Pin
swornavidhya_m1-Sep-10 3:31
swornavidhya_m1-Sep-10 3:31 
QuestionHow to give - space between scrolling images and border for the images Pin
swornavidhya_m31-Aug-10 23:46
swornavidhya_m31-Aug-10 23:46 
QuestionDetect Java Installed in machine Pin
ShafiqA30-Aug-10 0:04
ShafiqA30-Aug-10 0:04 
AnswerRe: Detect Java Installed in machine [modified] Pin
daveyerwin30-Aug-10 2:30
daveyerwin30-Aug-10 2:30 
Questionchanging input value atrribute Pin
Sonar8729-Aug-10 11:05
Sonar8729-Aug-10 11:05 
AnswerRe: changing input value atrribute Pin
daveyerwin29-Aug-10 13:11
daveyerwin29-Aug-10 13:11 
GeneralRe: changing input value atrribute Pin
Sonar8729-Aug-10 21:08
Sonar8729-Aug-10 21:08 
GeneralRe: changing input value atrribute Pin
PoojaBorhade30-Aug-10 0:25
PoojaBorhade30-Aug-10 0:25 
GeneralRe: changing input value atrribute Pin
Sonar8730-Aug-10 9:33
Sonar8730-Aug-10 9:33 
QuestionLogin Page with out Menu bar Pin
vishnukamath26-Aug-10 21:09
vishnukamath26-Aug-10 21:09 
AnswerRe: Login Page with out Menu bar Pin
daveyerwin27-Aug-10 2:47
daveyerwin27-Aug-10 2:47 
GeneralRe: Login Page with out Menu bar Pin
vishnukamath27-Aug-10 2:52
vishnukamath27-Aug-10 2:52 
GeneralRe: Login Page with out Menu bar Pin
RahulPuneet27-Aug-10 15:16
RahulPuneet27-Aug-10 15:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.