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-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: 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 13:43:23
|
Hi, For more information on events see: docs/changelog.html docs/docs/quickref.dynevent.html docs/docs/quickref.eventobject.html functions like e.getOrigin() should return the target layer (or element) -- Raymond Irving --- Yanglong Zhu <yz...@ou...> wrote: > 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 > > > > > > > > > > > > > > ------------------------------------------------------- > 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: Yanglong Z. <yz...@ou...> - 2003-09-29 19:20:20
|
Raymond Irving wrote: >Hi, > >For more information on events see: > >docs/changelog.html >docs/docs/quickref.dynevent.html >docs/docs/quickref.eventobject.html > >functions like e.getOrigin() should return the target >layer (or element) > > This is exactly right. I looked at this method in the changeLog, but was not sure about the relavance. Since you pointed at it as the solution, then I actually tried it out. It solved my puzzle. Thanks. >-- >Raymond Irving > > > I have another question now. How do you make a imgage visible when it is wider than the window size in Mozilla (1.5b, maybe the same in other versions). I have a very big imgage in a DynLayer like this: var lyrmaster = dynapi.document.addChild(new DynLayer('<img src="./insertion_embed.png">',50,150,null,null,'silver')); However, only the left part of the image that fits in the window is visible, the rest of it seem to be sensed by the blowser judging by the scroll bar, but when you scroll to the right no image is visible there. The invisible part is the page's background color, not even the background of the layer (silver) is displayed. If I put the image naked on the page,like this: <img src="./insertion_embed.png"> The whole image is visible (scroll right all the way to the end). Is this a known problem? Or there is way to fix it? Thanks. Yanglong |
From: Raymond I. <xw...@ya...> - 2003-09-29 19:36:44
|
--- Yanglong Zhu <yz...@ou...> wrote: > > I have another question now. > How do you make a imgage visible when it is wider > than the window size > in Mozilla (1.5b, maybe the same in other versions). > I have a very big imgage in a DynLayer like this: > > var lyrmaster = dynapi.document.addChild(new > DynLayer('<img > src="./insertion_embed.png">',50,150,null,null,'silver')); > > However, only the left part of the image that fits > in the window is > visible, the rest of it seem to be sensed by the > blowser judging by the > scroll bar, but when you scroll to the right no > image is visible there. > The invisible part is the page's background color, > not even the > background of the layer (silver) is displayed. If I > put the image naked > on the page,like this: > > <img src="./insertion_embed.png"> > > The whole image is visible (scroll right all the way > to the end). > > Is this a known problem? Or there is way to fix it? You can try changing the overflow property of the layer from hidden to default by using: lyr.setOverflow('default'); or you can try using the setAutoSize(true,true) or manualy set the lyr's width and height. I suspect that you need to pre-load the image. you can do this using the dynapi.functions.getImage() -- Raymond Irving > 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: Doug M. <do...@cr...> - 2003-09-29 21:25:31
|
Note: Mozilla has a problem with getting width of content.. setAutosize may not function under certain circumstances. ----- Original Message ----- From: "Raymond Irving" <xw...@ya...> To: <dyn...@li...> Sent: Monday, September 29, 2003 3:36 PM Subject: Re: [Dynapi-Help] How to add eventListener to a DynLayer? > > --- Yanglong Zhu <yz...@ou...> wrote: > > > > I have another question now. > > How do you make a imgage visible when it is wider > > than the window size > > in Mozilla (1.5b, maybe the same in other versions). > > I have a very big imgage in a DynLayer like this: > > > > var lyrmaster = dynapi.document.addChild(new > > DynLayer('<img > > > src="./insertion_embed.png">',50,150,null,null,'silver')); > > > > However, only the left part of the image that fits > > in the window is > > visible, the rest of it seem to be sensed by the > > blowser judging by the > > scroll bar, but when you scroll to the right no > > image is visible there. > > The invisible part is the page's background color, > > not even the > > background of the layer (silver) is displayed. If I > > put the image naked > > on the page,like this: > > > > <img src="./insertion_embed.png"> > > > > The whole image is visible (scroll right all the way > > to the end). > > > > Is this a known problem? Or there is way to fix it? > > You can try changing the overflow property of the > layer from hidden to default by using: > > lyr.setOverflow('default'); > > or you can try using the setAutoSize(true,true) > or manualy set the lyr's width and height. > > I suspect that you need to pre-load the image. you can > do this using the dynapi.functions.getImage() > > -- > Raymond Irving > > > > 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 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |