[Proto-Scripty] Auto re-size slider scrollbar range based on viewport's width
I'm using slider as a scrollbar for a horizontal layout. It works fine, but when I re-size the browser, the scrollbar's range will not resize based on the browser's viewport width. The scrollbar extends to the rigth and the default horizontal scrollbar shows up. Here's the page where you can check it http://keanetix.co.cc/scrollpage/page.htm The slider.js and prototype.js files can be found in the same directory: http://keanetix.co.cc/scrollpage/ How do I make the slider/scrollbar resize it's scrollable range automatically once the browser has been resized? Thanks, Keane --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Prototype and forms
I have a form that when a user selects something from a drop-down, another element in the form appears. There is another piece of the form, that is never showing up, I need to understand what I am doing wrong and how to fix it: script type=text/javascript language=JavaScript function getAdjForm() { var params = Form.serialize($('createAdjForm')); alert($('territory').value); if ($('adjType').value !== $('territory').value !== ){ new Ajax.Updater( adjForm, ?= $this-url(array('controller'='index', 'action'='get-adj- form'))?, {method:'post', parameters: params}); } } function getTerritories() { var params = Form.serialize($('createAdjForm')); new Ajax.Updater( territories, ?= $this-url(array('controller'='index', 'action'='get- territories'))?, {method:'post', parameters: params}); if ($('adjType').value !== ){ //alert('d'); getAdjForm(); } } function getCustomer() { var params = Form.serialize($('createAdjForm')); new Ajax.Updater( customer, ?= $this-url(array('controller'='index', 'action'='get- customer'))?, {method:'post', parameters: params}); } /script form method=POST id=createAdjForm action= p table border=0 CELLSPACING=10 tr td bSelect Adjustment Type/b /td td ?php echo $this-formSelect('adjType', $this-adjType, array (onChange=getAdjForm()), array(=Select an Adjustment Type) + $this-adjTypes) ? /td /tr tr td bSubmitting Territory/b /td td ?php echo $this-formSelect('shortTerritory', $this- shortTerritory, array(onChange=getTerritories()), array (=Select a Territory) + $this-shortTerritories) ? div id=territories/div /td /tr tr td valign=top bJustification/b /td td ?php echo $this-formTextarea('justification',$this- justification,array(rows=5,cols=75)) ? /td /tr /table hr div id=adjForm /div *** This issue is that the data that should be here: div id=adjForm /div Is never showing. When getAdjForm(); is called from getTerritories(), the $('territory').value !== seems to be the problem. Does the browser not know that was an element because it just appeared? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: AJAX request - select element
Hi, thx a lot for your help. @Colin doesn't work means it returns NULL ;) But of course, you are right. I already feared that the A string is not a document/DOM is the main problem. @T.J. Crowder thx! I'll try this soon, it looks promising :) I already created a regEx solution but it's too unflexible for my needs (handle div,li',span,...alt...title tags..maybe additional style info and so on makes the regEx quite hard ..) On 15 Jun., 13:41, T.J. Crowder t...@crowdersoftware.com wrote: Hi, As Colin points out, you're trying to treat a String object like a Document (by calling getElementById), which isn't going to work. You have a couple of options. 1. Use string parsing to isolate the markup in that string for the element you want. Once you have just that markup, you can use that with the #update call. This could be fairly challenging to do in the general case (or maybe you have massive Regex fu), but perhaps in your specific case it might be simpler. 2. Alternately, use a document fragment[1][2]. This is to a large extent what document fragments are for -- holding copies of things and mucking about with them off-to-the-side. I was surprised not to have an example lying around and wanted to refresh my memory, so here's a small example: http://pastie.org/512428 (Supply your own 'fragment2.html'; it can be any valid HTML doc, make sure it has an element with the ID 'two' in it -- or change the ID used in the example.) Basically, I request the page via Ajax.Request, then create a fragment to hold the result and (because I'm lazy) a div inside that fragment so that I can use Prototype's Element#update function. I put the retrieved document inside the div (almost certainly creating a completely invalid document temporarily!), then go find the element inside that with the ID I want, and update a target div with that element. Note this line: elm = findElementByID(div, 'two'); I coded up a quick recursive-descent lookup function for finding the element by ID because you can't use document.getElementById (or Prototype's $) to find it in the fragment -- the fragment isn't in the document (which is probably a good thing, otherwise you'd be massively worried about ID conflicts loading up an entire page like this). Interestingly, if you're using Prototype 1.6.1 RC2, you could (as of the time of this writing) use: elm = div.select('#two'); ...instead, because apparently Prototype's new Sizzle-based selector engine finds the element correctly, wheras in 1.6.0.3 the old selector engine doesn't. But I wouldn't. Firstly, the simple recursive- descent function is small and doesn't take long; secondly, I wouldn't bet on future changes not causing Element#select to stop working in this context -- barring finding documentation saying that it will, of course. I don't know Sizzle well enough to know if it intentionally handles this situation. [1]https://developer.mozilla.org/en/dom/documentfragment [2]http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-B63ED1A3 HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jun 13, 10:04 pm, fufolewe rentsch.dan...@gmail.com wrote: Hi, I have a simple problem which is driving me nuts: I would like to make an AJAX req which returns the whole page - select an element by its ID from the response text and update targetDiv with this element (myDivID). But it doenst work :/ function loadContent(url) { new Ajax.Request(url, { method: 'get', onSuccess: function(transport) { var response = transport.responseText; var element = response.getElementById( 'myDivID'); $('targetDiv').update(element); } }); } Some ideas? thx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: AJAX request - select element
You could always update the response into a hidden iframe and search that - i am pretty sure this works - Original Message - From: fufolewe rentsch.dan...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, June 16, 2009 10:49 AM Subject: [Proto-Scripty] Re: AJAX request - select element Hi, thx a lot for your help. @Colin doesn't work means it returns NULL ;) But of course, you are right. I already feared that the A string is not a document/DOM is the main problem. @T.J. Crowder thx! I'll try this soon, it looks promising :) I already created a regEx solution but it's too unflexible for my needs (handle div,li',span,...alt...title tags..maybe additional style info and so on makes the regEx quite hard ..) On 15 Jun., 13:41, T.J. Crowder t...@crowdersoftware.com wrote: Hi, As Colin points out, you're trying to treat a String object like a Document (by calling getElementById), which isn't going to work. You have a couple of options. 1. Use string parsing to isolate the markup in that string for the element you want. Once you have just that markup, you can use that with the #update call. This could be fairly challenging to do in the general case (or maybe you have massive Regex fu), but perhaps in your specific case it might be simpler. 2. Alternately, use a document fragment[1][2]. This is to a large extent what document fragments are for -- holding copies of things and mucking about with them off-to-the-side. I was surprised not to have an example lying around and wanted to refresh my memory, so here's a small example: http://pastie.org/512428 (Supply your own 'fragment2.html'; it can be any valid HTML doc, make sure it has an element with the ID 'two' in it -- or change the ID used in the example.) Basically, I request the page via Ajax.Request, then create a fragment to hold the result and (because I'm lazy) a div inside that fragment so that I can use Prototype's Element#update function. I put the retrieved document inside the div (almost certainly creating a completely invalid document temporarily!), then go find the element inside that with the ID I want, and update a target div with that element. Note this line: elm = findElementByID(div, 'two'); I coded up a quick recursive-descent lookup function for finding the element by ID because you can't use document.getElementById (or Prototype's $) to find it in the fragment -- the fragment isn't in the document (which is probably a good thing, otherwise you'd be massively worried about ID conflicts loading up an entire page like this). Interestingly, if you're using Prototype 1.6.1 RC2, you could (as of the time of this writing) use: elm = div.select('#two'); ...instead, because apparently Prototype's new Sizzle-based selector engine finds the element correctly, wheras in 1.6.0.3 the old selector engine doesn't. But I wouldn't. Firstly, the simple recursive- descent function is small and doesn't take long; secondly, I wouldn't bet on future changes not causing Element#select to stop working in this context -- barring finding documentation saying that it will, of course. I don't know Sizzle well enough to know if it intentionally handles this situation. [1]https://developer.mozilla.org/en/dom/documentfragment [2]http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-B63ED1A3 HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jun 13, 10:04 pm, fufolewe rentsch.dan...@gmail.com wrote: Hi, I have a simple problem which is driving me nuts: I would like to make an AJAX req which returns the whole page - select an element by its ID from the response text and update targetDiv with this element (myDivID). But it doenst work :/ function loadContent(url) { new Ajax.Request(url, { method: 'get', onSuccess: function(transport) { var response = transport.responseText; var element = response.getElementById( 'myDivID'); $('targetDiv').update(element); } }); } Some ideas? thx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Doctypes
I'm curious about the recent discussion that's arisen as a sideline from the 'Creating new lines and bypassing them through escapeHTML' thread. I've been using Prototype for a little while now (though not Scriptaculous - yet!). I'm not by any stretch of the imagination an expert and I'm sure I'm still not using it as fully as I could (I keep coming across things in the docs that make me go 'Doh! I could have been doing that all this time'). However, I've also been working exclusively in XHTML 1.0 Strict for some time and I haven't been aware of anything not behaving as advertised. Also, unless I've missed something obvious, I don't /think/ I've seen any reference to doctypes in the API docs or Tips Tutorials at prototypejs.org. So should I be changing my ways here? I seriously don't want to have to convert several large and complex PHP-driven sites to a different doctype if I can help it! -- Cheers... Chris Highway 57 Web Development -- http://highway57.co.uk/ Nobody looks good bent over. Especially to pick up a cheque. -- Frank Zappa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: AJAX request - select element
On Jun 15, 1:41 pm, T.J. Crowder t...@crowdersoftware.com wrote: 2. Alternately, use a document fragment[1][2]. This is to a large extent what document fragments are for -- holding copies of things and mucking about with them off-to-the-side. I was surprised not to have an example lying around and wanted to refresh my memory, so here's a small example: Wow! Thanks, TJ. I'd no idea DocumentFragment existed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Doctypes
Chris Sansom wrote: I'm curious about the recent discussion that's arisen as a sideline from the 'Creating new lines and bypassing them through escapeHTML' thread. I've been using Prototype for a little while now (though not Scriptaculous - yet!). I'm not by any stretch of the imagination an expert and I'm sure I'm still not using it as fully as I could (I keep coming across things in the docs that make me go 'Doh! I could have been doing that all this time'). However, I've also been working exclusively in XHTML 1.0 Strict for some time and I haven't been aware of anything not behaving as advertised. Also, unless I've missed something obvious, I don't /think/ I've seen any reference to doctypes in the API docs or Tips Tutorials at prototypejs.org. So should I be changing my ways here? I seriously don't want to have to convert several large and complex PHP-driven sites to a different doctype if I can help it! All this issues regarding DOCTYPE's are not really about prototype requiring a certain, one and only one doctype. Prototype can work with both HTML 4.0 and XHTML 1.0, but it REQUIRES that the browser is rendering page in Standards Compilant Mode and not in Quirks Mmode [1]. The thing is, that you, as a webmaster, have to tell the browser to use the Strict Mode, and not old, buggy, and browser-incompatibile Quirks Mode. You can do this only by setting one of the DOCTYPE's which are called Doctype Switch'es. In the Quirks Mode the different browsers render the page differently, in almost unpredictable way. This is why Prototype, and I thing than any other js framework require Standards Compilant Mode. If you are developing a valid XHTML webpages with proper doctypes then don't worry, you're on the right path. You can read more on this at Wikipedia, or just use Google. [1] http://en.wikipedia.org/wiki/Quirksmode Best Regards, SWilk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Event.stop with two observers on same object
Hi, as it isn't documented, I was wondering if this is the intended behavior: when registering two separate event observers on one object, Event.stop doesn't prevent the second one from firing. Test case: http://pastie.org/513548 Steffen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Event.stop with two observers on same object
Hi, Interesting question. It's the expected behavior. The documentation [1] says that Event#stop will: * Prevent further bubbling of the event * Prevent the default behavior of the event (where the browser allows it) Not triggering other observers doesn't fall under either of those categories. It would also create a non-deterministic situation (since neither browsers nor Prototype guarantee the order in which event handlers are called). It would also be cross-talk (since your handler doesn't necessarily have anything to do with other handlers on the element), which is usually a bad idea, although I think a successful argument could be made that preventing bubbling also creates a cross- talk situation. :-) [1] http://prototypejs.org/api/event/stop HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jun 16, 10:18 am, steffenb sbart...@tzi.de wrote: Hi, as it isn't documented, I was wondering if this is the intended behavior: when registering two separate event observers on one object, Event.stop doesn't prevent the second one from firing. Test case: http://pastie.org/513548 Steffen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Problems with pollDoScroll and IE family (1.6.1 rc)
Hi David Thanks for the link, but this does not help me. I know what pollDoScroll() does. My problem is that when I use prototype in my webapp, I get Out of stack space error messages in IE because the pollDoScroll() method is executed over 600 times in a recursion and the expression document.documentElement.doScroll('left'); will always fail. I traced it down to the fact that together with ExtJS pollDoScroll.defer(); does not seem to wait long enough. I don't know if this is an ExtJS-Prototype combination problem or if this is because my app does some other things while loading. When I replace pollDoScroll.defer(); with pollDoScroll.delay(0); everything works. How is the process to get in tough with the Prototype devels? Is this something we can change in the release or is there a reason why it uses pollDoScroll.defer(); instead of pollDoScroll.delay(0);? Thanks for any hints Florian On Jun 6, 10:06 pm, david david.brill...@gmail.com wrote: Hi Florian, i found this comment on the dean edwards blog. go and see it:http://dean.edwards.name/weblog/2006/06/again/#comment121098 I think it explain your problem. -- david On 3 juin, 19:08, Florian Gnägi florian.gna...@gmail.com wrote: Hi I get errors with prototype 1.6.1rc in IE browsers. In IE debugger I get the Out of stack space message. I could track it down to the lines 635 and 636 in event.js. When I remove the lines, everything runs smoothly. http://github.com/sstephenson/prototype/blob/483c7886de5c0c6e721dee06... Could this be a sideeffect of using prototype with ExtJS? Thanks for any hints Florian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Effect.Morph syntax question
There's the simple method (these names are from the documentation in the Wiki): $('foo').morph('top:12px;') and the complex method: new Effect.Morph(foo,{style:'top:12px;',duration:0.5}); They work fine. Yet, from reading the code, I can't tell why I can't seem to use any parameters besides the style with the simple syntax. For example, this dies horribly: $('foo').morph({style:'top:12px;',duration:0.5}); Doesn't the methodize wrapper just shift the arguments over and send the callee to the function constructor? Thanks in advance, Walter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Prototype and forms
A few things... var params = Form.serialize($('createAdjForm')); You can clean this up as: var params = $('createAdjForm').serialize(); There are other points that you could optimize, but thats not your question... And at whatever point you want adjForm to appear, you need to add: $('adjForm').show() Rick On Mon, Jun 15, 2009 at 5:46 PM, anthony mrsmi...@gmail.com wrote: I have a form that when a user selects something from a drop-down, another element in the form appears. There is another piece of the form, that is never showing up, I need to understand what I am doing wrong and how to fix it: script type=text/javascript language=JavaScript function getAdjForm() { var params = Form.serialize($('createAdjForm')); alert($('territory').value); if ($('adjType').value !== $('territory').value !== ){ new Ajax.Updater( adjForm, ?= $this-url(array('controller'='index', 'action'='get-adj- form'))?, {method:'post', parameters: params}); } } function getTerritories() { var params = Form.serialize($('createAdjForm')); new Ajax.Updater( territories, ?= $this-url(array('controller'='index', 'action'='get- territories'))?, {method:'post', parameters: params}); if ($('adjType').value !== ){ //alert('d'); getAdjForm(); } } function getCustomer() { var params = Form.serialize($('createAdjForm')); new Ajax.Updater( customer, ?= $this-url(array('controller'='index', 'action'='get- customer'))?, {method:'post', parameters: params}); } /script form method=POST id=createAdjForm action= p table border=0 CELLSPACING=10 tr td bSelect Adjustment Type/b /td td ?php echo $this-formSelect('adjType', $this-adjType, array (onChange=getAdjForm()), array(=Select an Adjustment Type) + $this-adjTypes) ? /td /tr tr td bSubmitting Territory/b /td td ?php echo $this-formSelect('shortTerritory', $this- shortTerritory, array(onChange=getTerritories()), array (=Select a Territory) + $this-shortTerritories) ? div id=territories/div /td /tr tr td valign=top bJustification/b /td td ?php echo $this-formTextarea('justification',$this- justification,array(rows=5,cols=75)) ? /td /tr /table hr div id=adjForm /div *** This issue is that the data that should be here: div id=adjForm /div Is never showing. When getAdjForm(); is called from getTerritories(), the $('territory').value !== seems to be the problem. Does the browser not know that was an element because it just appeared? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Draggables/Droppables grid problem
OK problem solved - I realised I needed large droppables - so I made each column in the grid a droppable area, and worked out the target from the mouse event coordinates. Works now! On Jun 15, 10:44 am, adamski adam.elemen...@gmail.com wrote: I'm working on a 3 column grid of draggable objects. Draggables are Droppable on any other Draggable, where they are placed just above after a successful ajax call. I have all logic and ajax stuff in place. Its kinda working, but - the interface is quite jumpy, and seems to have a problem moving elements from left to right. Right to left is more or less ok. The area where it detects the droppable seems quite fragile. About 1 time in 8 I am able to actually get it to drop in the right place! If anyone has any pointers it would be very much appreciated!! Are there any in-depth tutorials/examples on interface building with scriptaculous drag and drop? Could it be to do with the order in which the javascript is executed? Currently I am using Rails helpers, which produces script tags under each html element. Thanks in advance, Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] element is null error on Draggable - element exists!
I'm having some trouble getting a Draggable to dorp onto a Droppable. I get the old element is null error from prototype (its trying to show an non-existent element). However, the element being dragged most definitely exists, as does the droppable. JS generated form Rails helpers. Any help much appreciated. Funny thing is I have just got another page on our app working really well with draggables and droppables. I did notice an element is null error on that page but it seems not to affect its functionality. Code excerpt is below, hope its not too long to skim through. div id=release-search-results-panel div id=card-search-results div style=position: relative; id=card_Issue_297 class=entity- search-card level1 span style=display: none; id=Issue_297_arrow img id=Issue_297_expanded onclick=javascript: return toggleWallSearchTree(297, 'Issue',false); return false; src=/images/ icons/arrow_down.gif style=display: none; cursor: pointer; img id=Issue_297_collapsed onclick=javascript: return toggleWallSearchTree( 297,'Issue',false);return false; src=/images/ icons/arrow_up.gif style=display: inline; cursor: pointer; img id=loading_Issue_297 src=/images/indicator.gif style=display: none; /span span id=Issue297_loading style=display: none; class=clearfix img src=/images/small-loading.gif /span I1 : test KPI /div script type=text/javascript //![CDATA[ new Draggable(card_Issue_297, {revert:true}) //]] /script !-- IMPORTANT: span MUST be empty for JS/Ajax to work -- span id=Issue_297_children class=child-container/span div style=position: relative; id=card_Issue_298 class=entity- search-card level1 span style=display: none; id=Issue_298_arrow img id=Issue_298_expanded onclick=javascript: return toggleWallSearchTree(298, 'Issue',false); return false; src=/images/ icons/arrow_down.gif style=display: none; cursor: pointer; img id=Issue_298_collapsed onclick=javascript: return toggleWallSearchTree( 298,'Issue',false);return false; src=/images/ icons/arrow_up.gif style=display: inline; cursor: pointer; img id=loading_Issue_298 src=/images/indicator.gif style=display: none; /span span id=Issue298_loading style=display: none; class=clearfix img src=/images/small-loading.gif /span I2 : there is an issue here /div script type=text/javascript //![CDATA[ new Draggable(card_Issue_298, {revert:true}) //]] /script div style=position: relative; id=release-iterations-panel preleases/iterations../p /div script type=text/javascript //![CDATA[ Droppables.add(release-iterations-panel, {after_effect:Element.hide, before_effect:Element.show, onDrop:function(element){Element.show ('indicator'); new Ajax.Request('/releases/add_item', {asynchronous:true, evalScripts:true, onComplete:function(request) {Element.hide('indicator')}, parameters:'id=' + encodeURIComponent (element.id) + 'authenticity_token=' + encodeURIComponent ('acaa102f216e113331509e9d9e7ef3c6418267e7')})}}) //]] /script --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: element is null error on Draggable - element exists!
Could you set this up on http://jsbin.com/? On Tue, Jun 16, 2009 at 2:06 PM, adamski adam.elemen...@gmail.com wrote: I'm having some trouble getting a Draggable to dorp onto a Droppable. I get the old element is null error from prototype (its trying to show an non-existent element). However, the element being dragged most definitely exists, as does the droppable. JS generated form Rails helpers. Any help much appreciated. Funny thing is I have just got another page on our app working really well with draggables and droppables. I did notice an element is null error on that page but it seems not to affect its functionality. Code excerpt is below, hope its not too long to skim through. div id=release-search-results-panel div id=card-search-results div style=position: relative; id=card_Issue_297 class=entity- search-card level1 span style=display: none; id=Issue_297_arrow img id=Issue_297_expanded onclick=javascript: return toggleWallSearchTree(297, 'Issue',false); return false; src=/images/ icons/arrow_down.gif style=display: none; cursor: pointer; img id=Issue_297_collapsed onclick=javascript: return toggleWallSearchTree( 297,'Issue',false);return false; src=/images/ icons/arrow_up.gif style=display: inline; cursor: pointer; img id=loading_Issue_297 src=/images/indicator.gif style=display: none; /span span id=Issue297_loading style=display: none; class=clearfix img src=/images/small-loading.gif /span I1 : test KPI /div script type=text/javascript //![CDATA[ new Draggable(card_Issue_297, {revert:true}) //]] /script !-- IMPORTANT: span MUST be empty for JS/Ajax to work -- span id=Issue_297_children class=child-container/span div style=position: relative; id=card_Issue_298 class=entity- search-card level1 span style=display: none; id=Issue_298_arrow img id=Issue_298_expanded onclick=javascript: return toggleWallSearchTree(298, 'Issue',false); return false; src=/images/ icons/arrow_down.gif style=display: none; cursor: pointer; img id=Issue_298_collapsed onclick=javascript: return toggleWallSearchTree( 298,'Issue',false);return false; src=/images/ icons/arrow_up.gif style=display: inline; cursor: pointer; img id=loading_Issue_298 src=/images/indicator.gif style=display: none; /span span id=Issue298_loading style=display: none; class=clearfix img src=/images/small-loading.gif /span I2 : there is an issue here /div script type=text/javascript //![CDATA[ new Draggable(card_Issue_298, {revert:true}) //]] /script div style=position: relative; id=release-iterations-panel preleases/iterations../p /div script type=text/javascript //![CDATA[ Droppables.add(release-iterations-panel, {after_effect:Element.hide, before_effect:Element.show, onDrop:function(element){Element.show ('indicator'); new Ajax.Request('/releases/add_item', {asynchronous:true, evalScripts:true, onComplete:function(request) {Element.hide('indicator')}, parameters:'id=' + encodeURIComponent (element.id) + 'authenticity_token=' + encodeURIComponent ('acaa102f216e113331509e9d9e7ef3c6418267e7')})}}) //]] /script --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: z-index sortable list
Thanks so much for your help! I'll give it a go and see what happens. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: z-index sortable list
Thanks so much for your help! I'll give it a go and see what happens. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Creating new lines and bypassing them through escapeHTML
On Jun 16, 4:57 am, T.J. Crowder t...@crowdersoftware.com wrote: Heya, If XHTML isn't necessary for Prototype, I'd suggest we change the doctype of the examples and unit tests. Good idea. Exclusively using XHTML doctype either shows our ignorance on the subject or the fact that we prefer to serve browsers with broken tag soup with no apparent benefits. What doctype do you use? You've been using and contributing to Prototype for a long time, I'll totally jump ship to whatever you're using. I'm using HTML 4.01 strict, but I really don't want you to jump this ship just because I'm on it :) I'd rather you realize why this is the only viable option at the moment (seriously, look at that article link to which I pasted earlier). [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Doctypes
On Jun 16, 5:52 am, Chris Sansom ch...@highway57.co.uk wrote: I'm curious about the recent discussion that's arisen as a sideline from the 'Creating new lines and bypassing them through escapeHTML' thread. I've been using Prototype for a little while now (though not Scriptaculous - yet!). I'm not by any stretch of the imagination an expert and I'm sure I'm still not using it as fully as I could (I keep coming across things in the docs that make me go 'Doh! I could have been doing that all this time'). However, I've also been working exclusively in XHTML 1.0 Strict for some time and I haven't been aware of anything not behaving as advertised. Also, unless I've missed something obvious, I don't /think/ I've seen any reference to doctypes in the API docs or Tips Tutorials at prototypejs.org. So should I be changing my ways here? I seriously don't want to have to convert several large and complex PHP-driven sites to a different doctype if I can help it! You certainly shouldn't rush and change all the doctypes, but you should probably change them to HTML 4.01 strict some time in the future. Remember that by serving documents with XHTML doctype and text/ html content-type makes browsers parse those documents as HTML, not XHTML. Browsers simply correct invalid HTML that you're sending. Most of the time, there's absolutely no need to confuse browsers by serving such documents with XHTML doctype; there's not benefit in changing doctype from HTML to XHTML. As always, you can find tons of info on this subject online. HTH. [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---