From: Kevin B. <Kev...@bb...> - 2003-08-05 13:08:54
|
Hi everyone, i have a problem with the example "Other Demonstrations" / "- Image rollovers" The shown example is very easy, but if i try to create a second image object with the same image path like the first image object, it doesn't work. I only changed the downsrc with the oversrc for the second image object but it doesn't work. Am i doing something wrong or is this a bug? And if it is a bug, how can i fix it? ============================================================ <html> <head> <title>DynAPI - Image Rollover</title> <script language="JavaScript" src="../src/dynapi.js"></script> <script language="Javascript"> dynapi.library.setPath('../src/'); dynapi.library.include('dynapi.functions.Image'); </script> <script language="Javascript"> var p = { oversrc:'images/eicon3.gif', downsrc:'images/eicon2.gif' } var p2 = { oversrc:'images/eicon2.gif', downsrc:'images/eicon3.gif' } var myImage = dynapi.functions.getImage('images/eicon1.gif',32,32,p); var myImage2 = dynapi.functions.getImage('images/eicon1.gif',32,32,p2); </script> </head> <body> Press move your mouse over the image below and click on it<br><br> <script> document.write(myImage.getHTML()); document.write(myImage2.getHTML()); </script> </body> </html> ============================================================ |
From: Leif W <war...@us...> - 2003-08-05 14:59:08
|
Hello, I tried this example unmodified on DynAPI 3 beta 1 and it seemed to work ok, unless the functionality I observed doesn't match the functionality you expect. I'm not sure what to expect, that's why I say it seems to work. ;-) What I did was make three icon files, a red block with a white 1 (eicon1.gif), and a green block with a white 2 (eicon2.gif) and a blue block with a white 3 (eicon3.gif). What I observerd was that both behave exactly the same. Maybe this is the error? Both start with the red-1, mouseover to the blue-3, and click to the green-2. From the code, myImage2 should mouseover to green-2, and click to blue-3. I'm not too familiar with the Image functions, but I can reproduce the error so maybe it's a bug in DynAPI 3 beta 1. Same thing happens in the updated CVS code, so it may be a new bug. Will have to look into this some more. Leif ----- Original Message ----- From: Kevin Breynck To: dyn...@li... Sent: Tuesday, August 05, 2003 9:08 AM Subject: [Dynapi-Help] Mouseover Bug? - 3.0.0 (Beta 1) - dynapi.functions.getimage.html Hi everyone, i have a problem with the example "Other Demonstrations" / "- Image rollovers" The shown example is very easy, but if i try to create a second image object with the same image path like the first image object, it doesn't work. I only changed the downsrc with the oversrc for the second image object but it doesn't work. Am i doing something wrong or is this a bug? And if it is a bug, how can i fix it? ============================================================ <html> <head> <title>DynAPI - Image Rollover</title> <script language="JavaScript" src="../src/dynapi.js"></script> <script language="Javascript"> dynapi.library.setPath('../src/'); dynapi.library.include('dynapi.functions.Image'); </script> <script language="Javascript"> var p = { oversrc:'images/eicon3.gif', downsrc:'images/eicon2.gif' } var p2 = { oversrc:'images/eicon2.gif', downsrc:'images/eicon3.gif' } var myImage = dynapi.functions.getImage('images/eicon1.gif',32,32,p); var myImage2 = dynapi.functions.getImage('images/eicon1.gif',32,32,p2); </script> </head> <body> Press move your mouse over the image below and click on it<br><br> <script> document.write(myImage.getHTML()); document.write(myImage2.getHTML()); </script> </body> </html> ============================================================ |
From: Raymond I. <xw...@ya...> - 2003-08-05 15:26:38
|
Well, I copied the code and all seems to work well. What browser and version are you using? Have you downloaded the lastest snapshot? PS. I'm unable to regenerate the errors. Please give more info. -- Raymond Irving --- Leif W <war...@us...> wrote: > Hello, > > I tried this example unmodified on DynAPI 3 beta 1 > and it seemed to work ok, > unless the functionality I observed doesn't match > the functionality you > expect. I'm not sure what to expect, that's why I > say it seems to work. > ;-) What I did was make three icon files, a red > block with a white 1 > (eicon1.gif), and a green block with a white 2 > (eicon2.gif) and a blue block > with a white 3 (eicon3.gif). What I observerd was > that both behave exactly > the same. Maybe this is the error? Both start with > the red-1, mouseover to > the blue-3, and click to the green-2. From the > code, myImage2 should > mouseover to green-2, and click to blue-3. I'm not > too familiar with the > Image functions, but I can reproduce the error so > maybe it's a bug in DynAPI > 3 beta 1. Same thing happens in the updated CVS > code, so it may be a new > bug. Will have to look into this some more. > > Leif > > ----- Original Message ----- > From: Kevin Breynck > To: dyn...@li... > Sent: Tuesday, August 05, 2003 9:08 AM > Subject: [Dynapi-Help] Mouseover Bug? - 3.0.0 (Beta > 1) - > dynapi.functions.getimage.html > > > > Hi everyone, > > i have a problem with the example "Other > Demonstrations" / "- Image > rollovers" > > The shown example is very easy, but if i try to > create a second image object > with the same image path like the first image > object, it doesn't work. > I only changed the downsrc with the oversrc for the > second image object but > it doesn't work. > Am i doing something wrong or is this a bug? And if > it is a bug, how can i > fix it? > > ============================================================ > <html> > <head> > <title>DynAPI - Image Rollover</title> > <script language="JavaScript" > src="../src/dynapi.js"></script> > <script language="Javascript"> > dynapi.library.setPath('../src/'); > > dynapi.library.include('dynapi.functions.Image'); > </script> > <script language="Javascript"> > var p = { > oversrc:'images/eicon3.gif', > downsrc:'images/eicon2.gif' > } > > var p2 = { > oversrc:'images/eicon2.gif', > downsrc:'images/eicon3.gif' > } > > var myImage = > dynapi.functions.getImage('images/eicon1.gif',32,32,p); > var myImage2 = > dynapi.functions.getImage('images/eicon1.gif',32,32,p2); > </script> > </head> > <body> > Press move your mouse over the image below and click > on it<br><br> > <script> > document.write(myImage.getHTML()); > document.write(myImage2.getHTML()); > </script> > > </body> > </html> > > ============================================================ > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built > ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are > available now. > Download today and enter to win an XBOX or Visual > Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
From: Leif W <war...@us...> - 2003-08-05 16:04:30
|
This is the problem, I believe... note the following two definitions, p and p2. The oversrc and downsrc are different, therefore the expected sequence of images should be different as well, but they're not. They're identical, they're both the first sequence. My blind guess is that since the behaviour is identical, then the myImage.getHTML() must be identical, so the problem has to be somewhere in the getImage function, where it's not allowing multiple instances because of the first argument (eicon1.gif) being the same on a subsequent call. I tried both IE6 and Mozilla 1.4 on Win2k with a copy of the updated CVS, and observed the same behaviour in both browsers. > > var p = { > > oversrc:'images/eicon3.gif', > > downsrc:'images/eicon2.gif' > > } > > > > var p2 = { > > oversrc:'images/eicon2.gif', > > downsrc:'images/eicon3.gif' > > } > dynapi.functions.getImage('images/eicon1.gif',32,32,p); > > var myImage2 = > > > dynapi.functions.getImage('images/eicon1.gif',32,32,p2); P.S. Now I see a fix is already made before I finished the email, so the point may be moot, but I wonder if I guessed right. :-) ----- Original Message ----- From: "Raymond Irving" <xw...@ya...> To: <dyn...@li...> Sent: Tuesday, August 05, 2003 11:26 AM Subject: Re: [Dynapi-Help] Mouseover Bug? - 3.0.0 (Beta 1) - dynapi.functions.getimage.html > > Well, I copied the code and all seems to work well. > > What browser and version are you using? > Have you downloaded the lastest snapshot? > > PS. I'm unable to regenerate the errors. Please give > more info. > > -- > Raymond Irving > > --- Leif W <war...@us...> wrote: > > Hello, > > > > I tried this example unmodified on DynAPI 3 beta 1 > > and it seemed to work ok, > > unless the functionality I observed doesn't match > > the functionality you > > expect. I'm not sure what to expect, that's why I > > say it seems to work. > > ;-) What I did was make three icon files, a red > > block with a white 1 > > (eicon1.gif), and a green block with a white 2 > > (eicon2.gif) and a blue block > > with a white 3 (eicon3.gif). What I observerd was > > that both behave exactly > > the same. Maybe this is the error? Both start with > > the red-1, mouseover to > > the blue-3, and click to the green-2. From the > > code, myImage2 should > > mouseover to green-2, and click to blue-3. I'm not > > too familiar with the > > Image functions, but I can reproduce the error so > > maybe it's a bug in DynAPI > > 3 beta 1. Same thing happens in the updated CVS > > code, so it may be a new > > bug. Will have to look into this some more. > > > > Leif > > > > ----- Original Message ----- > > From: Kevin Breynck > > To: dyn...@li... > > Sent: Tuesday, August 05, 2003 9:08 AM > > Subject: [Dynapi-Help] Mouseover Bug? - 3.0.0 (Beta > > 1) - > > dynapi.functions.getimage.html > > > > > > > > Hi everyone, > > > > i have a problem with the example "Other > > Demonstrations" / "- Image > > rollovers" > > > > The shown example is very easy, but if i try to > > create a second image object > > with the same image path like the first image > > object, it doesn't work. > > I only changed the downsrc with the oversrc for the > > second image object but > > it doesn't work. > > Am i doing something wrong or is this a bug? And if > > it is a bug, how can i > > fix it? > > > > > ============================================================ > > <html> > > <head> > > <title>DynAPI - Image Rollover</title> > > <script language="JavaScript" > > src="../src/dynapi.js"></script> > > <script language="Javascript"> > > dynapi.library.setPath('../src/'); > > > > dynapi.library.include('dynapi.functions.Image'); > > </script> > > <script language="Javascript"> > > var p = { > > oversrc:'images/eicon3.gif', > > downsrc:'images/eicon2.gif' > > } > > > > var p2 = { > > oversrc:'images/eicon2.gif', > > downsrc:'images/eicon3.gif' > > } > > > > var myImage = > > > dynapi.functions.getImage('images/eicon1.gif',32,32,p); > > var myImage2 = > > > dynapi.functions.getImage('images/eicon1.gif',32,32,p2); > > </script> > > </head> > > <body> > > Press move your mouse over the image below and click > > on it<br><br> > > <script> > > document.write(myImage.getHTML()); > > document.write(myImage2.getHTML()); > > </script> > > > > </body> > > </html> > > > > > ============================================================ > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Free pre-built > > ASP.NET sites including > > Data Reports, E-commerce, Portals, and Forums are > > available now. > > Download today and enter to win an XBOX or Visual > > Studio .NET. > > > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > |
From: Thomas K. <th...@ke...> - 2003-08-05 15:41:11
|
On Tue, Aug 05 2003, Kevin Breynck wrote: > Hi everyone, > > i have a problem with the example "Other Demonstrations" / "- Image rollovers" > > The shown example is very easy, but if i try to create a second image > object with the same image path like the first image object, it doesn't > work. > I only changed the downsrc with the oversrc for the second image object > but it doesn't work. > Am i doing something wrong or is this a bug? And if it is a bug, how can i > fix it? I think I had the same problem, only that I wanted different texts. It seem's that the src of the image, is used as the key in the array holding the image objects, thus returning the same object when giving the same src. A solution - nope not yet. I don't know if it's a bug or a feature :) -- Med venlig hilsen Thomas Kenne, kenne.dk |