[Proto-Scripty] Catching right click

2009-05-05 Thread Jeztah
I need to catch the right click of a mouse in an element... Unfortunately i am at a bit of a halt $('myDiv').observe('click', function(event) { if(!Event.isLeftClick(event)) { alert('Right Click'); // doesnt work in firefox Event.stop(event); // doesnt work in firefox

[Proto-Scripty] effect.multiple and queues

2009-05-05 Thread davidenke
hi there, i have some problems joining an additional effect.multiple animation in an existing queue like: new Effect.Appear(this.container, { queue: { scope: 'content', position: 'end' }, beforeStart: (function() { // ADDITIONAL MENU ANIMATION if (menu)

[Proto-Scripty] Re: Catching right click

2009-05-05 Thread T.J. Crowder
Hi, Right-click is a bit of a pain. :-) Mostly, browsers fire the 'contextmenu' event instead of 'click', but not all browsers do and not all browsers allow you to replace (e.g., prevent) the default action of bringing up the context menu. (Opera is a particular problem; I think recent versions

[Proto-Scripty] Re: Catching right click

2009-05-05 Thread Alex McAuley
thanks TJ, i noticed kangax coded a really nice right click menu.. now normally i would use somehting like this but i need the menu to be filled with an ajax request response .. perhaps i will hack his to peices and see what i can do !!! Alex - Original Message - From: "T.J. Crow

[Proto-Scripty] Re: Addding sub div under main div

2009-05-05 Thread ColinFine
On May 4, 12:58 pm, mahi wrote: > Hi all > > well i am a newbie in prototype.js and i had created a div element at > run time using prototype functions now my problem is that i had seen > various examples which are using body element to append any run time > Dom element whereas i wanna to do as

[Proto-Scripty] Re: autocompleter result list shifted to left !

2009-05-05 Thread Sabri LABBENE
Hi, I still can't fix autocomplete div position!! I tried to apply the same css rules as in the advanced autocompletor demo [1] but it changed nothing. The div to populate still shifted to left as much as I enter data in the input field. This is my original code: here is my autocomplete div code:

[Proto-Scripty] Invoke a .Net WebMethod

2009-05-05 Thread Chilfrik
I'm trying to call a .NET webmethod using prototype ajax (code below). but it does work. Is the code below the right approach? //Server side code [WebMethod] public string msgfromserver() { return "msgfromserver"; } //Client side code function SendRequest(MSG) { document.getElementByI

[Proto-Scripty] Re: Invoke a .Net WebMethod

2009-05-05 Thread Richard Quadling
2009/5/5 Chilfrik : > > I'm trying to call a .NET webmethod using prototype ajax (code below). > but it does work. Is the code below the right approach? > > //Server side code > [WebMethod] > public string msgfromserver() > { >  return "msgfromserver"; > } > > //Client side code > function SendReq

[Proto-Scripty] Re: Catching right click

2009-05-05 Thread Alex McAuley
After hacking to pieces Kangax's right click menu i discovered it is not the right thing for me however i cannot see why the following code does not work seeing as i pass event to the anonymous function/.. $('foo').observe('click', function(event) { // alert(event); // alerted as a mou

[Proto-Scripty] Re: Catching right click

2009-05-05 Thread Alex McAuley
So'k i had my head in places it shoulnt be ... (at least for firefox - still working on a x-browser solution) For those of you that wondered what the solution was ... $('foo').observe('contextmenu', function(event) { if(Event.isRightClick(event)) { event.stop(); alert('I Was rig

[Proto-Scripty] Re: Ajaxio next step?

2009-05-05 Thread Diodeus
I wrote Ajaxio as an exercise to learn how to use Prototype & Scriptaulous several years ago. I had it to the point where I could have the drawing as an XML file and reload it from XML data, but I lost the source code. I've had many enquiries from people who have taken it for their own purposes, b

[Proto-Scripty] Re: Ajaxio next step?

2009-05-05 Thread Gecko
Thanks James, I had done some research on your demo (I even tried the newest versions of the library scripts) and was hoping you still monitored this group. Ryan thank you for the suggestion. Wireit does seem promising (although it’s current version fails in IE7, they seem to be working on a fix

[Proto-Scripty] Help! How to get document.body height using Element.getDimensions

2009-05-05 Thread kimbaudi
Hi, I am unable to get the height of the tag using Element.getDimensions although I can get the width of the tag fine. How can I get the height of the tag? I have my simple code pasted at http://pastie.org/468828. Here is the snippet of code below as well: function alertBodyDim() { /* $

[Proto-Scripty] Re: Help! How to get document.body height using Element.getDimensions

2009-05-05 Thread Douglas
I hope this snippet helps :o) [code] var w = 0, h = 0; if (typeof(window.innerWidth) == 'number') { w = window.innerWidth; h = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.client

[Proto-Scripty] Re: Help! How to get document.body height using Element.getDimensions

2009-05-05 Thread Paul Kim
Thank you, Douglas. Works like a charm! - Paul K On Tue, May 5, 2009 at 9:19 AM, Douglas wrote: > > I hope this snippet helps :o) > > > [code] >var w = 0, >h = 0; > >if (typeof(window.innerWidth) == 'number') { >w = window.innerWidth; >h = window.innerHeight; >

[Proto-Scripty] Re: MySQL - order ID

2009-05-05 Thread WLQ
"the best I have been able to do is to drag an element into a sortable list, append it to the list, re-make the Sortable so it can use the new element, and then allow the user to place it precisely." Well that's what I've done already, but how to clone an item, and at the same time change it ID t

[Proto-Scripty] Re: MySQL - order ID

2009-05-05 Thread Walter Lee Davis
On May 5, 2009, at 12:54 PM, WLQ wrote: > Well that's what I've done already, but how to clone an item, and at > the same time change it ID to the necessary one. That's what's the > question. > > On May 4, 4:27 pm, Walter Lee Davis wrote: >> What I would do is get the new ID from the database o

[Proto-Scripty] Re: autocompleter result list shifted to left !

2009-05-05 Thread G. Sharon Yang
I tried your example in IE 8, it's fine. No left or right shift issue. I would try the whole css list from scriptaculous. I would also try fixed, relative in the position box and also try inline instead of box in the display just to test the behavior. .searchAsYouType { position:relative; wi

[Proto-Scripty] document.viewport.getDimensions() not working

2009-05-05 Thread Bertrand
Hi, I was working with it and it doesn't seem to work at all. It returns 36 all the time for some reason as the viewport height, which clearly isn't the case. Are there known issues with this method? The code is the following: http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/ protot

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Bertrand
I forgot an important piece of information. It seems to work perfectly fine with Safari 3.2.1 on MacOSX but not on Firefox 3.0.10 on the same OS (which isn't that bad after all, but I figured I'd let you know). On May 5, 10:36 am, Bertrand wrote: > Hi, > > I was working with it and it doesn't se

[Proto-Scripty] Re: MySQL - order ID

2009-05-05 Thread WLQ
Does it have anything to do with auto Idi-ing? I mean if you have sortable and you change the order of items, that will auto change the Id's to the necessary ones. And so if you drag and item and on the drop (without ghosting=true) drop between item 2 and 3, that will change the droppable items id

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Bertrand
An additional piece of information: I tried version 1.6.1rc2 and it doesn't seem to work on IE8 either. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send

[Proto-Scripty] Re: MySQL - order ID

2009-05-05 Thread Walter Lee Davis
No, if you drag things between lists on a page, you are moving the actual DOM object out of one list and into another, and the ID remains the same, just the parent object changes. Likewise, when you sort elements on the page, their order changes, but their ID remains the same. If you use th

[Proto-Scripty] Re: MySQL - order ID

2009-05-05 Thread WLQ
"If you use the onUpdate callback to the Sortable, you can update the database with the result of the sort operation" That exactly what I was talking about, I have that. And when you drag items in sortable it creates new ids and sends to a database. But how can it know on drop, what id to give. '

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Bertrand
After some research online, it seems that Andrew Dupont's version (found at http://andrewdupont.net/2006/09/09/viewport-dimensions-in-javascript/) seems to work better for me. Hope it helps. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Proto-Scripty] Re: MySQL - order ID

2009-05-05 Thread Walter Lee Davis
No, it doesn't make new IDs at all. It uses the ones that are there, and signals the current order of those elements through the serialize() function. Walter On May 5, 2009, at 2:11 PM, WLQ wrote: > And when you drag > items in sortable it creates new ids and sends to a database. --~--~--

[Proto-Scripty] Re: MySQL - order ID

2009-05-05 Thread Walter Lee Davis
You have to ask the database for the next ID by creating a new record and reading its response. That's what the Ajax Request bit was in my example. When you drop, it asks the database for a new widget, and returns the numerical ID of that new widget, then creates a cloned object in the Sor

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Alex McAuley
It works fine for me on all browsers every time ... - Original Message - From: "Bertrand" To: "Prototype & script.aculo.us" Sent: Tuesday, May 05, 2009 7:13 PM Subject: [Proto-Scripty] Re: document.viewport.getDimensions() not working > > After some research online, it seems that A

[Proto-Scripty] Re: Ajaxio next step?

2009-05-05 Thread Matt Foster
Another good one is www.mindmeister.com, I doubt they've got an API for you to work with but maybe you can get some ideas. Its built with Proto/scripty, but they use a canvas object instead of SVG so it could be a bonus for your IE requirement. -- http://positionabsolute.net On May 5, 11:21

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Bertrand
Thanks for your kind answer, it did help a lot. --~--~-~--~~~---~--~~ 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 uns

[Proto-Scripty] Re: help with ajax.

2009-05-05 Thread Russell Keith
I have dumbed down this code even more and still can't get the ajax request to fire. Any suggestions would be great. http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; /> Untitled Document

[Proto-Scripty] Re: help with ajax.

2009-05-05 Thread Walter Lee Davis
Are you, by any chance, trying to post an Ajax request to a domain other than the one your site is hosted on? That won't work, not now or ever, because of the Same Origin Policy imposed on JavaScript. Walter On May 5, 2009, at 5:26 PM, Russell Keith wrote: > > I have dumbed down this code

[Proto-Scripty] Re: help with ajax.

2009-05-05 Thread Russell Keith
I am sending the request from one internal server to another server. However one of the servers is a Linux box that wouldn't be part of the Microsoft domain. But the code I have from the vendor in this http://pastie.org/462963 works just fine and I would prefer to use prototype. J. Russell Kei

[Proto-Scripty] Re: help with ajax.

2009-05-05 Thread Walter Lee Davis
That's not the sort of domain I was referring to. 8-) http://en.wikipedia.org/wiki/Same_origin_policy Walter On May 5, 2009, at 5:40 PM, Russell Keith wrote: > > I am sending the request from one internal server to another server. > However one of the servers is a Linux box that wouldn't be pa

[Proto-Scripty] Re: help with ajax.

2009-05-05 Thread Russell Keith
Ok I get that you can't request across domains, but it doesn't explain why my code on pastie (http://pastie.org/462963) works but the prototype code doesn't. J. Russell Keith, MCDST Branch Suite Administrator American Airlines Federal Credit Union 817.931.4459 Direct 817.963.9541 Fax russell.ke

[Proto-Scripty] Re: help with ajax.

2009-05-05 Thread Walter Lee Davis
Drop the http:// part from the URL. Just use a relative URL. Walter On May 5, 2009, at 5:26 PM, Russell Keith wrote: >

[Proto-Scripty] Re: help with ajax.

2009-05-05 Thread Russell Keith
But terrain is the name of the server. I am sending xml data to a webservice on this server. J. Russell Keith, MCDST Branch Suite Administrator American Airlines Federal Credit Union 817.931.4459 Direct 817.931.9541 Fax russell.ke...@aacreditunion.org - Original Message - From: prototyp

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Alex McAuley
your welcome.. please dont top the messages on the group as it makes it harder to know what response you are replying to - Original Message - From: "Bertrand" To: "Prototype & script.aculo.us" Sent: Tuesday, May 05, 2009 8:32 PM Subject: [Proto-Scripty] Re: document.viewport.getDimens

[Proto-Scripty] Re: help with ajax.

2009-05-05 Thread Alex McAuley
you cannot use ajax to send or recieve data from a URL it has to be a script on the SAME domain as the script is on If you want to use a remote domain then you will have to wrap it in a proxy with a server side language or perhaps the web service offers a script on thier domain .. by setti