[Proto-Scripty] Observing a checkbox

2009-08-13 Thread Jeztah
What is the correct Cross browser way to observe a checkbox being checked or not I am using $('hidenonlive').observe('change',function() { if($('hidenonlive').checked!==true) { alert('Showing');

[Proto-Scripty] Responders

2009-08-12 Thread Jeztah
Morning Guys / Gals... I am sure this has been covered before but i'll post it anyway as i cant find it in a search!... I am speeding up a website at the moment by using Ajax to do some dirty work in heavy loading pages (pagination and so on)... I need to put a "loading" spinner or text in plac

[Proto-Scripty] IE 8 Bug

2009-08-04 Thread Jeztah
Afternoon Guys/Gals. I have a weird error in IE8. removeSuggestResults = function() { $$('.editsuggestResults').each(function(el) { $(el).remove(); }); } Doesnt seem to work in Internet explorer 8. The Element exists and was added dynamically to the DOM and has

[Proto-Scripty] Event.stop(event);

2009-07-29 Thread Jeztah
Morning guys/gals. I have some weird behaviour regarding Event.stop(); $$('.quickdetails').invoke('observe','click',function(event) { var this_href=$(this).readAttribute('href'); var element=this; var arr=this_href.split("/"); if(

[Proto-Scripty] ternary operators

2009-07-28 Thread Jeztah
Afternoon guys Is it possible in javascript to give out 2 answers to a tenary opertor (doesnt make sense i know - see below) function foo(arg) { return ($(arg)) ? true : alert('Element Does not exist');false; } ... (wrapped in window loaded function) foo('baz'); //

[Proto-Scripty] Checking if prototype is loaded

2009-07-20 Thread Jeztah
Morning guys. Does anyone know a way to check if prototype is loaded or not I have tried "if(Prototype) { ..." but just throws an undefined error. I know i know i should know if it is loaded or not but my servers use very heavy aggressive caching due to massive user loads and i noticed in

[Proto-Scripty] Client side searching

2009-07-06 Thread Jeztah
Good morning I have a site that can be heavy server load and decided to try and take out some filtering on a page.. Example. I have a page with a table of search results and would like to be able to put client side searching (ala Crtl+f on firefox) What i would like to do is make the ro

[Proto-Scripty] Working out where a user is on the page

2009-06-11 Thread Jeztah
At the time of a function call is it possible to work out where the user is on the page (scroll wise) without something being clicked or moved. I have an error function i built and it scrolls down to the center of the whle page (including anything past the scrollbar) - example of the viewport

[Proto-Scripty] Bizzarre goings on

2009-06-09 Thread Jeztah
AFternoon guys/gals http://pastie.org/505747 Some weird behaviour in internet explorer . The code in the link above works in all browsers except Internet explorer . It was working untill earlier today and i am now not sure why... i have reverted any changes back to what they were when i

[Proto-Scripty] Last table row

2009-06-05 Thread Jeztah
Morning... Very silly and easy question but my brain isn't working today How can i get the last row of a table (table id="foo") ... The row is inserted dynamically via an ajax request so its not on the page at load time!. $('foo').select('tr:last'); Doesnt work as its returning more than

[Proto-Scripty] Queing effects

2009-05-13 Thread Jeztah
Evening guys, Does anyone know if i can queue effects in scriptaculous... Basically what i want to do is... On document loaded a div moves from one position to another (Effect.Move) then when its finished fire another Effect (Effect.Grow) after it... in the past i would do this with setTimeout an

[Proto-Scripty] Keypress event

2009-05-07 Thread Jeztah
Afternoon guys, Having some trouble with some code... Event.observe('contents','keypress',function(event) { alert('Key got pressed ' + event); // alert(event); }); .. doesnt work (yes the element exists) Yet ,. Event.observe('contents','click',function(event) { alert('Key got presse

[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] Last -1 In array

2009-04-29 Thread Jeztah
Hi I would like to get the last -1 of $$('.containers'); and if not exists to just return with no error .. whats the best way to go about this ? Thanks in advance Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

[Proto-Scripty] Web Desktop Showcase

2009-04-27 Thread Jeztah
After a bit of time playing and alot of people asking about "Web Desktops" i decided to pull my old code out of retirement and fix some bugs !! http://showcase.bazookawally.co.uk/ Above is a link to the Desktop Demo ... Please any browser but INTERNET EXPLORER !!! .. there is a couple of bugs i

[Proto-Scripty] Shrinking JS

2009-03-20 Thread Jeztah
After a little playing ove the last couple of days i came up with a nice easy way of shrinking many js files on the fly into 1 file ... this will speed up load time heavily on heavy javascript loaded sites . the code is php and is very simple .. it also uses http://www.crockford.com/javascript

[Proto-Scripty] Stopping events ..

2009-03-18 Thread Jeztah
Afternoon guys, i am scratching my head at the moment and cannot work out how the following code is not working Event.observe(window,'load',function() { $('js').value=1; // loop through required $('myform').observe('submit',function(event) { $$('.req').each(function(e) {

[Proto-Scripty] Internet Explorer 7 & 8

2009-03-05 Thread Jeztah
Hi guys, kind of proto/scriptac related .. I have some strange behaviour in my internet explorer ... Everytime i try to select from a select box, the select box wont open, instead it gives me a "Popup was blocked" Error .. THe select box is not dynamic, it has no events bound to it or anything.

[Proto-Scripty] Re: Centering

2009-02-13 Thread Jeztah
So'k i sorted it !! On Feb 13, 12:09 pm, Jeztah wrote: > Mornign guys .. > > I am very well being really thick here but i was wondering how to > center a window vertically to the viewport (i.e if the user is > scrolled down the page a bit to still be in the center) .

[Proto-Scripty] Centering

2009-02-13 Thread Jeztah
Mornign guys .. I am very well being really thick here but i was wondering how to center a window vertically to the viewport (i.e if the user is scrolled down the page a bit to still be in the center) .. Now the really annoying thing is i've done it before and put it into a nice function but i c

[Proto-Scripty] Possible prototype bug ?

2009-02-10 Thread Jeztah
with the above DOM / Html setup i have invoked a click on class="cancel" like so .. $$('.cancel').invoke('observe', 'click', function(element) { alert($(element).next()); // returns undefined ? alert($(element).next(0)); // returns undefined ? alert($(element).next(1)); // r

[Proto-Scripty] Re: Internet Explorer 7 & 8

2009-02-10 Thread Jeztah
It seems that even addingmakes IE think its some sort of link now !! I have looked through all the code looking for any overlapping tags and or javascript redirects and nothing is out of the blue ... Yet another Bizzarre Internet explorer quirk it seems On Feb 10, 1:45 pm, Jeztah

[Proto-Scripty] Internet Explorer 7 & 8

2009-02-10 Thread Jeztah
Hi, somehting weird is happening in a page i'm developing with prototype ... Internet Explorer is telling me that its blocked a popup when all i have done is clicked on a select box drop down ... Is this some new method in internet explorer ? P.S The select box is dynamically added to the DOM a

[Proto-Scripty] Taboo Subject

2009-02-10 Thread Jeztah
I am writing a site that uses heavy prototype libraries + scriptaculous + jQuery ... The issue i am having is a simple one The site is marketed on its ease of use due to certain techniques ive developed but they rely on Javascript and wont work without it The site still functions withou

[Proto-Scripty] Stoping observing

2009-01-15 Thread Jeztah
Afternoon Guys / Gals .. I'm having a slight headache with stop observing i'll try to explain my code ... upon click of an element (in this case a form submit) my javascript goes through some calculations and if needed calls a function to create an error message .. this function creates a

[Proto-Scripty] Re: Prototype Cross Site Ajax Request

2008-12-17 Thread Jeztah
Sorry to repost but this did not appear on the group email out On Dec 16, 2:58 pm, Jeztah wrote: > Does anyone know if this is supported yet in prototypejs ... i have > found a plugin for it but it seems not to work as it is intended for > proto 1.5 and i am on the latest one ...

[Proto-Scripty] Prototype Cross Site Ajax Request

2008-12-16 Thread Jeztah
Does anyone know if this is supported yet in prototypejs ... i have found a plugin for it but it seems not to work as it is intended for proto 1.5 and i am on the latest one Are the developers thinking of maybe adding the "crossSite" option into ajax requests ? Thanks in advance Alex --~--

[Proto-Scripty] Focused field

2008-11-19 Thread Jeztah
Is there a mthod on prototype or nativejs to work out what part of the document the user is focused on currently ? I am trying to iron out a bug in somehting and need to work out what element they are currently on (form/div/span etc etc) Regards Alex --~--~-~--~~~---~

[Proto-Scripty] Nulling or stopping Dynamic Variables

2008-11-19 Thread Jeztah
Mornign Guys/Girls I am having some trouble nulling out or stopping some dynamic variables i have created ... I have built a dynamic window system which does alot of things, one is checking a database to ensure the most up to date information is in input boxes ... Now to check this i create a dy

[Proto-Scripty] Sending Json to the server

2008-11-17 Thread Jeztah
Morning Guys ... I am having a real headache trying to send json data to the server and have php decode it so i can do something with the data .. . Basically what i am trying to do is... I have a form and i would like to send data to the server in Json form (key/value pairs) so i can go over it

[Proto-Scripty] Ajax.Responders

2008-11-14 Thread Jeztah
Just to let everyone know i may have found a little bug in the Ajax.Responders .. or maybe it is mean to to this way When creating an Ajax.Updater for instance if you use the method onComplete in the Ajax.Options then it never unloads the Request from the Ajax.Responders counter If you don

[Proto-Scripty] Window System - WebOs / Web Desktop

2008-11-12 Thread Jeztah
Hi Guys / Gals After a few days frantic coding i have came up with a window system based on prototypejs/scriptaculous that can be used in a multi windowed environment. The example is loacted here: http://dev.thecvmarket.com/unitTest.php Each window that is created has unique id's that are refe

[Proto-Scripty] onDrag - scriptaculous

2008-11-11 Thread Jeztah
Hi guys/gals .. I am having some trouble stopping dragging using the dragdrop.js from scriptaculous .. basically i am using onDrag : function() { } to try to get it achieved ... but Event.stop doesnt do it, return false doesnt do it, return doesnt do it .. I need it to constrain things proper

[Proto-Scripty] Right offset Of Element

2008-11-11 Thread Jeztah
Afternoon people .. I am trying to get the right handside offset of an element (how far from the right of a non scrollable page an element is) .. i am doing this to constrain dragging elements outside the parent element which happens to be All the offsets and $(element).style.right wont return

[Proto-Scripty] Building a lazy Loader

2008-11-06 Thread Jeztah
Hi guys and gals ... today i am building a lazyLoader based on prototype Its already working except i assumed i could do a synchronous request so nothing further in the javascript function is executed untill the request has finished ... it seems that asynchronous : false; is not wokring

[Proto-Scripty] Re: PrototypeJS + Chrome + Observers

2008-10-22 Thread Jeztah
On Oct 7, 4:41 pm, kangax <[EMAIL PROTECTED]> wrote: > On Oct 7, 3:21 am, Roland <[EMAIL PROTECTED]> wrote: > > > > > Hi there, > > > I have this little function within my class: > > > var _setObservers = function(events, func, handle){ > >         if(!events) return; > >         events = _getOb