You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(83) |
Nov
(319) |
Dec
(441) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(617) |
Feb
(784) |
Mar
(426) |
Apr
(363) |
May
(489) |
Jun
(396) |
Jul
(405) |
Aug
(146) |
Sep
(97) |
Oct
(146) |
Nov
(348) |
Dec
(99) |
2002 |
Jan
(69) |
Feb
(92) |
Mar
(58) |
Apr
(33) |
May
(29) |
Jun
(45) |
Jul
(72) |
Aug
(71) |
Sep
(47) |
Oct
(19) |
Nov
(48) |
Dec
(55) |
2003 |
Jan
(23) |
Feb
(73) |
Mar
(42) |
Apr
(52) |
May
(64) |
Jun
(155) |
Jul
(169) |
Aug
(103) |
Sep
(113) |
Oct
(118) |
Nov
(46) |
Dec
(30) |
2004 |
Jan
(19) |
Feb
(24) |
Mar
(40) |
Apr
(13) |
May
(35) |
Jun
(1) |
Jul
(23) |
Aug
(3) |
Sep
(31) |
Oct
(31) |
Nov
(26) |
Dec
|
2005 |
Jan
(5) |
Feb
(4) |
Mar
(3) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(23) |
Sep
(9) |
Oct
(5) |
Nov
(2) |
Dec
(1) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Yanglong Z. <yz...@ou...> - 2003-09-28 04:05:53
|
Thanks Raymond Irving, and Brian Heys (I got you two's email at the same time and I have the same response as well) Here we go. I haven't tried your codes yet. But by looking at them, I believe they probably just trigger a new layer pop up, instead of capture the target element's content for an interactive editing session. Here I have to stress INTERACTIVE EDITING. Not just pop up another layer (for editing or not). The poped-up layer has to carry the information of the target element: Including the text and attributes (when neccessary --manipulated behind the screen) for a collabolative web site. After the target is edited, the user will save the new info to the server and refreshed on the users screen instantly. That new info will become available to all other users immediately. By looking at the examples in the downloaded package, I think the loadPanel is a very good tool as part of this thing I'm building. And I still don't know how to graft that into my codes. But I believe eventually, with your help, all these features will fit in nicely. I love people on this mailing list. You guys are fabulous in responding quickly. Thanks. Raymond Irving wrote: >I don't think you need the <div id="target"> tag. Try >rewritting your code to reflect the following: > >var lyrmaster = dynapi.document.addChild(new >DynLayer('<img >src="./insertion_embed.png">',50,150,null,null,'silver')); >// Note: w & h can only be null or integer values > >var lyr1 = lyrmaster.addChild(new DynLayer('I >want this layer to respond to clicking, and pop up >lyr3', 50, 50, 200, 100, 'red')); > >// setup event listener >var el = { > onclick : function(e){ > lyr2.set.Visible(true); > } >}; >// add event listener to layer >lyr1.addEventListener(el); > >var lyr2 = ... >var lyr3 = ... > > >-- >Raymond Irving > >--- Yanglong Zhu <yz...@ou...> wrote: > > >>Hi everyone, >> >>I'm new here. >>I just started trying DynAPI out. I have had some >>successes. But I have >>lots of questions as well. So far, I can combine my >>own code with >>DynLayer to generate interactive editing features in >>Mozilla , however >>IE is very stubbon to be reigned in. My question is: >>How do you add >>eventListener() to a element generated in >>DynLayer()? >> >>var lyrmaster = dynapi.document.addChild(new >>DynLayer('<img >> >> >> >src="./insertion_embed.png">',50,150,'auto','auto','silver')); > > >>var lyr1 = lyrmaster.addChild(new DynLayer('<div >>id="target" >>onmouseover="lyr2.set.Visible(true);return false;">I >>want this div to >>respond to clicking, and pop up lyr3</div> ', 50, >>50, 200, 100, 'red')); >>var lyr2 = ... >>var lyr3 = ... >> >>The key part I am trying to get working is how to >>add an eventListener >>to the element id="target", and pops up lyr3. I use >>my own code can >>make it work in Mozilla. However it does not work in >>IE. Besides I >>believe DynAPI must have a nicer way to do this in >>IE and Mozilla than >>what I have come up with. >> >>Thanks. >> >>Yanglong >> >> >> >> >> >> >> >------------------------------------------------------- > > >>This sf.net email is sponsored by:ThinkGeek >>Welcome to geek heaven. >>http://thinkgeek.com/sf >>_______________________________________________ >>Dynapi-Help mailing list >>Dyn...@li... >> >> >> >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > >__________________________________ >Do you Yahoo!? >The New Yahoo! Shopping - with improved product search >http://shopping.yahoo.com > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dynapi-Help mailing list >Dyn...@li... >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > |
From: Raymond I. <xw...@ya...> - 2003-09-28 03:15:05
|
I don't think you need the <div id="target"> tag. Try rewritting your code to reflect the following: var lyrmaster = dynapi.document.addChild(new DynLayer('<img src="./insertion_embed.png">',50,150,null,null,'silver')); // Note: w & h can only be null or integer values var lyr1 = lyrmaster.addChild(new DynLayer('I want this layer to respond to clicking, and pop up lyr3', 50, 50, 200, 100, 'red')); // setup event listener var el = { onclick : function(e){ lyr2.set.Visible(true); } }; // add event listener to layer lyr1.addEventListener(el); var lyr2 = ... var lyr3 = ... -- Raymond Irving --- Yanglong Zhu <yz...@ou...> wrote: > Hi everyone, > > I'm new here. > I just started trying DynAPI out. I have had some > successes. But I have > lots of questions as well. So far, I can combine my > own code with > DynLayer to generate interactive editing features in > Mozilla , however > IE is very stubbon to be reigned in. My question is: > How do you add > eventListener() to a element generated in > DynLayer()? > > var lyrmaster = dynapi.document.addChild(new > DynLayer('<img > src="./insertion_embed.png">',50,150,'auto','auto','silver')); > var lyr1 = lyrmaster.addChild(new DynLayer('<div > id="target" > onmouseover="lyr2.set.Visible(true);return false;">I > want this div to > respond to clicking, and pop up lyr3</div> ', 50, > 50, 200, 100, 'red')); > var lyr2 = ... > var lyr3 = ... > > The key part I am trying to get working is how to > add an eventListener > to the element id="target", and pops up lyr3. I use > my own code can > make it work in Mozilla. However it does not work in > IE. Besides I > believe DynAPI must have a nicer way to do this in > IE and Mozilla than > what I have come up with. > > Thanks. > > Yanglong > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
From: Raymond I. <xw...@ya...> - 2003-09-28 03:07:30
|
Try putting this code only in the top most widget: this.addEventListener({ onpathrun: function(e){ e.bubble = true; // ^ this will allow the onpathrun event // to bubble to parent } } -- Raymond Irving --- Brian Hayes <bg...@ke...> wrote: > Hello, I have come a long way with my project, and I > know this would not be > a reality without dynapi....( I am a spokes person) > however, the learning > curve is somewhat on the uphill side.. With that > said, it there a way to > make an invokeEvent('someevent'), global? or, send > the event to all objects > loaded on the page? I ask because I read some where > that widgets should not > have eventhandlers embedded in them, but the only > way I have been able to > get my objects to see the event is through the > e.getSource().parent.envokEvent('somevent').. > However, this only work on > child deep.. And when I attempt to change everything > over to the other > recommended way var o=tjhis; and reference > o.someFunction(); it seams to > break NS6 and 7.. > > Example: WidgetA > > this.addEventListener({onpathrun: function(e){ > if(e.getSource().parent){ > e.getSource().parent.invokeEvent('onpathrun',null)}}); > > This is inside every singe widget that is a child of > another widget, until I > get to the main widget that needs the event. > > Any advice would be appreciated. > > Thanks, > > Brian Hayes > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
From: Yanglong Z. <yz...@ou...> - 2003-09-28 00:01:02
|
Hi everyone, I'm new here. I just started trying DynAPI out. I have had some successes. But I have lots of questions as well. So far, I can combine my own code with DynLayer to generate interactive editing features in Mozilla , however IE is very stubbon to be reigned in. My question is: How do you add eventListener() to a element generated in DynLayer()? var lyrmaster = dynapi.document.addChild(new DynLayer('<img src="./insertion_embed.png">',50,150,'auto','auto','silver')); var lyr1 = lyrmaster.addChild(new DynLayer('<div id="target" onmouseover="lyr2.set.Visible(true);return false;">I want this div to respond to clicking, and pop up lyr3</div> ', 50, 50, 200, 100, 'red')); var lyr2 = ... var lyr3 = ... The key part I am trying to get working is how to add an eventListener to the element id="target", and pops up lyr3. I use my own code can make it work in Mozilla. However it does not work in IE. Besides I believe DynAPI must have a nicer way to do this in IE and Mozilla than what I have come up with. Thanks. Yanglong |
From: Raymond I. <xw...@ya...> - 2003-09-24 15:21:23
|
--- Clemens Eisserer <Lin...@we...> wrote: > > May I ask some other questions: > > a.) Where can I find the source for the server-side > php scripts when using communication? > I´m interrested to port them to jsp. If you can port it to jsp then that would be cool. See the examples/ folder for the server-side scripts > b.) Where can I find a programmers apidoc? The only > this I found are e.g. DynObject, DynLayer, > DynDocument. But I e.g. searched how the method > onmouseout in mouselistener is calles. I didnt find > it :-( See the docs/index.html file for documentation. You can also see some of the docs on the dynapi website (http://dynapi.sourceforge.net/doccenter/index.php?APIDocumentation) but these are for version 2.5.x The documentation for version 3.0 is not yet completed. We need more persons to help out in this area. Download the lastest snapshot of dynapi 3.0 here: http://dynapi.sourceforge.net/snapshot/?N=D > c.) How is it possible, e.g. to set the > color-variable directly: > <a href="javascript:setColor('green')">green</a> This can be done by doing the following: <a href="javascript:lyr.setBgColor('green')">green</a> where lyr is a DynLayer object > Thanks for this great project, it enables me to > develop real weblications which are 100% > cross-browser, and althought I like Java really > much, dynapi is a much more user-friendly solution. > Really cool! We're glad to have you on board. Please help to spread the word around. -- Raymond Irving __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
From: Clemens E. <Lin...@we...> - 2003-09-24 11:12:36
|
Thanks a lot for your fast and effictive help. Strange mistake :-) N ow works fine under Konqueror3, IE5,6, Opera7 and Mozilla *yeah*. > Welcome aboard. Neat little demo! I might add a few > other things and use it as a demo inside the examples/ > folder. Agree=3F Of course, but it has a bug: It doesnt realize, if the mouse was "upped" w= hen out of the "grid-layers". This should now be fixed ;-) May I ask some other questions: a.) Where can I find the source for the server-side php scripts when using= communication=3F I=B4m interrested to port them to jsp. b.) Where can I find a programmers apidoc=3F The only this I found are e.g. = DynObject, DynLayer, DynDocument. But I e.g. searched how the method onmou= seout in mouselistener is calles. I didnt find it :-( c.) How is it possible, e.g. to set the color-variable directly:=20 <a href=3D"javascript:setColor('green')">green</a> Thanks for this great project, it enables me to develop real weblications = which are 100% cross-browser, and althought I like Java really much, dynap= i is a much more user-friendly solution. Really cool! Thanks a lot, heres the code again: <html> <head> <title>DynAPI Examples - Drag Over Event</title> <script language=3D"JavaScript" src=3D"../src/dynapi.js"></script> <script language=3D"Javascript"> dynapi.library.setPath('../src/'); dynapi.library.include('dynapi.api'); dynapi.library.include('dynapi.api.ext.DragEvent'); dynapi.library.include('dynapi.functions.Image'); dynapi.library.include('dynapi.gui.events.*'); dynapi.library.include('dynapi.util.*'); </script> <script language=3D"Javascript"> var l1 =3D new Array(); var counter =3D 0; var clicked =3D false; var color =3D 'black'; var into =3D false; dynapi.document.setTextSelectable(false); var docMouseUp =3D { onmouseup : function(e) { clicked =3D false; } } var gridMouseListener =3D { onmouseover : function(e) { if(clicked=3D=3Dtrue) { var s =3D e.getSource(); s.setBgColor(color); } }, onmouseout : function(e) { into =3D false; }, onmousedown : function(e) { var source =3D e.getSource(); source.setBgColor(color); clicked =3D true; }, onclick : function(e) { var s =3D e.getSource(); s.setBgColor(color); }, onmouseup : function(e) { clicked =3D false; } }; var constspace =3D 200; var lines =3D 0; for(counter=3D0; counter < 200;counter++) { if((counter%20=3D=3D0) && counter!=3D0) { lines++; } l1[counter] =3D new DynLayer(); l1[counter].setBgColor('gray'); l1[counter].setSize(30, 30); l1[counter].setLocation((counter%20)*30, 30*lines+constspace); l1[counter].addEventListener(gridMouseListener); dynapi.document.addChild(l1[counter]); } dynapi.document.addEventListener(docMouseUp); function setColor(col) { color =3D col; } </script> </head> <body> <script> dynapi.document.insertAllChildren(); </script> <p> <a href=3D"javascript:setColor('green')">green</a> <a href=3D"javascript:setColor('yellow')">yellow</a> <a href=3D"javascript:setColor('blue')">blue</a> <a href=3D"javascript:setColor('red')">red</a> <a href=3D"javascript:setColor('white')">white</a> <a href=3D"javascript:setColor('black')">black</a> </p> </body> </html> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F Die Besten ihrer Klasse! WEB.DE FreeMail (1,7) und WEB.DE Club (1,9) - bei der Stiftung Warentest - ein Doppelsieg! http://f.web.de/=3Fmc=3D021184 |
From: Raymond I. <xw...@ya...> - 2003-09-24 02:55:55
|
Welcome aboard. Neat little demo! I might add a few other things and use it as a demo inside the examples/ folder. Agree? I've spotted a problem with you code in line 61: onmouseup : function(e) { clicked = false; }, // <--- error }; remove the extra "," It should now work fine in IE6 As for the IOElement stuff you will have to see the docs for more info on how it works See also: Tips & Tricks (docs/docs/tiptrickhtml) IOElement Basics (docs/docs/quickref.ioelement-basic.html and quickref.ioelement.html) Enjoy! -- Raymond Irving --- Clemens Eisserer <lin...@we...> wrote: > Hi there! > > First of all I want to thank you very much, your > ptoject seems to be > what I´ve ever searched. > I never used JavaScrpipt because of the lack of a > powerful and portable > class-library. You´ve done what MS and Netscape,... > werent able to do, > thanks a lot! > > Hmm, I started today with dynapi-3 beta1, and I´ve a > piece of code that > works great with Mozzi-1.3, Netscape-4.7/Linux but > doesnt work at all > with IE6,Konqueror or Opera6. > > > For now its only a trial&error file, but I dont know > why it doesnt work. > Does anybody know why the pulling-animation (moving > the mouse over other > layers when mouse is pressed) doesnt work with IE? > > > The code is really simple: > > <html> > <head> > <title>DynAPI Examples - Drag Over Event</title> > <script language="JavaScript" > src="../src/dynapi.js"></script> > <script language="Javascript"> > dynapi.library.setPath('../src/'); > dynapi.library.include('dynapi.api'); > dynapi.library.include('dynapi.api.ext.DragEvent'); > dynapi.library.include('dynapi.functions.Image'); > dynapi.library.include('dynapi.gui.events.*'); > > </script> > <script language="Javascript"> > var l1 = new Array(); > var counter = 0; > var clicked = false; > var color = 'black'; > > dynapi.document.setTextSelectable(false); > > var el2 = > { > onmouseover : function(e) > { > if(clicked==true) > { > // var s = e.getSource(); > // s.setBgColor(color); > } > }, > > onmousemove : function(e) > { > if(clicked==true) > { > var s = e.getSource(); > s.setBgColor(color); > } > } > } > > var el = > { > onmousedown : function(e) > { > var source = e.getSource(); > source.setBgColor(color); > clicked = true; > }, > > onclick : function(e) > { > var s = e.getSource(); > s.setBgColor(color); > }, > > onmouseup : function(e) > { > clicked = false; > }, > > }; > > var constspace = 200; > var lines = 0; > for(counter=0; counter < 200;counter++) > { > if((counter%20==0) && counter!=0) > { > lines++; > } > > l1[counter] = new DynLayer(); > l1[counter].setBgColor('gray'); > l1[counter].setSize(30, 30); > l1[counter].setLocation((counter%20)*30, > 30*lines+constspace); > l1[counter].addEventListener(el); > l1[counter].addEventListener(el2); > } > > var counter2 =0; > for(; counter2 <= counter; counter2++) > { > dynapi.document.addChild(l1[counter2]); > } > > function setColor(col) > { > color = col; > } > </script> > </head> > <body> > <script> > dynapi.document.insertAllChildren(); > </script> > <p> > <a href="javascript:setColor('green')">green</a> > <a href="javascript:setColor('yellow')">yellow</a> > <a href="javascript:setColor('blue')">blue</a> > <a href="javascript:setColor('red')">red</a> > <a href="javascript:setColor('white')">white</a> > <a href="javascript:setColor('black')">black</a> > </p> > </body> > </html> > > > Another question regarding communication with the > server. > As far as I´ve noticed dynapi allows this through > IOElements. > How is this internally handeld? As far as I know > there isnt a > possibility in JS to open sockets.. > > Sorry for nerving with my neverending > newbie-questions. Thanks a lot for > this really great and cool peace software! > > lg Clemens > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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: Clemens E. <lin...@we...> - 2003-09-23 19:29:39
|
Hi there! First of all I want to thank you very much, your ptoject seems to be what I´ve ever searched. I never used JavaScrpipt because of the lack of a powerful and portable class-library. You´ve done what MS and Netscape,... werent able to do, thanks a lot! Hmm, I started today with dynapi-3 beta1, and I´ve a piece of code that works great with Mozzi-1.3, Netscape-4.7/Linux but doesnt work at all with IE6,Konqueror or Opera6. For now its only a trial&error file, but I dont know why it doesnt work. Does anybody know why the pulling-animation (moving the mouse over other layers when mouse is pressed) doesnt work with IE? The code is really simple: <html> <head> <title>DynAPI Examples - Drag Over Event</title> <script language="JavaScript" src="../src/dynapi.js"></script> <script language="Javascript"> dynapi.library.setPath('../src/'); dynapi.library.include('dynapi.api'); dynapi.library.include('dynapi.api.ext.DragEvent'); dynapi.library.include('dynapi.functions.Image'); dynapi.library.include('dynapi.gui.events.*'); </script> <script language="Javascript"> var l1 = new Array(); var counter = 0; var clicked = false; var color = 'black'; dynapi.document.setTextSelectable(false); var el2 = { onmouseover : function(e) { if(clicked==true) { // var s = e.getSource(); // s.setBgColor(color); } }, onmousemove : function(e) { if(clicked==true) { var s = e.getSource(); s.setBgColor(color); } } } var el = { onmousedown : function(e) { var source = e.getSource(); source.setBgColor(color); clicked = true; }, onclick : function(e) { var s = e.getSource(); s.setBgColor(color); }, onmouseup : function(e) { clicked = false; }, }; var constspace = 200; var lines = 0; for(counter=0; counter < 200;counter++) { if((counter%20==0) && counter!=0) { lines++; } l1[counter] = new DynLayer(); l1[counter].setBgColor('gray'); l1[counter].setSize(30, 30); l1[counter].setLocation((counter%20)*30, 30*lines+constspace); l1[counter].addEventListener(el); l1[counter].addEventListener(el2); } var counter2 =0; for(; counter2 <= counter; counter2++) { dynapi.document.addChild(l1[counter2]); } function setColor(col) { color = col; } </script> </head> <body> <script> dynapi.document.insertAllChildren(); </script> <p> <a href="javascript:setColor('green')">green</a> <a href="javascript:setColor('yellow')">yellow</a> <a href="javascript:setColor('blue')">blue</a> <a href="javascript:setColor('red')">red</a> <a href="javascript:setColor('white')">white</a> <a href="javascript:setColor('black')">black</a> </p> </body> </html> Another question regarding communication with the server. As far as I´ve noticed dynapi allows this through IOElements. How is this internally handeld? As far as I know there isnt a possibility in JS to open sockets.. Sorry for nerving with my neverending newbie-questions. Thanks a lot for this really great and cool peace software! lg Clemens |
From: Raymond I. <xw...@ya...> - 2003-09-23 12:55:47
|
DynAPI 3.0 has some new features that allows you to have greater control over your images. You might want to give 3.0 a try You cannot access inline layers until the page is fully loaded. That's how the browsers work but you can still checkout some of the new features of dynapi 3.0 to see if it will work for you. http://dynapi.sourceforge.net/snapshot/?N=D -- Raymond Irving --- Leif Wessman <lei...@ho...> wrote: > > Hi, > > How do I change the src of an image in a DynLayer > (with javascript) - before > the document is loaded? It seems as if > DynAPI.document is not accessible. Is > there a way to make it accessible or how should I do > it??? > > Please not that It's not possible for me to wait > until the page is fully > loaded. I have to change the image before... > > Thank you for your help!! > > This is my code: > > <html> > <head> > <script language="JavaScript" src="/js/dynapi.js" > type="text/javascript"></script> > <script language="JavaScript" > type="text/javascript"> > <!-- > DynAPI.setLibraryPath('/js/lib/'); > DynAPI.include('dynapi.api.*'); > DynAPI.include('dynapi.ext.inline.js'); > //--> > </script> > </head> > <div id="mylayer" style="position:absolute"> > <img name="myimage" src="/box.empty.gif"> > </div> > <script language="JavaScript" > type="text/javascript"> > <!-- > // it seems as if the DynAPI.document does not exist > DynAPI.findLayers(DynAPI.document); > > // and that's the reason that I can't change the > image in the layer > DynAPI.document.all["mylayer"].images['myimage'].src > = '/box.check.gif'; > //--> > </script> > </html> > > Leif > > _________________________________________________________________ > Lättare att hitta drömresan med MSN Resor > http://www.msn.se/resor/ > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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. <lei...@ho...> - 2003-09-23 08:16:17
|
Hi, How do I change the src of an image in a DynLayer (with javascript) - before the document is loaded? It seems as if DynAPI.document is not accessible. Is there a way to make it accessible or how should I do it??? Please not that It's not possible for me to wait until the page is fully loaded. I have to change the image before... Thank you for your help!! This is my code: <html> <head> <script language="JavaScript" src="/js/dynapi.js" type="text/javascript"></script> <script language="JavaScript" type="text/javascript"> <!-- DynAPI.setLibraryPath('/js/lib/'); DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.ext.inline.js'); //--> </script> </head> <div id="mylayer" style="position:absolute"> <img name="myimage" src="/box.empty.gif"> </div> <script language="JavaScript" type="text/javascript"> <!-- // it seems as if the DynAPI.document does not exist DynAPI.findLayers(DynAPI.document); // and that's the reason that I can't change the image in the layer DynAPI.document.all["mylayer"].images['myimage'].src = '/box.check.gif'; //--> </script> </html> Leif _________________________________________________________________ Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/ |
From: George A. <GAr...@co...> - 2003-09-22 21:52:13
|
thank you .. this is exactly what i was looking for ... can this information be found in the documentation that comes along with DynAPI 3.0 beta ? thanks ! george . Raymond Irving <xw...@ya... m> To Sent by: dyn...@li... dynapi-help-admin cc @lists.sourceforg e.net Subject Re: [Dynapi-Help] onresize hook . 09/22/2003 04:40 PM Please respond to dynapi-help@lists .sourceforge.net Use the onresize event listener: dynapi.document.addEventListener({ onresize : function(e){ var o = e.getSource(); // do some work here } }) -- Raymond Irving --- George Ardeleanu <GAr...@co...> wrote: > > > > > hello everyone , > > i just started using the new dynapi 3.0 CVS version > a couple of days ago . > i realized in my script i need to perform a function > call every time the > user resizes the window to update some display > elements . however , i cant > seem to find how to accomplish this . Looking > through some the list's > archives i came across some emails how one can call > Dynapi.onresize = > function(...) {...}; i cant seem to personally > get this to work . is > there a different way to accomplish this in DynAPI 3 > ? > > > thanks . > > george . > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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 is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Help mailing list Dyn...@li... https://lists.sourceforge.net/lists/listinfo/dynapi-help |
From: Leif W <war...@us...> - 2003-09-22 21:48:39
|
Does the dynapi.document.addEventListener work for a window resize? The initial programming requirement stated the use case of a window resize being the event to trigger some function [1]. I tried the code below [2] but it didn't seem to work. Got the error in the Mozilla Javascript Console: dynapi.document has no properties. Not sure if I'm doing something wrong. [1] Use case > > i realized in my script i need to perform a function > > call every time the > > user resizes the window to update some display [2] Code <SCRIPT LANGUAGE="JavaScript" SRC="../../dynapi3x/src/dynapi.js"> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> dynapi.document.addEventListener({ onresize : function ( e ) { var o = e.getSource(); // do some work here alert( 'window was resized!!' ); } }) </SCRIPT> ----- Original Message ----- From: "Raymond Irving" <xw...@ya...> To: <dyn...@li...> Sent: Monday, September 22, 2003 4:40 PM Subject: Re: [Dynapi-Help] onresize hook . > > Use the onresize event listener: > > dynapi.document.addEventListener({ > onresize : function(e){ > var o = e.getSource(); > // do some work here > } > }) > > -- > Raymond Irving > > --- George Ardeleanu <GAr...@co...> > wrote: > > > > > > > > > > hello everyone , > > > > i just started using the new dynapi 3.0 CVS version > > a couple of days ago . > > i realized in my script i need to perform a function > > call every time the > > user resizes the window to update some display > > elements . however , i cant > > seem to find how to accomplish this . Looking > > through some the list's > > archives i came across some emails how one can call > > Dynapi.onresize = > > function(...) {...}; i cant seem to personally > > get this to work . is > > there a different way to accomplish this in DynAPI 3 > > ? > > > > > > thanks . > > > > george . > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > 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 is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > |
From: Leif W <war...@us...> - 2003-09-22 21:36:26
|
I've fallen behind on the emails and am trying to catch up. I'm a terribly slow reader. I may have to unsubscribe from Apache for a while as much as I like the list and learn new things there. Just had one weekend away from my PC, a few days not feeling well, a week trying to catch up, another half weekend away (with cousin's 3 kids all under 10, it was great :) and still recuperating from that. ;) So I have about 70 something unread emails from the past week and a half from DynAPI alone. Hey all designers, developers and project leaders and such, what's going on, where're your minds at, where's your code at, have any time to update the group on progress? Leif ----- Original Message ----- From: "Raymond Irving" <xw...@ya...> To: <dyn...@li...> Sent: Monday, September 22, 2003 5:00 PM Subject: Re: [Dynapi-Help] Where does this need to be poted? > > You should use object.isClass('DynLayer') or > object.isClass('DynDocument') > > I believe someone is working on a DynAPI object model > for the docs and for the website. Don't know for sure > as we don't get that much feedback from developers > since these last days :( I don't know what's going on > :( > -- > Raymond Irving > > --- Leif W <war...@us...> wrote: > > I'm wondering if it'd make sense to have something > > like a getParent(N) where > > N is optional, and if specified, refers to the > > number of parents above the > > current layer. I'm looking through the code for > > some way to identify if > > it's a dynlayer or just a window object. I don't > > know offhand but I have a > > hunch. I just can't seem to find the right bit of > > code to do it yet. > > > > Leif > > > > ----- Original Message ----- > > From: Brian Hayes > > To: dyn...@li... > > Sent: Sunday, September 21, 2003 10:58 AM > > Subject: RE: [Dynapi-Help] Where does this need to > > be poted? > > > > > > O.k I just did a little test, and the below code > > only seems to work if you > > put a layer inside a layer, but if your layer is > > larger than your page (not > > in side a layer, but simply on added to the page) it > > doen't work.. So, how > > can you tell if your parent layer is the window or a > > DynLayer? Or again, i'm > > sure its the below code..or, possibly not being able > > to detect a window size > > change?? > > > > > > > > > > From: dyn...@li... > > [mailto:dyn...@li...] On > > Behalf Of Brian Hayes > > Sent: Sunday, September 21, 2003 10:50 AM > > To: dyn...@li... > > Subject: [Dynapi-Help] Where does this need to be > > poted? > > > > Dear developer's, > > > > I wanted to share a code change that I > > made today with version > > 3, as it relates to the setDragBoundary function is > > DragEvents. I noticed > > that when you enable boundaries and you have this > > within a containing object > > that was smaller than the one with limits you would > > get very choppy > > behavior. I worked around this by using the > > eventlistener "ondragmove" and > > "ondragstop", by setting my location based on the > > area of my container.. > > Then it hit me, while working on the > > dynapi.function.getimage and some guys > > from work whom specialize in oop style programing.. > > add the code to the core > > dragevent.js file (line 113), and not longer worry > > about it.. So here it is, > > and please let me know what could do better (if > > any, as math is hard for me > > to visualize).. > > > > Origianal Code.. > > //if > > (x<l) x = l; > > > > //else if > > (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; > > //if > > (y<t) y = t; > > > > //else if > > (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; > > > > New Code.. > > > > if(lyr.parent.w>lyr.w){ // > > We are in a container larger than we are, so use the > > orignal code.. > > > > if (x<l) x = l; > > > > else if > > (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; > > > > if (y<t) y = t; > > > > else if > > (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; > > } > > else > > if(lyr.parent.w<lyr.w){ //opps we are larger than > > our container, so make us > > smother to our areas.. > > > > if ( (x*-1) < l) > > x = l; > > > > else if ( > > ((x*-1) +lyr.parent.w-r) >= lyr.w) x = > > lyr.parent.w-lyr.w-r; > > > > if ( (y*-1) < t) > > y = t; > > > > else if ( > > ((y*-1) +lyr.parent.h-b) >= lyr.h) y = > > lyr.parent.w-lyr.h-b; > > } > > > > The above allows the borders to flow very smooth.. > > Please let me know what > > you think, and if you have a cleaner way of writing > > the above.. > > > > Example: > > > > var container = new > > DynLayer(null,0,0,200,200,"e0e0e0"); > > var insideObj = new DynLayer("Inside",0,0,400,400, > > "blue"); larger than our > > container... > > container.addChild(insideObj); > > dynapi.document.addChild(container); > > dynapi.document.insertAllChildren(); > > > > Thanks... Brian Hayes. > > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > 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 is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > |
From: Raymond I. <xw...@ya...> - 2003-09-22 21:01:01
|
You should use object.isClass('DynLayer') or object.isClass('DynDocument') I believe someone is working on a DynAPI object model for the docs and for the website. Don't know for sure as we don't get that much feedback from developers since these last days :( I don't know what's going on :( -- Raymond Irving --- Leif W <war...@us...> wrote: > I'm wondering if it'd make sense to have something > like a getParent(N) where > N is optional, and if specified, refers to the > number of parents above the > current layer. I'm looking through the code for > some way to identify if > it's a dynlayer or just a window object. I don't > know offhand but I have a > hunch. I just can't seem to find the right bit of > code to do it yet. > > Leif > > ----- Original Message ----- > From: Brian Hayes > To: dyn...@li... > Sent: Sunday, September 21, 2003 10:58 AM > Subject: RE: [Dynapi-Help] Where does this need to > be poted? > > > O.k I just did a little test, and the below code > only seems to work if you > put a layer inside a layer, but if your layer is > larger than your page (not > in side a layer, but simply on added to the page) it > doen't work.. So, how > can you tell if your parent layer is the window or a > DynLayer? Or again, i'm > sure its the below code..or, possibly not being able > to detect a window size > change?? > > > > > From: dyn...@li... > [mailto:dyn...@li...] On > Behalf Of Brian Hayes > Sent: Sunday, September 21, 2003 10:50 AM > To: dyn...@li... > Subject: [Dynapi-Help] Where does this need to be > poted? > > Dear developer's, > > I wanted to share a code change that I > made today with version > 3, as it relates to the setDragBoundary function is > DragEvents. I noticed > that when you enable boundaries and you have this > within a containing object > that was smaller than the one with limits you would > get very choppy > behavior. I worked around this by using the > eventlistener "ondragmove" and > "ondragstop", by setting my location based on the > area of my container.. > Then it hit me, while working on the > dynapi.function.getimage and some guys > from work whom specialize in oop style programing.. > add the code to the core > dragevent.js file (line 113), and not longer worry > about it.. So here it is, > and please let me know what could do better (if > any, as math is hard for me > to visualize).. > > Origianal Code.. > //if > (x<l) x = l; > > //else if > (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; > //if > (y<t) y = t; > > //else if > (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; > > New Code.. > > if(lyr.parent.w>lyr.w){ // > We are in a container larger than we are, so use the > orignal code.. > > if (x<l) x = l; > > else if > (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; > > if (y<t) y = t; > > else if > (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; > } > else > if(lyr.parent.w<lyr.w){ //opps we are larger than > our container, so make us > smother to our areas.. > > if ( (x*-1) < l) > x = l; > > else if ( > ((x*-1) +lyr.parent.w-r) >= lyr.w) x = > lyr.parent.w-lyr.w-r; > > if ( (y*-1) < t) > y = t; > > else if ( > ((y*-1) +lyr.parent.h-b) >= lyr.h) y = > lyr.parent.w-lyr.h-b; > } > > The above allows the borders to flow very smooth.. > Please let me know what > you think, and if you have a cleaner way of writing > the above.. > > Example: > > var container = new > DynLayer(null,0,0,200,200,"e0e0e0"); > var insideObj = new DynLayer("Inside",0,0,400,400, > "blue"); larger than our > container... > container.addChild(insideObj); > dynapi.document.addChild(container); > dynapi.document.insertAllChildren(); > > Thanks... Brian Hayes. > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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-09-22 20:56:07
|
I'm wondering if it'd make sense to have something like a getParent(N) where N is optional, and if specified, refers to the number of parents above the current layer. I'm looking through the code for some way to identify if it's a dynlayer or just a window object. I don't know offhand but I have a hunch. I just can't seem to find the right bit of code to do it yet. Leif ----- Original Message ----- From: Brian Hayes To: dyn...@li... Sent: Sunday, September 21, 2003 10:58 AM Subject: RE: [Dynapi-Help] Where does this need to be poted? O.k I just did a little test, and the below code only seems to work if you put a layer inside a layer, but if your layer is larger than your page (not in side a layer, but simply on added to the page) it doen't work.. So, how can you tell if your parent layer is the window or a DynLayer? Or again, i'm sure its the below code..or, possibly not being able to detect a window size change?? From: dyn...@li... [mailto:dyn...@li...] On Behalf Of Brian Hayes Sent: Sunday, September 21, 2003 10:50 AM To: dyn...@li... Subject: [Dynapi-Help] Where does this need to be poted? Dear developer's, I wanted to share a code change that I made today with version 3, as it relates to the setDragBoundary function is DragEvents. I noticed that when you enable boundaries and you have this within a containing object that was smaller than the one with limits you would get very choppy behavior. I worked around this by using the eventlistener "ondragmove" and "ondragstop", by setting my location based on the area of my container.. Then it hit me, while working on the dynapi.function.getimage and some guys from work whom specialize in oop style programing.. add the code to the core dragevent.js file (line 113), and not longer worry about it.. So here it is, and please let me know what could do better (if any, as math is hard for me to visualize).. Origianal Code.. //if (x<l) x = l; //else if (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; //if (y<t) y = t; //else if (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; New Code.. if(lyr.parent.w>lyr.w){ // We are in a container larger than we are, so use the orignal code.. if (x<l) x = l; else if (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; if (y<t) y = t; else if (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; } else if(lyr.parent.w<lyr.w){ //opps we are larger than our container, so make us smother to our areas.. if ( (x*-1) < l) x = l; else if ( ((x*-1) +lyr.parent.w-r) >= lyr.w) x = lyr.parent.w-lyr.w-r; if ( (y*-1) < t) y = t; else if ( ((y*-1) +lyr.parent.h-b) >= lyr.h) y = lyr.parent.w-lyr.h-b; } The above allows the borders to flow very smooth.. Please let me know what you think, and if you have a cleaner way of writing the above.. Example: var container = new DynLayer(null,0,0,200,200,"e0e0e0"); var insideObj = new DynLayer("Inside",0,0,400,400, "blue"); larger than our container... container.addChild(insideObj); dynapi.document.addChild(container); dynapi.document.insertAllChildren(); Thanks... Brian Hayes. |
From: Raymond I. <xw...@ya...> - 2003-09-22 20:40:16
|
Use the onresize event listener: dynapi.document.addEventListener({ onresize : function(e){ var o = e.getSource(); // do some work here } }) -- Raymond Irving --- George Ardeleanu <GAr...@co...> wrote: > > > > > hello everyone , > > i just started using the new dynapi 3.0 CVS version > a couple of days ago . > i realized in my script i need to perform a function > call every time the > user resizes the window to update some display > elements . however , i cant > seem to find how to accomplish this . Looking > through some the list's > archives i came across some emails how one can call > Dynapi.onresize = > function(...) {...}; i cant seem to personally > get this to work . is > there a different way to accomplish this in DynAPI 3 > ? > > > thanks . > > george . > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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: George A. <GAr...@co...> - 2003-09-22 20:31:20
|
thank for getting back to me so quickly .. i can use the example [1] because i think the DynAPI anchor script is already registering a function for window.onresize . "Leif W" <warp-9.9 @usa.net> To Sent by: <dyn...@li...> dynapi-help-admin cc @lists.sourceforg e.net Subject Re: [Dynapi-Help] onresize hook . 09/22/2003 03:44 PM Please respond to dynapi-help@lists .sourceforge.net I used some code like this [1], but it worked only in Mozilla 1.5 beta, Mozilla Firebird 0.6.1, and Opera 7.11. M$ says Internet Explorer 6 has all these fancy onresize[*|start|end] events[2], but it doesn't seem to work with a simple example like this, surprise surprise. [1] code window.onresize = function () { alert( 'window was resized!!' ); } [2] http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp Leif ----- Original Message ----- From: "George Ardeleanu" <GAr...@co...> To: <dyn...@li...> Sent: Monday, September 22, 2003 2:22 PM Subject: [Dynapi-Help] onresize hook . > > > > > hello everyone , > > i just started using the new dynapi 3.0 CVS version a couple of days ago . > i realized in my script i need to perform a function call every time the > user resizes the window to update some display elements . however , i cant > seem to find how to accomplish this . Looking through some the list's > archives i came across some emails how one can call Dynapi.onresize = > function(...) {...}; i cant seem to personally get this to work . is > there a different way to accomplish this in DynAPI 3 ? > > > thanks . > > george . > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Help mailing list Dyn...@li... https://lists.sourceforge.net/lists/listinfo/dynapi-help |
From: Leif W <war...@us...> - 2003-09-22 20:03:33
|
Upon further inspection of my code, I had a "proper" SCRIPT tag such as this: <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript; charset=utf-8"> But apparently M$ IE barfs on the charset portion wether it's utf-8, iso-8859-1 or windows-1252 (comical, not even windows charset works). But the following does work apparently. <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> Leif ----- Original Message ----- From: "Leif W" <war...@us...> To: <dyn...@li...> Sent: Monday, September 22, 2003 3:44 PM Subject: Re: [Dynapi-Help] onresize hook . > I used some code like this [1], but it worked only in Mozilla 1.5 beta, > Mozilla Firebird 0.6.1, and Opera 7.11. M$ says Internet Explorer 6 has all > these fancy onresize[*|start|end] events[2], but it doesn't seem to work > with a simple example like this, surprise surprise. > > [1] code > > window.onresize = function () > { > alert( 'window was resized!!' ); > } > > [2] > http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp > > Leif > > ----- Original Message ----- > From: "George Ardeleanu" <GAr...@co...> > To: <dyn...@li...> > Sent: Monday, September 22, 2003 2:22 PM > Subject: [Dynapi-Help] onresize hook . > > > > > > > > > > > > hello everyone , > > > > i just started using the new dynapi 3.0 CVS version a couple of days ago . > > i realized in my script i need to perform a function call every time the > > user resizes the window to update some display elements . however , i > cant > > seem to find how to accomplish this . Looking through some the list's > > archives i came across some emails how one can call Dynapi.onresize = > > function(...) {...}; i cant seem to personally get this to work . is > > there a different way to accomplish this in DynAPI 3 ? > > > > > > thanks . > > > > george . > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > |
From: Leif W <war...@us...> - 2003-09-22 19:49:38
|
I used some code like this [1], but it worked only in Mozilla 1.5 beta, Mozilla Firebird 0.6.1, and Opera 7.11. M$ says Internet Explorer 6 has all these fancy onresize[*|start|end] events[2], but it doesn't seem to work with a simple example like this, surprise surprise. [1] code window.onresize = function () { alert( 'window was resized!!' ); } [2] http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp Leif ----- Original Message ----- From: "George Ardeleanu" <GAr...@co...> To: <dyn...@li...> Sent: Monday, September 22, 2003 2:22 PM Subject: [Dynapi-Help] onresize hook . > > > > > hello everyone , > > i just started using the new dynapi 3.0 CVS version a couple of days ago . > i realized in my script i need to perform a function call every time the > user resizes the window to update some display elements . however , i cant > seem to find how to accomplish this . Looking through some the list's > archives i came across some emails how one can call Dynapi.onresize = > function(...) {...}; i cant seem to personally get this to work . is > there a different way to accomplish this in DynAPI 3 ? > > > thanks . > > george . > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > |
From: George A. <GAr...@co...> - 2003-09-22 18:22:43
|
hello everyone , i just started using the new dynapi 3.0 CVS version a couple of days ago . i realized in my script i need to perform a function call every time the user resizes the window to update some display elements . however , i cant seem to find how to accomplish this . Looking through some the list's archives i came across some emails how one can call Dynapi.onresize = function(...) {...}; i cant seem to personally get this to work . is there a different way to accomplish this in DynAPI 3 ? thanks . george . |
From: Raymond I. <xw...@ya...> - 2003-09-21 23:49:40
|
Try using lyr.parent and/or lyr._created These will tell you if the layer is a child layer or if it was created -- Raymond Irving --- Brian Hayes <bg...@ke...> wrote: > Hello everyone, > > When you create a new DynLayer, but do > not add it to the page > via dynapi.document.addChild() and > dynapi.document.insertAllChildren(); how > can you know this information within a custom > widget? The reason I ask, is > to prevent looping with a widget if it does not get > added to the page, or > removed, etd... > > Thanks, > > Brian Hayes > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
From: Raymond I. <xw...@ya...> - 2003-09-21 23:47:37
|
Try using lyr.parent and/or lyr._created These will tell you if the layer is a child layer or if it was created -- Raymond Irving --- Brian Hayes <bg...@ke...> wrote: > Hello everyone, > > When you create a new DynLayer, but do > not add it to the page > via dynapi.document.addChild() and > dynapi.document.insertAllChildren(); how > can you know this information within a custom > widget? The reason I ask, is > to prevent looping with a widget if it does not get > added to the page, or > removed, etd... > > Thanks, > > Brian Hayes > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
From: Brian H. <bg...@ke...> - 2003-09-21 15:08:56
|
Hello everyone, When you create a new DynLayer, but do not add it to the page via dynapi.document.addChild() and dynapi.document.insertAllChildren(); how can you know this information within a custom widget? The reason I ask, is to prevent looping with a widget if it does not get added to the page, or removed, etd... Thanks, Brian Hayes |
From: Brian H. <bg...@ke...> - 2003-09-21 15:01:45
|
O.k I just did a little test, and the below code only seems to work if you put a layer inside a layer, but if your layer is larger than your page (not in side a layer, but simply on added to the page) it doen't work.. So, how can you tell if your parent layer is the window or a DynLayer? Or again, i'm sure its the below code..or, possibly not being able to detect a window size change?? _____ From: dyn...@li... [mailto:dyn...@li...] On Behalf Of Brian Hayes Sent: Sunday, September 21, 2003 10:50 AM To: dyn...@li... Subject: [Dynapi-Help] Where does this need to be poted? Dear developer's, I wanted to share a code change that I made today with version 3, as it relates to the setDragBoundary function is DragEvents. I noticed that when you enable boundaries and you have this within a containing object that was smaller than the one with limits you would get very choppy behavior. I worked around this by using the eventlistener "ondragmove" and "ondragstop", by setting my location based on the area of my container.. Then it hit me, while working on the dynapi.function.getimage and some guys from work whom specialize in oop style programing.. add the code to the core dragevent.js file (line 113), and not longer worry about it.. So here it is, and please let me know what could do better (if any, as math is hard for me to visualize).. Origianal Code.. //if (x<l) x = l; //else if (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; //if (y<t) y = t; //else if (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; New Code.. if(lyr.parent.w>lyr.w){ // We are in a container larger than we are, so use the orignal code.. if (x<l) x = l; else if (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; if (y<t) y = t; else if (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; } else if(lyr.parent.w<lyr.w){ //opps we are larger than our container, so make us smother to our areas.. if ( (x*-1) < l) x = l; else if ( ((x*-1) +lyr.parent.w-r) >= lyr.w) x = lyr.parent.w-lyr.w-r; if ( (y*-1) < t) y = t; else if ( ((y*-1) +lyr.parent.h-b) >= lyr.h) y = lyr.parent.w-lyr.h-b; } The above allows the borders to flow very smooth.. Please let me know what you think, and if you have a cleaner way of writing the above.. Example: var container = new DynLayer(null,0,0,200,200,"e0e0e0"); var insideObj = new DynLayer("Inside",0,0,400,400, "blue"); larger than our container... container.addChild(insideObj); dynapi.document.addChild(container); dynapi.document.insertAllChildren(); Thanks... Brian Hayes. |
From: Brian H. <bg...@ke...> - 2003-09-21 14:53:38
|
Dear developer's, I wanted to share a code change that I made today with version 3, as it relates to the setDragBoundary function is DragEvents. I noticed that when you enable boundaries and you have this within a containing object that was smaller than the one with limits you would get very choppy behavior. I worked around this by using the eventlistener "ondragmove" and "ondragstop", by setting my location based on the area of my container.. Then it hit me, while working on the dynapi.function.getimage and some guys from work whom specialize in oop style programing.. add the code to the core dragevent.js file (line 113), and not longer worry about it.. So here it is, and please let me know what could do better (if any, as math is hard for me to visualize).. Origianal Code.. //if (x<l) x = l; //else if (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; //if (y<t) y = t; //else if (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; New Code.. if(lyr.parent.w>lyr.w){ // We are in a container larger than we are, so use the orignal code.. if (x<l) x = l; else if (x>lyr.parent.w-lyr.w-r) x = lyr.parent.w-lyr.w-r; if (y<t) y = t; else if (y>lyr.parent.h-lyr.h-b) y = lyr.parent.h-lyr.h-b; } else if(lyr.parent.w<lyr.w){ //opps we are larger than our container, so make us smother to our areas.. if ( (x*-1) < l) x = l; else if ( ((x*-1) +lyr.parent.w-r) >= lyr.w) x = lyr.parent.w-lyr.w-r; if ( (y*-1) < t) y = t; else if ( ((y*-1) +lyr.parent.h-b) >= lyr.h) y = lyr.parent.w-lyr.h-b; } The above allows the borders to flow very smooth.. Please let me know what you think, and if you have a cleaner way of writing the above.. Example: var container = new DynLayer(null,0,0,200,200,"e0e0e0"); var insideObj = new DynLayer("Inside",0,0,400,400, "blue"); larger than our container... container.addChild(insideObj); dynapi.document.addChild(container); dynapi.document.insertAllChildren(); Thanks... Brian Hayes. |