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

JavaScript

 
GeneralRe: jQuery/jTemplate question Pin
RCoate21-Sep-10 18:33
RCoate21-Sep-10 18:33 
GeneralRe: jQuery/jTemplate question Pin
Pete O'Hanlon22-Sep-10 2:27
mvePete O'Hanlon22-Sep-10 2:27 
AnswerRe: jQuery/jTemplate question [Solved] Pin
Sunasara Imdadhusen4-Oct-10 1:49
professionalSunasara Imdadhusen4-Oct-10 1:49 
Questionprotecting javascript IP Pin
swjam3-Sep-10 17:24
swjam3-Sep-10 17:24 
AnswerRe: protecting javascript IP Pin
DaveAuld4-Sep-10 4:16
professionalDaveAuld4-Sep-10 4:16 
GeneralRe: protecting javascript IP Pin
NeverHeardOfMe4-Sep-10 5:47
NeverHeardOfMe4-Sep-10 5:47 
GeneralRe: protecting javascript IP Pin
DaveAuld4-Sep-10 5:49
professionalDaveAuld4-Sep-10 5:49 
QuestionclearInterval Not working on IE Pin
greendragons3-Sep-10 3:46
greendragons3-Sep-10 3:46 
Here is the code....it works fine on mozilla but on IE clearInterval doesn't work,,...
<br />
<html><br />
	<head><br />
		<style type="text/css"><br />
			.imgf{width:300px; height:250px;}<br />
			#img2{z-index:1000;}<br />
		</style><br />
		<script language="javascript"><br />
			window.onload=inItAll;<br />
			var j=0;<br />
			var N=2;<br />
			function inItAll()<br />
			{<br />
				document.getElementById("img1").onclick=click;<br />
			}<br />
			<br />
			function click()<br />
			{<br />
				if(navigator.appName=="Netscape")<br />
				{<br />
					j=0.9;<br />
					setInterval("fadeN()",40);<br />
					<br />
				}<br />
				else<br />
				{<br />
					 j=90;<br />
					 var fI = setInterval("fadeI()",40);<br />
				}<br />
				<br />
			}<br />
			<br />
			function fadeN()<br />
			{<br />
				j=j-0.1<br />
				<br />
				if(j>0.4)<br />
				{	<br />
					<br />
					document.getElementById("img1").style.opacity= j;<br />
				}<br />
				else<br />
				{<br />
					j=0.4;<br />
					window.clearInterval();<br />
					<br />
					document.getElementById("img1").src = "images/"+2+".jpg";<br />
					<br />
					setInterval("showN()",40);<br />
					<br />
				} <br />
				<br />
			}<br />
			<br />
			function showN()<br />
			{<br />
				<br />
				if(j<1)<br />
				{<br />
					document.getElementById("img1").style.opacity= j;<br />
					j=0.1 + j;<br />
					<br />
				}<br />
				else<br />
				{<br />
					window.clearInterval();<br />
					document.getElementById("img1").style.opacity= 1;<br />
					<br />
				}<br />
			}<br />
			<br />
			function fadeI()<br />
			{<br />
				j=j-10<br />
				<br />
				if(j>40)<br />
				{	<br />
					document.getElementById("img1").style.filter ="alpha(opacity="+j+")";<br />
					<br />
				}<br />
				else<br />
				{<br />
					j=40;<br />
					window.clearInterval(fI);<br />
					<br />
					document.getElementById("img1").src = "images/2.jpg";<br />
					<br />
					var sI = setInterval("showI()",40);<br />
				} <br />
				<br />
			}<br />
			<br />
			function showI()<br />
			{<br />
				<br />
				if(j<100)<br />
				{<br />
					document.getElementById("img1").style.filter ="alpha(opacity="+j+")";<br />
					j=10 + j;<br />
					<br />
				}<br />
				else<br />
				{<br />
					document.getElementById("img1").style.filter ="alpha(opacity="+100+")";<br />
					window.clearInterval(sI);<br />
					<br />
				}<br />
			}<br />
			<br />
		</script><br />
	</head><br />
	<body><br />
		<center><br />
			<br/><br />
			<br/><br />
			<div id="div1"><br />
				<img src="images/1.jpg" class="imgf" id="img1"/><br />
			</div>	<br />
		</center><br />
	</body><br />
</html><br />


it gives unwanted flicks on IE coz clearInterval did not work.....
AnswerRe: clearInterval Not working on IE Pin
Not Active3-Sep-10 4:11
mentorNot Active3-Sep-10 4:11 
GeneralRe: clearInterval Not working on IE Pin
greendragons3-Sep-10 4:16
greendragons3-Sep-10 4:16 
GeneralRe: clearInterval Not working on IE Pin
phil.o3-Sep-10 4:23
professionalphil.o3-Sep-10 4:23 
GeneralRe: clearInterval Not working on IE Pin
Not Active3-Sep-10 4:27
mentorNot Active3-Sep-10 4:27 
GeneralRe: clearInterval Not working on IE Pin
DaveAuld3-Sep-10 5:10
professionalDaveAuld3-Sep-10 5:10 
GeneralRe: clearInterval Not working on IE Pin
DaveAuld3-Sep-10 5:09
professionalDaveAuld3-Sep-10 5:09 
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 
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 

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.