[Proto-Scripty] Re: php in files

2009-06-23 Thread Robaj
Ok, let me put my idea to you and see if there is a way without reloading the whole page - I use prototype.js and project.js. project.js is just my entensions for each project, which I have narrowed down to two functions, - function myRequest( text ) { new Ajax.Reque

[Proto-Scripty] Re: Periodical Updater detect content change

2009-06-23 Thread Alex McAuley
There is also a Form.observer http://www.prototypejs.org/api/timedObserver/form-observer I used to use this but implemented my own version of it with a cache and some hashing, it didnt take long to write and works perfectly HTH Alex - Original Message - From: "Aamchi" To: "Prototype

[Proto-Scripty] Re: question re: Element.addMethods

2009-06-23 Thread barunio
Ah thanks, that makes sense. On Jun 21, 6:08 am, "T.J. Crowder" wrote: > Hiya, > > > ...wouldn't "element" always refer to a node in > > the DOM already?  Is there a case where the method could fail if that > > first line is not included? > > The functions in the Element class are available both

[Proto-Scripty] Re: Periodical Updater detect content change

2009-06-23 Thread Aamchi
Thanks, for your response. I'm not 100% sure if I understand correctly what you mean. If I get some data and generate a hash and write this to the JSON header and retrieve this when calling onSuccess, how will I still have the previous hash? From where will I get this? Won't the updated data caus

[Proto-Scripty] Re: Periodical Updater detect content change

2009-06-23 Thread Richard Quadling
2009/6/23 Aamchi > > Hi, > > I was wondering if Ajax.PeriodicalUpdater can detect if content has > changed since the last update and if so trigger an event. > > So for example I have a scoreboard which fetches data every 5 seconds > and displays this. I would be cool if there could be some kind o

[Proto-Scripty] Re: Long running requests disable other navigation links on the page

2009-06-23 Thread franklinhu
On Jun 23, 10:26 am, "T.J. Crowder" wrote: > Hi, > > Weird, the way things seem to run in themes in the group.  I just > posted this to another thread[1] here: > > * * * * > Most browsers, and most servers, place a limit on the number of > simultaneous connections between the same endpoints, an

[Proto-Scripty] Re: Is there a way to "view" event observers?

2009-06-23 Thread emitch
I kinda figured something like that was going on. Your logging idea in the createWrapper function worked great and I have all the info I need now. Thanks for the help T.J! On Jun 23, 5:47 am, "T.J. Crowder" wrote: > Hi, > > The actual handler is referenced from the wrapper via a closure, so >

[Proto-Scripty] Re: Two sets of expand and contract icons?

2009-06-23 Thread TEC
Thanks again. Looks like I got a few more days anyways before I really have to get things going on this site. This is the page I'll be using it on if it helps. You will see exactly how I'm using it: http://traceyedwardsdev.com/preview/valvoline/services.php Still using that other script, and

[Proto-Scripty] Re: Two sets of expand and contract icons?

2009-06-23 Thread Alex McAuley
Well, i forgot to code it in !!... Easiest way without adding script is to "style="display:none;" on the ones you want to be closed i.e but i will code it in later when i have some time and probably recode the whole thing to be honest HTH Alex - Original Message - From: "TEC" To:

[Proto-Scripty] Re: Long running requests disable other navigation links on the page

2009-06-23 Thread T.J. Crowder
Hi, Weird, the way things seem to run in themes in the group. I just posted this to another thread[1] here: * * * * Most browsers, and most servers, place a limit on the number of simultaneous connections between the same endpoints, and typically that limit is two simultaneous connections. I d

[Proto-Scripty] Long running requests disable other navigation links on the page

2009-06-23 Thread franklinhu
I have a page which uses prototype.js and it contains several ajax requests that retrieve lists to be displayed to the user. This page also has links which take the user to different parts of the application. I am finding that these links do not take an action until the long running requests are f

[Proto-Scripty] Re: Two sets of expand and contract icons?

2009-06-23 Thread TEC
Thank you. And essentially the quick and dirty way of getting two different sets of icons would be duplicate the code and rename functions / classes. Not the best way to do it mind you, but the quickest way. I'll play around though to see if I can get it with out duplicating everything. Does th

[Proto-Scripty] Re: Two sets of expand and contract icons?

2009-06-23 Thread Alex McAuley
Very quick and dirty but you can see that it can be done in not alot of code at all to be honest i think i can get rid of about another 5 lines at least http://www.bazookawally.co.uk/collapse.php HTH Alex - Original Message - From: "TEC" To: "Prototype & script.aculo.us" Sent:

[Proto-Scripty] Drag Drop inside .net AJAX - Dispose of items?

2009-06-23 Thread Wyerarch
Hi All, I'm loving this drag drop library in my application, however i've got serious memory leaks because I don't know how to destroy the items. I'm using the .net ScriptManager.RegisterClientScriptBlock method to register my script, so that all items from the database can be "Draggables". How

[Proto-Scripty] Periodical Updater detect content change

2009-06-23 Thread Aamchi
Hi, I was wondering if Ajax.PeriodicalUpdater can detect if content has changed since the last update and if so trigger an event. So for example I have a scoreboard which fetches data every 5 seconds and displays this. I would be cool if there could be some kind of notification if content had ch

[Proto-Scripty] Re: Can options in a selection box be made draggable...

2009-06-23 Thread Rick Waldron
I was nearly tempted to post a link to a w3c spec page but then Alex was kind enough to explain. If you need an example of what Alex is talking about: http://weblog.morosystems.cz/ostatni/dropdown-xhtml-css-javascript-replacement-of-classic-selectbox On Tue, Jun 23, 2009 at 9:56 AM, Alex McA

[Proto-Scripty] Re: Two sets of expand and contract icons?

2009-06-23 Thread TEC
Thanks again for the reply. Here is a working example of the script I used: http://www.ryanscherf.net/demos/dtd/ and the tutorial that goes along with it: http://www.ryanscherf.net/blog/dynamic-effects-via-the-dtd-part-2 It looks like it is an add on to scriptaculous. Took me a few minutes to

[Proto-Scripty] Re: Two sets of expand and contract icons?

2009-06-23 Thread Alex McAuley
i dont know what decorators.js is so i cant help you with that, though it woudlnt take long to script something to do this toggleing... It would be standards complient too as adding nodes to elements (collapsable="true" etc etc) is not complient and would fail W3c validation... I would tackle

[Proto-Scripty] Re: php in files

2009-06-23 Thread Richard Quadling
2009/6/23 Robaj : > > I know this isn't strictly speaking a Prototype issue, but this is the > only group I am in and a few topics do skirt around the edges of your > main topic. > > If I have a file - > home.php > echo "A very interesting home page"; > ?> > > Then the file is returned to go into

[Proto-Scripty] Re: Two sets of expand and contract icons?

2009-06-23 Thread TEC
Thanks for the reply. I thoguht I was already using scriptaculous, but I could be wrong. The div structure is as following: header and the page includes: The collapse='true' comes from a modificatio

[Proto-Scripty] Re: php in files

2009-06-23 Thread Alex McAuley
If you are opening the file with fread instead of using "include()" then it wont parse properly ... from an ajax response anything echoed back from a php script will just return html/text/json/xml/javascript/css etc etc back to the responseText Could you give an example fo your code and the ph

[Proto-Scripty] php in files

2009-06-23 Thread Robaj
I know this isn't strictly speaking a Prototype issue, but this is the only group I am in and a few topics do skirt around the edges of your main topic. If I have a file - home.php A very interesting home page"; ?> Then the file is returned to go into with a plain fread() into a variable which

[Proto-Scripty] Re: Two sets of expand and contract icons?

2009-06-23 Thread Alex McAuley
you can do this easily with proto/scriptaculous or vanilla javascript, i would recommend staying away from pre-made scripts for this easy task as it will inhibit what you can do and what you learn from writing applications Alex - Original Message - From: "TEC" To: "Prototype & sc

[Proto-Scripty] Re: Can options in a selection box be made draggable...

2009-06-23 Thread Alex McAuley
Because they are not elements or nodes they are inside an element/ node ... If you wanted them to become draggable you could hack some javascript together to take all the options from a select box, make them into elements which are draggable and sortable and a button or link to re-assemble th

[Proto-Scripty] Two sets of expand and contract icons?

2009-06-23 Thread TEC
I'm working on a website where there are two styles of divs that need to expand and collapse. I have made custom icons for expand and contract for each set of divs. But from looking at the script, it appears you can only use one set of icons. Is there away edit decorators.js so two sets of ico

[Proto-Scripty] Re: Can options in a selection box be made draggable...

2009-06-23 Thread Avram
This is a "just wondering". Is there a short answer that will explain why the options in a selection box can't be made draggable? On Jun 22, 5:16 pm, "Alex McAuley" wrote: > No ! > > > > - Original Message - > From: "Avram" > To: "Prototype & script.aculo.us" > Sent: Monday, June 22,

[Proto-Scripty] Re: Last Weekends Adventure

2009-06-23 Thread pedz
On Jun 23, 4:31 am, "T.J. Crowder" wrote: > I did an exercise a while back (here[1]) comparing DOM methods vs. > Prototype's wrappers for DOM methods vs. concatenating a string and > setting innerHTML.  The last method, innerHTML, wins on every browser > I tried, hands down, usually by at least o

[Proto-Scripty] Drag&drop with absolute position

2009-06-23 Thread Fagnain
Hi, I tried to create 2 sortables in a page with drag & drop from one to another. There is no problem when I make a test outside of my site. But when I include the code in the page I want it to be - into one of the 3 div I have with the CSS property position set to "absolute" - I can't do my drag

[Proto-Scripty] Re: Safari problem with Ajax.Request and simultaneous upload

2009-06-23 Thread T.J. Crowder
Hi Christian, Ah, hadn't seen your follow-up before posting my first reply. How are you doing the upload? Hidden iframe submission or something? -- T.J. On Jun 23, 10:02 am, Christian wrote: > Hi Everybody, > > I would like to add one more thing: > If I make the request 'asynchronous: false'

[Proto-Scripty] Re: Is there a way to "view" event observers?

2009-06-23 Thread T.J. Crowder
Hi, The actual handler is referenced from the wrapper via a closure, so the handler isn't a property on the wrapper that you could access after-the-fact. I think in your situation the most straight-forward approach would be to add some debug logging code to the createWrapper function (in Prototy

[Proto-Scripty] Re: Safari problem with Ajax.Request and simultaneous upload

2009-06-23 Thread T.J. Crowder
Hi Christian, Most browsers, and most servers, place a limit on the number of simultaneous connections between the same endpoints, and typically that limit is two simultaneous connections. I don't immediately have a reference for that, but if you search on "simultaneous HTTP connection limit" or

[Proto-Scripty] Re: Last Weekends Adventure

2009-06-23 Thread T.J. Crowder
Hi, I don't know the Spry framework at all, but if it's building the table rows by creating elements through the DOM API (document.createElement, HTMLElement#appendChild, etc.) or Prototype's wrappers for those [new Element(...)], that may be part of the problem. It may be somewhat counter-intui

[Proto-Scripty] Re: Safari problem with Ajax.Request and simultaneous upload

2009-06-23 Thread Christian
Hi Everybody, I would like to add one more thing: If I make the request 'asynchronous: false' the progress querying does work, however, then the file upload is stalled (with true, only the upload works). Thanks, Christian --~--~-~--~~~---~--~~ You received this m

[Proto-Scripty] Is there a way to "view" event observers?

2009-06-23 Thread emitch
I have a large unfamiliar site I have started working on that uses prototype and there are a number of tucked away bits of code that add event handlers to the document dom:loaded event (as well as other element events). Is there a way for me to see, alert, or log etc. all of the actual functions/

[Proto-Scripty] Safari problem with Ajax.Request and simultaneous upload

2009-06-23 Thread Christian
Hi Everybody, I have a problem with a simple Ajax.Request on Safari. Namely, I have a HTML form for uploading a file and want to query the progess (for a progress bar) from the server. For this, I call a Javascript function in the form's onSubmit handler, which periodically performs an Ajax Reque

[Proto-Scripty] Re: Last Weekends Adventure

2009-06-23 Thread emitch
This may be an overly simplistic first step suggestion, but I've been in a similar situation where I needed to "render" thousands of table rows in the browser via a JSON response from the server. I found that by calling a render row function/method (somewhat asynchronously on the client) via a se