[Proto-Scripty] Re: Any reason this BlindRight effect should not work in FireFox?
Apologies - sorted... - it is related to CSS issues... firefox doesn't seem to like this: document.getElementById('slidebox').style.width = screen.availWidth-490; --~--~-~--~~~---~--~~ 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: Is this a bug? an element is enclosed unexpectedly by an inserted method.
Gotcha! Thank you, Nori 2009/1/14 ColinFine colin.f...@pace.com On Jan 13, 4:04 am, Hamamoto Noriaki norisu...@gmail.com wrote: Hey Kangax, Thank you for the reply. Do you think the reason of the problem I met is because of using div/ instead of div/div ? is Using /div prohibitted? Do you know why it happns? div/ is not valid in either HTML or XHTML. See http://www.w3.org/TR/2002/REC-xhtml1-20020801/#h-4.3 Only 'empty elements' - those that MAY NOT have any content, like br - can use the shorthand form. Colin --~--~-~--~~~---~--~~ 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: OK in IE - remove prototype and OK in Firefox!?
Chris, You may not enjoy hearing this! After hours and hours of changing and testing the code, I have simply changed the function name from getValue() to getData() and the code below works in both the latest IE and Firefox. Presumably getValue() is used by prototype? Cheers, Geoff !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head titleWM/title script src=assets/javascripts/prototype-1.6.0.3.js type=text/ javascript /script style .visibleDiv { display : block } .hiddenDiv { display : none } /style script type=text/javascript var results = []; var divCount = 0; function sendResults() { var params = ({ section1: results[0], section2: results[1], section3: results[2] }); new Ajax.Updater( 'updateDiv', 'wm-send.php', { asynchronous:true, method:'post', parameters: params } ); } function getData(form) { var radioName = form.elements[0].name; var typeValue = form[radioName]; if(typeValue) { for(var i=0, n=typeValue.length; ni; i++) { if(typeValue[i].checked) { results[divCount] = typeValue[i].value; //alert(results[divCount]); } } } if (divCount 2) { document.getElementById(div + (divCount+1)).className ='hiddenDiv'; document.getElementById(div + (divCount+2)).className ='visibleDiv'; divCount++; } else { document.getElementById(div + (divCount+1)).className ='hiddenDiv'; sendResults(); } } /script /head body div id=div1 class=visibleDiv form1 form name=myform1 action=# input type=radio name=picNum1 value=1 input type=radio name=picNum1 value=2 input type=radio name=picNum1 value=3 input type=button name=button value=Send onClick=getData(this.form); /form /div div id=div2 class=hiddenDiv form2 form name=myform2 action=# input type=radio name=picNum2 value=1 input type=radio name=picNum2 value=2 input type=radio name=picNum2 value=3 input type=button name=button value=Send onClick=getData(this.form); /form /div div id=div3 class=hiddenDiv form3 form name=myform3 action=# input type=radio name=picNum3 value=1 input type=radio name=picNum3 value=2 input type=radio name=picNum3 value=3 input type=button name=button value=Send onClick=getData(this.form); /form /div div id=updateDiv/div /body /html --~--~-~--~~~---~--~~ 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] wrap getStyle
hello prototypers, for some reason, i need to wrap getStyle method by a try/catch. obviously, best way would be the wrap method (doh!) but doesn't seem to work here. i can use another pair of eyes for help -- // wrap getStyle function with try/catch // as IE6 throws errors Element.Methods.getStyle = Element.Methods.getStyle.wrap( function(proceed, element, style) { try {return proceed(element, style) } catch(e) {return null} } ); -- thanks a milllion --~--~-~--~~~---~--~~ 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: How would you calculate the avg() value of a row?
Again, brilliant help on everything guys! I worked on this thing for quite a while last night and eventually got it to work in a round-about sort-of way. I used something like cell.getFirstChild().getSibling().value; a really ugly hack. I ended up making the changes as suggested by T.J. and it works beautifully. About the IDs of each field; since I'm running RoR and I want to update the database with the latest data everytime someone changes a score, all of the IDs will be set to something like a hash of student id and assignment id. That way when it gets sent to my controller I can split it back out again and use the info to update my model. Does this sound correct? Or is there a neat, better way to do this? Thanx! Richard --~--~-~--~~~---~--~~ 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] Dynamically add handles to a slider?
I can see from the documentation several ways to have multiple handles in a Slider. It looks good and works the way I would expect it to. But what if you wanted to add a new handle after the Slider had been created? Can you register additional handles after the fact, or do you need to run the constructor again? 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: Inheritance question
Cyrus, On Jan 14, 1:50 am, Cyrus arianglan...@googlemail.com wrote: I am seeing myself copying the whole Sortable because it cannot be inherited. I don't know if it's been mentioned, but you since Sortable is just an object you could try extending it with your own methods like this var MySortable = Object.extend({ hover : function hover() { ... }, ... }, Sortable); Don't know if it will work in practice, though. Nathan --~--~-~--~~~---~--~~ 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: asynchronous file upload
On 14 Jan 2009, at 16:58, jason maina wrote: Cutting to the chase, how do I do an asynchronous file upload, been googling all day with nothing really positive, may be been looking in all the wrong places. Javascript doesn't allow local file access. http://www.google.com/search?client=safarirls=en-usq=ajax+file+uploadie=UTF-8oe=UTF-8 Basically your choice comes down to: - Flash based uploader, e.g. SWFupload (swfupload.org) - iFrame trick, post file to a hidden iframe, handle it in the backend and evaluate the response back into the main document Best regards Peter De Berdt --~--~-~--~~~---~--~~ 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: Best way to apply an effect on page load?
After some tests, I can see that my code above isn't selecting the element properly - am I using select() wrong? Thanks Matt On Jan 13, 3:10 pm, Matt guitarroman...@gmail.com wrote: Hi TJ, thanks for the reply - that does sound about right for what I want, congrats! I tried this code: document.observe(dom:loaded, function() { var pageBox = $('editProducts').select('div.test'); Effect.SlideDown($(pageBox)); return false; }); the 'editProducts' part is the bit that needs to be dynamic, basically, but for now I'm trying to test it using hardcoded variables. The #editProducts div/tab definitely contains a div with a class 'test' but it doesn't run the effect when I display it. Is my syntax wrong? On Jan 13, 1:48 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Would the dom:loaded event[1] provide the trigger you're looking for? Or am I missing the point, as seems likely. :-) If the real issue is identifying the correct div or something, it depends on how the tabs are being done, but you should be able to figure out which tab is visible and then find the appropriate error box (perhaps by classname by using Element#select[2] on the tab's element). Apologies if I've completely misunderstood and told you things you already know. :-) [1]http://prototypejs.org/api/document/observe [2]http://prototypejs.org/api/element/select HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jan 13, 11:28 am, Matt guitarroman...@gmail.com wrote: Hi everyone. I'm producing an admin control panel script in PHP. It uses our favourite JS library to produce a tabbed interface. I have a div used for response text which displays to the user the result of their actions, eg, an error (price must be a number) or success (product was added!). I want that box to fade in (or some other highlighting effect) on page load. The problem is, I have 5 of the boxes positioned, one for each tab of the interface (depending on what the user's doing at the time). How can I run a custom pageload function so that when the page refreshes, it applies a fade in effect to a specific div? Ideally I'd have a function like: function loadBox(boxID) { Effect.SlideDown($(boxID)); return false; } and then call it like loadBox(addProductResponse) on the relevant tab area. Does this make sense? How can I do it?! --~--~-~--~~~---~--~~ 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] reserved words for prototype and/or scriptaculous?
Hello, I have just spent hours, and so has at least one kind member of this group, trying to figure out why some code of mine would work in IE but not in Firefox. Eventually I realised that it was my naming a function getValue(). In changing the name to getData() the code ran OK in both the browsers! Looking inside prototype-1.0.6.3.js I can see getvalue all over the place and presumably that is why the code failed to run in Firefox. There must be lists of reserved words for prototype and for scriptaculous? If yes, could someone please point me at them?! Incidentally the Firefox error console showed no errors and I couldn't get Firebug to show anything useful either. That may be my fault as I have not spent much time with this debugger. Any ideas on whether Firebug could have shown this conflict of names? Cheers, Geoff --~--~-~--~~~---~--~~ 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 Ajax calls not sending parameters in BEA 10.2 (but it does in 10.0)... why?
Hello, Currently our portal application is running in BEA 10 and is accessed over WSRP. I am using Prototype 1.6.0.2 for my Ajax calls via the standard function: function makeAjaxCall(pars) { pars += randid= + getRandomId(); var myAjax = new Ajax.Request(AJAX_SERVLET, { parameters: pars, onSuccess: processSuccess, onFailure: processFailure, onException: processException} ); } This calls my servlet. When deployed in BEA 10, there is no problem, meaning all of my parameters are sent to the servlet and I can print them to the console. We are now in the process of migrating to BEA 10.2 and I am finding that the parameters are not being sent to the servlet. In a non-WSRP mode it is fine, but the parameters are not being sent to the servlet when the servlet is called over WSRP. I have created a separate small client to test this. When it I run it as a WSRP Producer in BEA 10 there is no problem. When I run it as a WSRP Producer in EBA 10.2, the paremeters are not sent. I wasn't anticipating this but it is obvious that something is keeping Prototype from sending the parameters. I am hoping that someone has seen this before. Any clues would be greatly appreciated. Thanks - Peter Len --~--~-~--~~~---~--~~ 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: Memory Leaks in IE7, Prototype or Prototip2?
On Jan 14, 3:22 pm, mr_justin gro...@jperkins.otherinbox.com wrote: [...] It was recently brought to my attention that the Element cache in Prototype does not get cleared out on page unload, so I added code to do just that. Unfortunately, the leak persists. Can you show the relevant snippet of how you cleared the cache? [...] -- 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 -~--~~~~--~~--~--~---