From: <hv...@ya...> - 2000-11-04 15:09:34
|
Just a suggestion from a another novice, but how would it work with inline layers instead? I haven't tried it myself, but there might be a deifference. Otherwise I think this topic has been discussed here recently (and elsewhere before) and the general idea is that forms aren't covered when in a layer with a lower z-Index value. You can hide the layers though with the visability property, so one idea would be to invoke an event that hides the other layer when another is dragged over it (just mouseover/mouseout should be OK I think) - a nasty workaround of course, but it does what is expected: keeping the form elements from happen in a virtual/visual mess. Henrik Våglin http://hvaglin.freesqlhost.com --- rlb <bl...@wi...> skrev: > DynAPIers, > > Sorry to bother, but I have a question about a > tutorial that I've been > working through titled: > > Using the DynAPI2 > part 3 : Dragging > by Pascal Bestebroer > July 16, 2000 > > Actually, it's about some unexpected results that > I've come across. > > I was wondering if you might have any insights. > Could you try this link: > > > http://64.33.167.222/work/DynAPI/dynapi20001024-full/Docs/layertut/mytut_p3.html > > Both LAYERs have FORMs in them. The left layer is > draggable. The FORM > elements seem to get messed up pretty good whenever > I move the LAYER or > overlap with another layer containing FORM elements. > > These are probably Javascript 101 questions, as in I > should know the > answers, but darned if I can find any info on > placing FORM elements into > LAYERS, or for that matter, draggable LAYERs, or the > consequences. I > suppose that I should mention that I know only > slightly more about > Javascript than I do about the DynAPI, although > following this API stuff > is a heck of a lot easier than trying to build from > scratch. > > Question(s): > > Are these results a product of the Browser (it > happens in NS > and IE)? > > Is there a way of repainting things while > dragging, or > possibly displaying a graphic in the other > window(s) that are > not being dragged until the dragging event is > over? > > Is this something that I shouldn't even be > trying to do? Maybe > I should use HTML Frames and targeted windows > for example. > > Is there another Tutorial out there somewhere > that explains > what is happening > > I've been following this development process for > quite a while. I first > came across Dan's work last year. I now have a > project to apply these > types of capabilities to, if possible. > > Thanks for any help or pointers. > > > Bob Basques > > > I've included the source below, there's not much > there, thanks to > DynAPI. (by the way, I hope there's a better way of > loading HTML in a > later tutorial.) :) > > The source: (is this bad to send to the list???) > > <html> > > <head><title>DynAPI2 tutor - creating > layers</title> > > <Script language="Javascript" > src="../../core/js/dynapi.js"></script> > > <Script language="Javascript"> > > DynAPI.setLibraryPath('../../core/js/lib2.0/') > > DynAPI.include('core.api.*') > > DynAPI.onLoad=function() { > > addLay=new > DynLayer(null,75,75,350,230,'#c0c0c0') > > addLay.setHTML('<center><p><font > face="arial, > geneva, helvetica"> </font></p><form > method=POST > > action="http://gis.ci.stpaul.mn.us/cgi/xadd"><table > width="350" border="0"><tr> <td colspan="3"> > <div > align="center"><font face="arial, geneva, > helvetica" > size="+2"><b><font > size="4">Address</font></b></font> <font > face="arial, geneva, helvetica" > size="4"><b>Lookup</b> > </font><font face="arial, geneva, helvetica" > size="4"></font></div></td></tr><tr> <td > colspan="2"> <div > align="right"><b>Address:</b></div></td><td > width="197"> > <input type=text name="house_num22" maxlength=5 > size=5></td></tr> <tr> <td colspan="2"> <p > align="right"><b>Street</b> <b>Name:</b> > </p></td><td > width="197"><input type=text name="street122" > size=19></td></tr><tr> <td colspan="2"> <p > align="right"><b>Street </b><b>Type:</b> > </p></td> <td > width="197"> <select name="select4"><option > value="">-Type- > <option value="ALY">ALLEY <option > value="AVE">AVENUE</select></td></tr><tr> <td > colspan="2"> <p > align="right"><b>Street </b><b>Direction:</b> > </p></td><td > width="197"> <select name="select4"><option > value="">-Direction- <option value="N">NORTH > <option > value="NE">NORTHEAST </select></td></tr><tr> > <td colspan="2"> > <div align="right"> <b> </b> </div><div > align="right"><b>City:</b> </div></td><td > width="197"> <select > name="select"><option value="">-City- <option > value="ARDEN > HILLS"> ARDEN HILLS</select> </td></tr><tr><td > colspan="3" > align="center"> <input type=submit > name="action2" > value="Search for > Address"></td></tr></table></form></center>') > > > > DragEvent.setDragBoundary(addLay) > > DragEvent.enableDragEvents(addLay) > > interLay=new > DynLayer(null,500,75,375,150,'#00c000') > > interLay.setHTML('<center><font > face="arial, > geneva, helvetica"><form method=POST > > action="http://gis.ci.stpaul.mn.us/cgi/xintersection"> > <table > width="350"><tr><td align=center valign=top > colspan="2"><font > face="arial, geneva, helvetica"><font > face="Arial" > size="4"><b>Intersection Lookup</b></font> > </font></td> > </tr><tr> <td align=center valign=top> <b><font > size="2">1st > Street Name:</font></b></td><td align=center > valign=top> > <b><font size="2">Crossing Street > Name:</font></b> </td> > </tr><tr> <td align=center valign=top > <input > type=text > name="street1" size=19> <br> </td><td > align=center valign=top > > <input type=text name="street2" > size=19><br></td></tr><tr> > <td colspan=5 align=center valign=middle > cellpadding="15"> > <input type=submit name="action" value="Search > for > > Intersection"></td></tr></table></form></font></center>') > > DynAPI.document.addChild(addLay) > DynAPI.document.addChild(interLay) > > } > > > > </script> > > </head> > > <body> > <!-- > --> > </body> > > </html> > > -- > -+-+-+-+-+- > > > bobb > > http://64.33.167.222/ > > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help ===== // Henrik Vaglin ************************************************** Visit my comics artpage at http://photos.yahoo.com/bc/hvaglin?d&.flabel=fld5&.src=bc ************************************************** __________________________________________________ Do You Yahoo!? Thousands of Stores. Millions of Products. All in one Place. http://shopping.yahoo.com/ |
From: rlb <bl...@wi...> - 2000-11-05 05:48:13
|
while working through the: Using the DynAPI2 part 4 : Widgets I've had a heck of a time trying to get my widget to be loaded. I used what the tutorial said to use: <Script language="Javascript" src="dynapi.js"></script> I actually used a local path : <Script language="Javascript" src="../../core/js/dynapi.js"></script> <Script language="Javascript" src="button.js"></script> <Script language="Javascript"> I got a bunch of errors and Netscape kept locking up. I read some where that the new way of calling routines was to use syntax like: CORE.<somefoldername>.<somewidgetname>.js I eventually got this to work by building my own folder alongside the other Core scripts like so: <Script language="Javascript" src="../../core/js/dynapi.js"></script> <Script language="Javascript"> DynAPI.setLibraryPath('../../core/js/lib2.0/') DynAPI.include('core.api.*') DynAPI.include('core.rlb.button.js') I don't remember where I saw the above reference. The question(s): Is this the preferred method of storing and loading scripts? How can I store my scripts separately from the CORE scripts, as in completely different spot, other than the "core" directory. Can there be more than one "setLibraryPath", for example: DynAPI.setLibraryPath('../../core/js/lib2.0/') DynAPI.setLibraryPath('../../rlb/js/lib2.0/') Learned a lot working this out. Still having fun by the way. Thanks bobb Henrik Våglin wrote: > Just a suggestion from a another novice, but how would > it work with inline layers instead? I haven't tried it > myself, but there might be a deifference. > > Otherwise I think this topic has been discussed here > recently (and elsewhere before) and the general idea > is that forms aren't covered when in a layer with a > lower z-Index value. You can hide the layers though > with the visability property, so one idea would be to > invoke an event that hides the other layer when > another is dragged over it (just mouseover/mouseout > should be OK I think) - a nasty workaround of course, > but it does what is expected: keeping the form > elements from happen in a virtual/visual mess. > > Henrik Våglin > http://hvaglin.freesqlhost.com > > --- rlb <bl...@wi...> skrev: > DynAPIers, > > > > Sorry to bother, but I have a question about a > > tutorial that I've been > > working through titled: > > > > Using the DynAPI2 > > part 3 : Dragging > > by Pascal Bestebroer > > July 16, 2000 > > > > Actually, it's about some unexpected results that > > I've come across. > > > > I was wondering if you might have any insights. > > Could you try this link: > > > > > > > http://64.33.167.222/work/DynAPI/dynapi20001024-full/Docs/layertut/mytut_p3.html > > > > Both LAYERs have FORMs in them. The left layer is > > draggable. The FORM > > elements seem to get messed up pretty good whenever > > I move the LAYER or > > overlap with another layer containing FORM elements. > > > > These are probably Javascript 101 questions, as in I > > should know the > > answers, but darned if I can find any info on > > placing FORM elements into > > LAYERS, or for that matter, draggable LAYERs, or the > > consequences. I > > suppose that I should mention that I know only > > slightly more about > > Javascript than I do about the DynAPI, although > > following this API stuff > > is a heck of a lot easier than trying to build from > > scratch. > > > > Question(s): > > > > Are these results a product of the Browser (it > > happens in NS > > and IE)? > > > > Is there a way of repainting things while > > dragging, or > > possibly displaying a graphic in the other > > window(s) that are > > not being dragged until the dragging event is > > over? > > > > Is this something that I shouldn't even be > > trying to do? Maybe > > I should use HTML Frames and targeted windows > > for example. > > > > Is there another Tutorial out there somewhere > > that explains > > what is happening > > > > I've been following this development process for > > quite a while. I first > > came across Dan's work last year. I now have a > > project to apply these > > types of capabilities to, if possible. > > > > Thanks for any help or pointers. > > > > > > Bob Basques > > > > > > I've included the source below, there's not much > > there, thanks to > > DynAPI. (by the way, I hope there's a better way of > > loading HTML in a > > later tutorial.) :) > > > > The source: (is this bad to send to the list???) > > > > <html> > > > > <head><title>DynAPI2 tutor - creating > > layers</title> > > > > <Script language="Javascript" > > src="../../core/js/dynapi.js"></script> > > > > <Script language="Javascript"> > > > > DynAPI.setLibraryPath('../../core/js/lib2.0/') > > > > DynAPI.include('core.api.*') > > > > DynAPI.onLoad=function() { > > > > addLay=new > > DynLayer(null,75,75,350,230,'#c0c0c0') > > > > addLay.setHTML('<center><p><font > > face="arial, > > geneva, helvetica"> </font></p><form > > method=POST > > > > action="http://gis.ci.stpaul.mn.us/cgi/xadd"><table > > width="350" border="0"><tr> <td colspan="3"> > > <div > > align="center"><font face="arial, geneva, > > helvetica" > > size="+2"><b><font > > size="4">Address</font></b></font> <font > > face="arial, geneva, helvetica" > > size="4"><b>Lookup</b> > > </font><font face="arial, geneva, helvetica" > > size="4"></font></div></td></tr><tr> <td > > colspan="2"> <div > > align="right"><b>Address:</b></div></td><td > > width="197"> > > <input type=text name="house_num22" maxlength=5 > > size=5></td></tr> <tr> <td colspan="2"> <p > > align="right"><b>Street</b> <b>Name:</b> > > </p></td><td > > width="197"><input type=text name="street122" > > size=19></td></tr><tr> <td colspan="2"> <p > > align="right"><b>Street </b><b>Type:</b> > > </p></td> <td > > width="197"> <select name="select4"><option > > value="">-Type- > > <option value="ALY">ALLEY <option > > value="AVE">AVENUE</select></td></tr><tr> <td > > colspan="2"> <p > > align="right"><b>Street </b><b>Direction:</b> > > </p></td><td > > width="197"> <select name="select4"><option > > value="">-Direction- <option value="N">NORTH > > <option > > value="NE">NORTHEAST </select></td></tr><tr> > > <td colspan="2"> > > <div align="right"> <b> </b> </div><div > > align="right"><b>City:</b> </div></td><td > > width="197"> <select > > name="select"><option value="">-City- <option > > value="ARDEN > > HILLS"> ARDEN HILLS</select> </td></tr><tr><td > > colspan="3" > > align="center"> <input type=submit > > name="action2" > > value="Search for > > Address"></td></tr></table></form></center>') > > > > > > > > DragEvent.setDragBoundary(addLay) > > > > DragEvent.enableDragEvents(addLay) > > > > interLay=new > > DynLayer(null,500,75,375,150,'#00c000') > > > > interLay.setHTML('<center><font > > face="arial, > > geneva, helvetica"><form method=POST > > > > > action="http://gis.ci.stpaul.mn.us/cgi/xintersection"> > > <table > > width="350"><tr><td align=center valign=top > > colspan="2"><font > > face="arial, geneva, helvetica"><font > > face="Arial" > > size="4"><b>Intersection Lookup</b></font> > > </font></td> > > </tr><tr> <td align=center valign=top> <b><font > > size="2">1st > > Street Name:</font></b></td><td align=center > > valign=top> > > <b><font size="2">Crossing Street > > Name:</font></b> </td> > > </tr><tr> <td align=center valign=top > <input > > type=text > > name="street1" size=19> <br> </td><td > > align=center valign=top > > > <input type=text name="street2" > > size=19><br></td></tr><tr> > > <td colspan=5 align=center valign=middle > > cellpadding="15"> > > <input type=submit name="action" value="Search > > for > > > > > Intersection"></td></tr></table></form></font></center>') > > > > DynAPI.document.addChild(addLay) > > DynAPI.document.addChild(interLay) > > > > } > > > > > > > > </script> > > > > </head> > > > > <body> > > <!-- > > --> > > </body> > > > > </html> > > > > -- > > -+-+-+-+-+- > > > > > > bobb > > > > http://64.33.167.222/ > > > > > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > > http://lists.sourceforge.net/mailman/listinfo/dynapi-help > > ===== > // Henrik Vaglin > > ************************************************** > Visit my comics artpage at > http://photos.yahoo.com/bc/hvaglin?d&.flabel=fld5&.src=bc > ************************************************** > > __________________________________________________ > Do You Yahoo!? > Thousands of Stores. Millions of Products. All in one Place. > http://shopping.yahoo.com/ > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help -- -+-+-+-+-+- bobb http://64.33.167.222/ |
From: Robert R. <rra...@ya...> - 2000-11-05 08:08:24
|
> Is this the preferred method of storing and loading scripts? > How can I store my scripts separately from the CORE scripts, as in > completely different spot, other than the "core" directory. > Can there be more than one "setLibraryPath", for example: > > DynAPI.setLibraryPath('../../core/js/lib2.0/') > DynAPI.setLibraryPath('../../rlb/js/lib2.0/') There is a paramater on the include that allows you to pass an alternate path. So: DynAPI.include('mystuff.gui.button.js','../mywidgets/') The path that you pass is the root path. So inside there you would need mystuff/gui/mystuff.gui.button.js. There's been some talk that the filename shouldnt have the path in it as well. That could be changed in the future. There is also a function addLibrary(name,files). Where name is the name like gui and the files are the last part of the file names, like button.js as an array like addLibrary('mygui',['x.js',y.js']). You can use this to allow you to say DynAPI.include('core.gui.*'). \\Robert -- |
From: rlb <bl...@wi...> - 2000-11-05 23:12:48
|
Robert, Thanks for the explanation, I'm up to the DynDocument tutorial. Robert Rainwater wrote: > There is a paramater on the include that allows you to pass an > alternate path. So: > > DynAPI.include('mystuff.gui.button.js','../mywidgets/') I figure there was something along these lines to store things separately. Can this work between servers, as in two different ones? The whole Http path? Actually this might solve my problem with not wanting to screw up the CORE scripts with my own or anyone else's, by separating them across servers. Never mind me, I'm just thinking out loud. > The path that you pass is the root path. So inside there you would > need mystuff/gui/mystuff.gui.button.js. > > There's been some talk that the filename shouldnt have the path in it > as well. That could be changed in the future. This struck me as a bit odd when I first look at it, it did make things more intuitive though while I was trying to find stuff. Maybe after there is more documentation the longer names would have less importance. I wonder if this resource lookup configuration shouldn't be wholly server side, as in using something similar to the "cgi-bin" directory, only something like "js-resource" or some such. then less work would be required for changing lookups in the calls from eh HTML pages. Just a thought. > There is also a function addLibrary(name,files). Are these looked at, in a sequence, as in does the order count when listing them in the calling lines. > Where name is the > name like gui and the files are the last part of the file names, like > button.js as an array like addLibrary('mygui',['x.js',y.js']). Wouldn't also be wise to get rid of the ".js" part of the name, or is this required by the browsers for interpretation? > You can use this to allow you to say DynAPI.include('core.gui.*'). > > \\Robert > > -- > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help -- -+-+-+-+-+- bobb http://64.33.167.222/ |
From: rlb <bl...@wi...> - 2000-11-06 02:40:58
|
I can't seem to get to work from the tutorial: Using the DynAPI2 part 5 : DynLayer advanced by Pascal Bestebroer July 22, 2000 <html> <head> <title>Inline layers</title> <Script language="Javascript" src="../../core/js/dynapi.js"></script> <Script language="Javascript"> DynAPI.setLibraryPath('../../core/js/lib2.0/') DynAPI.include('core.api.*') DynAPI.onLoad=function() { DynAPI.documents.all["testlayer"].setBgColor('#c0c0c0') DynAPI.documents.all["testlayer"].setSize(60,60) DynAPI.documents.all["testlayer"].moveTo(100,100) } </script> </head><body> <div id="testlayer" STYLE="position: absolute">Testing inline layers</div> </body> </html> Should I be using "DynDocument" instead? I didn't see a function for "document" in any of the CORE scripts. Just plain old lost bobb -- -+-+-+-+-+- bobb http://64.33.167.222/ |
From: rlb <bl...@wi...> - 2000-11-06 02:56:28
|
Oops, I forgot to change the "documents" in the attached back to "document" as the tutorial had them originally, just trying some things to get it to work. I got through the second part of the tutorial (5) though. bobb rlb wrote: > I can't seem to get to work from the tutorial: > > Using the DynAPI2 > > part 5 : DynLayer advanced > > by Pascal Bestebroer > July 22, 2000 > > > <html> > <head> > <title>Inline layers</title> > > <Script language="Javascript" > src="../../core/js/dynapi.js"></script> > > <Script language="Javascript"> > DynAPI.setLibraryPath('../../core/js/lib2.0/') > DynAPI.include('core.api.*') > > DynAPI.onLoad=function() { > > DynAPI.documents.all["testlayer"].setBgColor('#c0c0c0') > > DynAPI.documents.all["testlayer"].setSize(60,60) > > DynAPI.documents.all["testlayer"].moveTo(100,100) > } > </script> > > </head><body> > <div id="testlayer" STYLE="position: absolute">Testing > inline layers</div> > </body> > </html> > > Should I be using "DynDocument" instead? I didn't see a function for > "document" in any of the CORE scripts. > > Just plain old lost bobb > > > > > > > > > > > -- > -+-+-+-+-+- > > > bobb > > http://64.33.167.222/ > -- -+-+-+-+-+- bobb http://64.33.167.222/ |
From: rlb <bl...@wi...> - 2000-11-06 03:29:36
|
Got through part six. Question though, can the inter frame communications be done with a javascript popup window also? I have something in mind, see this link: http://64.33.167.222/work/GIS_site_html/Master.html I was planning on spawning the above to control some other popups. This would help out with the Forms problem that I relayed earlier, at least until I learn more about creating my own objects with the DynAPI. Are there any examples for controlling popup's with the DynDocument? Thanks bobb rlb wrote: > Oops, I forgot to change the "documents" in the attached back to > "document" as the tutorial had them originally, just trying some > things to get it to work. > > I got through the second part of the tutorial (5) though. > > bobb > > rlb wrote: > >> I can't seem to get to work from the tutorial: >> >> Using the DynAPI2 >> >> part 5 : DynLayer advanced >> >> by Pascal Bestebroer >> July 22, 2000 >> >> >> <html> >> <head> >> <title>Inline layers</title> >> >> <Script language="Javascript" >> src="../../core/js/dynapi.js"></script> >> >> <Script language="Javascript"> >> DynAPI.setLibraryPath('../../core/js/lib2.0/') >> DynAPI.include('core.api.*') >> >> DynAPI.onLoad=function() { >> >> DynAPI.documents.all["testlayer"].setBgColor('#c0c0c0') >> >> DynAPI.documents.all["testlayer"].setSize(60,60) >> >> DynAPI.documents.all["testlayer"].moveTo(100,100) >> } >> </script> >> >> </head><body> >> <div id="testlayer" STYLE="position: >> absolute">Testing inline layers</div> >> </body> >> </html> >> >> Should I be using "DynDocument" instead? I didn't see a function for >> "document" in any of the CORE scripts. >> >> Just plain old lost bobb >> >> >> >> >> >> >> >> >> >> >> -- >> -+-+-+-+-+- >> >> >> bobb >> >> http://64.33.167.222/ >> > > -- > -+-+-+-+-+- > > > bobb > > http://64.33.167.222/ > -- -+-+-+-+-+- bobb http://64.33.167.222/ |
From: Robert R. <rra...@ya...> - 2000-11-06 06:37:43
|
> Can this work between servers, as in two different ones? The whole Http > path? Actually this might solve my problem with not wanting to screw up > the CORE scripts with my own or anyone else's, by separating them across > servers. Never mind me, I'm just thinking out loud. There are security problems with acessing scripts accross servers, so that is not really an option. The new release should fix your problems. The structure has changed to look like this: lib/ dynapi/ api/ dynlayer.js,etc. ext/ So now you can put your own packages in the lib directory. So now when you use addLibrary you must use the package name with the class type. Like: DynAPI.addLibrary('mystuff.gui',['file1.js','file2.js']) Where mystuff is in the lib directory. Also, the file names do not include the package or class type anymore. So it would look like: lib/ dynapi/ ... mystuff/ gui/ file1.js file2.js This should allow you to separate your stuff from the main dynapi files. \\Robert -- |