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

JavaScript

 
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 
I modified da code and put var ID... = setInterval(....)...,
but now it says da ID i gave is unidentified by browsers(both IE and Firefox).....
<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 />
			<br />
			function click()<br />
			{	<br />
					<br />
					if(navigator.appName=="Netscape")<br />
					{<br />
						j=0.9;<br />
						<br />
						var IntervalIDN1 = setInterval("fadeN()",40); //for firefox<br />
					<br />
						<br />
					}<br />
					else<br />
					{<br />
						 j=90;<br />
						 var IntervalIDI1 =  setInterval("fadeI()",40); //for IE<br />
					}<br />
				<br />
			}<br />
			<br />
			function fadeN()  //for Firefox<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(IntervalIDN1);<br />
					<br />
					document.getElementById("img1").src = "images/"+N+".jpg";<br />
					<br />
					var IntervalIDN2 = setInterval("showN()",40);<br />
					<br />
				} <br />
				<br />
			}<br />
			<br />
			function showN() //for firefox<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(IntervalIDN2);<br />
					document.getElementById("img1").style.opacity= 1;<br />
					<br />
				}<br />
			}<br />
			<br />
			function fadeI() //for IE<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(IntervalIDI1);<br />
					<br />
					document.getElementById("img1").src = "images/2.jpg";<br />
					<br />
					var IntervalIDI2 = setInterval("showI()",40);<br />
				} <br />
				<br />
			}<br />
			<br />
			function showI()  //for IE<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(IntervalIDI2);<br />
					<br />
				}<br />
			}<br />


if i remove ids it works perfectly on Firefox but not on IE....
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 
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 

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.