codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Dissolve effect for images using Javascript!  Frenz at 07:52 on Wednesday, August 16, 2006
 

Hi,

It would be great if someone could provide me with javascript code that would give a dissolve effect for images. I am right now doing it using the following code, but it works only with IE. If this code can be modified so that it would support all browsers, it would be great.

<script language="JavaScript" type="text/javascript">
var RunningIE4 = (msieversion() >=4);

function msieversion() {
var ua = window.navigator.userAgent
var msie = ua.indexOf ( "MSIE " )
if ( msie > 0 ) // is Microsoft Internet Explorer; return version number
return parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) )
else
return 0 // is other browser
}

if (RunningIE4) {
changePic = dissolvePix
} else {
changePic = switchPic}

function switchPic(picObj, newSrc) {
picObj.src = newSrc}

function dissolvePix(picObj, imgfile){
// This is for IE4 or later, and dissolves the images together using a visual filter.
picObj.filters.revealTrans.Apply();
picObj.src = imgfile
picObj.filters.revealTrans.Play()
} // end of function
</script>



<form>
<input type="button" value="Stonehenge" onclick='changePic(document.images["image1"], "stonehenge.jpg")'>
</form>


Thanks & Regards,
Frenz

  Re: Dissolve effect for images using Javascript!  amery buck at 05:53 on Monday, April 05, 2010
 

Beautiful blog with great informational content. Mostly certifications related and images using Javascript! related topics are really very good. testking 646-656, testking 646-671 and testking 646-976 are also good topics. Thanks for this great sharing.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: MS Access connection in JSP
•  Re: execute linux commands in perl script
•  Re: Server Name or Address could not be resolved?
•  Re: is null or not an object error
•  Re: Using Crystal Reports for generating dynamic reports in JAVA
•  Re: how to connect asp.net to sql server 2000
•  Re: Dissolve effect for images using Javascript!
•  Re: convert minutes into hours and minutes
•  how to write asp.net code to post the question to create a forum?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010