[Proto-Scripty] Re: Forms

2009-10-29 Thread Kevin Smith
You need to give the input tags an id, as follows:



" />






On 29/10/2009 15:08, Russell Keith wrote:
>
> Ok, maybe I'm just being dense, but I am reading the API for forms and 
> I am getting nothing from it.
>
> What is proper use of the $F utility and what can it do for me?  I 
> have read the |Form.Element.getValue and it means nothing to me.|
>
> | |
>
> |I have this form:|
>
> | |
>
> 
>
> 
>
> " />
>
> 
>
> 
>
> 
>
> 
>
> 
>
> When I try to do alert($F('A_NAME')); I get an 'Object does not 
> support this property or method' error.  I get the same error when I 
> try to submit the form with 'document.createPDF.submit();' is there 
> something wrong with my form?
>
>
> >

--~--~-~--~~~---~--~~
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: Events not working as expected in opera, ie or any other browser except firefox

2009-09-21 Thread Kevin Porter

Sorry, I didn't try your page, I was just using the test page I built to 
test your code.

You're right, IE8 gives an error on your page.

It's complaining about this line:

var e2 = element.up().up().up().next();

You'll just have to debug - please find out exaclty what you get for 
element.up(), element.up().up() etc. At some point
it's behaviour is differing from Firefox - when you find out what that 
is we'll try and figure why the behaviour is different.

One thing I would suggest trying (from previous IE LI difficulties) is 
to remove all whitespace from the UL/LI markup. However, the docs for 
next() and up() say that whitespace nodes are totally ignored by these 
functions, so that may not be the problem but it's probably worth a 
minute to try.

Alternatively, you could try using a css rule in up() 
(http://www.prototypejs.org/api/element/up) , eg:

var e2 = element.up('div.lista_izq').next();

Let me know how you get on. If those alternative suggestions don't work, 
we really need you to debug to find out at exactly which point the IE8 
behaviour is differing from that of normal browsers.

regards,

- Kev


Juan Diego wrote:
> It is still not working. I am going to try in another machine.  I get
> this error because the browser is in spanish.  El objeto no acepta
> esta propiedad o metodo. Which means the object does not accept this
> property or method in the lines 15 and 28.
>
>
> On Sep 21, 4:23 am, Kevin Porter  wrote:
>   
>> It works for me in IE8!
>>
>> Kill IE8, re-open it and try again.
>>
>> If it still doesn't work, what error are you getting?
>>
>> regards,
>>
>> - Kev
>>
>> Juan Diego wrote:
>> 
>>> I cleaned up a little my code it still doesnt work in IE8
>>>   
>>> this is the code
>>> function reemplazarX(){
>>>var element = this;
>>>//var e2 =element.getOffsetParent();
>>>var e2 =element.up().up().up().next();
>>>//alert(e2);
>>>e2.setStyle({
>>>backgroundColor: '#020506',
>>>opacity: 1.0,
>>>borderLeft:'1px #FFF solid'
>>>});
>>>e2.innerHTML= element.next().innerHTML;
>>>   
>>> }
>>> function borrar(){
>>>var element = this;
>>>//var e2 =element.getOffsetParent();
>>>var e2 =element.up().up().up().next();
>>>e2.innerHTML= "";
>>>e2.setStyle({
>>>backgroundColor: '#000',
>>>opacity: 0.0
>>>});
>>> }
>>>   
>>> On Sep 21, 3:59 am, Juan Diego  wrote:
>>>   
>>>> I dont want the LI elements.  Here is how it is setup,
>>>> 
>>>> 
>>>> 
>>>> text1
>>>>   hidden1
>>>> 
>>>>text2
>>>>   hidden2
>>>> 
>>>> 
>>>> 
>>>>  
>>>> I want display my message in lista_der.  So that is why i use all
>>>> those up(), i guess I can use 4 up and one next.
>>>> 
>>>> On Sep 21, 3:50 am, Kevin Porter  wrote:
>>>> 
>>>>> First things first - you've got four up()s in a row, which is likely to
>>>>> return you the document or window object.
>>>>>   
>>>>> If you want the LI element you only need one up() from the div.
>>>>>   
>>>>> regards,
>>>>>   
>>>>> - Kev
>>>>>   
>>>>> JuanDiegowrote:
>>>>>   
>>>>>> I used up() and didnt work, it is the same error.
>>>>>> Here is the test page
>>>>>> http://pts.raidenenergy.com/index.php?option=com_content&view=categor...
>>>>>> 
>>>>>> and this is the code.
>>>>>> 
>>>>>> function listas(){
>>>>>>$$('div.texto').each(function(s) { Event.observe(s, 'mouseover',
>>>>>> reemplazarX)});
>>>>>>$$('div.texto').each(function(s) { Event.observe(s, 'mouseout',
>>>>>> borrar)});
>>>>>> };
>>>>>> 
>>>>>> function reemplazarX(){
>>>>>>var element = this;
>>>>>>//var e2 =element.getOffsetParent();
>>>>>>var e2 =element

[Proto-Scripty] Re: Events not working as expected in opera, ie or any other browser except firefox

2009-09-21 Thread Kevin Porter

It works for me in IE8!

Kill IE8, re-open it and try again.

If it still doesn't work, what error are you getting?

regards,

- Kev

Juan Diego wrote:
> I cleaned up a little my code it still doesnt work in IE8
>
> this is the code
> function reemplazarX(){
>   var element = this;
>   //var e2 =element.getOffsetParent();
>   var e2 =element.up().up().up().next();
>   //alert(e2);
>   e2.setStyle({
>   backgroundColor: '#020506',
>   opacity: 1.0,
>   borderLeft:'1px #FFF solid'
>   });
>   e2.innerHTML= element.next().innerHTML;
>
> }
> function borrar(){
>   var element = this;
>   //var e2 =element.getOffsetParent();
>   var e2 =element.up().up().up().next();
>   e2.innerHTML= "";
>   e2.setStyle({
>   backgroundColor: '#000',
>   opacity: 0.0
>   });
> }
>
> On Sep 21, 3:59 am, Juan Diego  wrote:
>   
>> I dont want the LI elements.  Here is how it is setup,
>>
>> 
>> 
>> text1
>>   hidden1
>> 
>>text2
>>   hidden2
>> 
>> 
>> 
>>  
>> I want display my message in lista_der.  So that is why i use all
>> those up(), i guess I can use 4 up and one next.
>>
>> On Sep 21, 3:50 am, Kevin Porter  wrote:
>>
>> 
>>> First things first - you've got four up()s in a row, which is likely to
>>> return you the document or window object.
>>>   
>>> If you want the LI element you only need one up() from the div.
>>>   
>>> regards,
>>>   
>>> - Kev
>>>   
>>> JuanDiegowrote:
>>>   
>>>> I used up() and didnt work, it is the same error.
>>>> Here is the test page
>>>> http://pts.raidenenergy.com/index.php?option=com_content&view=categor...
>>>> 
>>>> and this is the code.
>>>> 
>>>> function listas(){
>>>>$$('div.texto').each(function(s) { Event.observe(s, 'mouseover',
>>>> reemplazarX)});
>>>>$$('div.texto').each(function(s) { Event.observe(s, 'mouseout',
>>>> borrar)});
>>>> };
>>>> 
>>>> function reemplazarX(){
>>>>var element = this;
>>>>//var e2 =element.getOffsetParent();
>>>>var e2 =element.up().up().up().up();
>>>>//alert(e2);
>>>>e2.childElements()[2].setStyle({
>>>>backgroundColor: '#020506',
>>>>opacity: 1.0,
>>>>borderLeft:'1px #FFF solid'
>>>>});
>>>>e2.childElements()[2].innerHTML= element.next().innerHTML;
>>>> 
>>>> }
>>>> function borrar(){
>>>>var element = this;
>>>>//var e2 =element.getOffsetParent();
>>>>var e2 =element.up().up().up().up();
>>>>e2.childElements()[2].innerHTML= "";
>>>>e2.childElements()[2].setStyle({
>>>>backgroundColor: '#000',
>>>>opacity: 0.0
>>>>});
>>>> }
>>>> 
>>>> On Sep 18, 5:27 am, david  wrote:
>>>> 
>>>>> HiJuan,
>>>>>   
>>>>> IE has much trouble with table. So not surprinsing that IE doesn't
>>>>> work as expected.
>>>>>   
>>>>> --
>>>>> david
>>>>>   
>>>>> On 17 sep, 19:10,JuanDiego wrote:
>>>>>   
>>>>>> Thanks.
>>>>>> One more thing, I am doing this inside a joomla so those divs are
>>>>>> inside a table inside the"content" module of joomla.  When ever I use
>>>>>> alert(e2) I thought i was getting the table, because it said something
>>>>>> about "table element", so for some reason in internet explorer it goes
>>>>>> directly to the body.  That is what it is happening right?  I am going
>>>>>> to try with teh up() function.
>>>>>> 
>>>>>> Ken I am using [2] because there is some text with  that i
>>>>>> though it wasnt important.  But thanks for noticing.
>>>>>> 
>>>>>> Juan
>>>>>> 

[Proto-Scripty] Re: Events not working as expected in opera, ie or any other browser except firefox

2009-09-21 Thread Kevin Porter

First things first - you've got four up()s in a row, which is likely to 
return you the document or window object.

If you want the LI element you only need one up() from the div.

regards,

- Kev


Juan Diego wrote:
> I used up() and didnt work, it is the same error.
> Here is the test page
> http://pts.raidenenergy.com/index.php?option=com_content&view=category&layout=blog&id=8&Itemid=14&lang=en
>
> and this is the code.
>
> function listas(){
>   $$('div.texto').each(function(s) { Event.observe(s, 'mouseover',
> reemplazarX)});
>   $$('div.texto').each(function(s) { Event.observe(s, 'mouseout',
> borrar)});
> };
>
> function reemplazarX(){
>   var element = this;
>   //var e2 =element.getOffsetParent();
>   var e2 =element.up().up().up().up();
>   //alert(e2);
>   e2.childElements()[2].setStyle({
>   backgroundColor: '#020506',
>   opacity: 1.0,
>   borderLeft:'1px #FFF solid'
>   });
>   e2.childElements()[2].innerHTML= element.next().innerHTML;
>
> }
> function borrar(){
>   var element = this;
>   //var e2 =element.getOffsetParent();
>   var e2 =element.up().up().up().up();
>   e2.childElements()[2].innerHTML= "";
>   e2.childElements()[2].setStyle({
>   backgroundColor: '#000',
>   opacity: 0.0
>   });
> }
>
> On Sep 18, 5:27 am, david  wrote:
>   
>> HiJuan,
>>
>> IE has much trouble with table. So not surprinsing that IE doesn't
>> work as expected.
>>
>> --
>> david
>>
>> On 17 sep, 19:10,JuanDiego wrote:
>>
>> 
>>> Thanks.
>>> One more thing, I am doing this inside a joomla so those divs are
>>> inside a table inside the"content" module of joomla.  When ever I use
>>> alert(e2) I thought i was getting the table, because it said something
>>> about "table element", so for some reason in internet explorer it goes
>>> directly to the body.  That is what it is happening right?  I am going
>>> to try with teh up() function.
>>>   
>>> Ken I am using [2] because there is some text with  that i
>>> though it wasnt important.  But thanks for noticing.
>>>   
>>> Juan
>>>   
>>> On Sep 17, 6:08 am, david  wrote:
>>>   
>>>> Hi Kev,
>>>> 
>>>> the getOffSetParent() return the "closest positioned ancestor", and if
>>>> not found return the body !
>>>> That's why for some element, parent is not positionned (CSS position
>>>> property) and it return the body element.
>>>> 
>>>> As you say, up() is much more appropriate in this case.
>>>> 
>>>> --
>>>> david
>>>> 
>>>> On 17 sep, 10:38, Kevin Porter  wrote:
>>>> 
>>>>> HiJuan,
>>>>>   
>>>>> For me, I get the error at "e2.childElements()[2].setStyle...".
>>>>> e2 at that point is the body element. Is that what you want?
>>>>> I guess you want the LI element? If so, maybe .up() would be a better
>>>>> choice than .getOffSetParent()?
>>>>> Also, you probably want to use "[1]" instead of "[2]" to reference the
>>>>> second element of the LI. (it's
>>>>> a zero-indexed array).
>>>>>   
>>>>> regards,
>>>>>   
>>>>> - Kev
>>>>>   
>>>>> JuanDiegowrote:
>>>>>   
>>>>>> Ok, so I cleaned up my code.  I used "each" instead of a For loop, so
>>>>>> now it works in every Browser except IE8. I havent tested it in other
>>>>>> versions of IE. Like 6 o 7.
>>>>>> So here is the code.
>>>>>> 
>>>>>> function listas(){
>>>>>>$$('div.texto').each(function(s) { Event.observe(s, 'mouseover',
>>>>>> reemplazarX)});
>>>>>>$$('div.texto').each(function(s) { Event.observe(s, 'mouseout',
>>>>>> borrar)});
>>>>>> };
>>>>>> 
>>>>>> function reemplazarX(){
>>>>>>var element = this;
>>>>>>var e2 =element.getOffsetParent();
>

[Proto-Scripty] Re: Events not working as expected in opera, ie or any other browser except firefox

2009-09-17 Thread Kevin Porter

Hi Juan,

For me, I get the error at "e2.childElements()[2].setStyle...".
e2 at that point is the body element. Is that what you want?
I guess you want the LI element? If so, maybe .up() would be a better 
choice than .getOffSetParent()?
Also, you probably want to use "[1]" instead of "[2]" to reference the 
second element of the LI. (it's
a zero-indexed array).

regards,

- Kev

Juan Diego wrote:
> Ok, so I cleaned up my code.  I used "each" instead of a For loop, so
> now it works in every Browser except IE8. I havent tested it in other
> versions of IE. Like 6 o 7.
> So here is the code.
>
> function listas(){
>   $$('div.texto').each(function(s) { Event.observe(s, 'mouseover',
> reemplazarX)});
>   $$('div.texto').each(function(s) { Event.observe(s, 'mouseout',
> borrar)});
> };
>
> function reemplazarX(){
>   var element = this;
>   var e2 =element.getOffsetParent();
>   alert(e2);
>   e2.childElements()[2].setStyle({
>   backgroundColor: '#020506',
>   opacity: 1.0,
>   borderLeft:'1px #FFF solid'
>   });
>   e2.childElements()[2].innerHTML= element.next().innerHTML;
>
> }
> function borrar(){
>   var element = this;
>   var e2 =element.getOffsetParent();
>   e2.childElements()[2].innerHTML= "";
>   e2.childElements()[2].setStyle({
>   backgroundColor: '#000',
>   opacity: 0.0
>   });
> }
>
> I get an error on Line 14.  "The object does not accept this property
> or method" So the problem seems to be in this line var e2
> =element.getOffsetParent();
> With getOffsetParent function.
>
> This code works in opera, konqueror, safari, firefox.
>
> Thanks
>
> On Sep 17, 12:36 am, Juan Diego  wrote:
>   
>> By the way i just found out that
>> var lista_izq=$$('div.lista_izq')[i].childElements()[0].childElements
>> ();
>> is the problem in IE explorer. In opera works but in IE8 is a problem
>>
>> On Sep 17, 12:19 am, Juan Diego  wrote:
>>
>> 
>>> Hi I havent use javascript and prototype in a while so maybe i am
>>> doing something really wrong.
>>> So here is what I am trying to do with prototype
>>> I have a a few places in my page with a set of to divs divs, lista_izq
>>> and lista_der, with a list inside list_izq
>>> 
>>> 
>>> text1
>>>   hidden1
>>> 
>>>text2
>>>   hidden2
>>> 
>>> 
>>> 
>>>  
>>>   
>>> So when ever the mouse is over the text1 or text2. The hidden text
>>> appears on the second .
>>> I use firefox so I did all the testing there. It worked but when i
>>> tested on opera, IE, and konqueror it didnt. It is really anoying
>>> tracing bugs in other browsers without firebug.  Anyhow here is my
>>> code for each node
>>>   
>>> Event.observe(titulo, 'mouseover', function(e) {
>>> reemplazarX(e);
>>> });
>>> Event.observe(titulo, 'mouseout', function(e) {
>>> borrar(e);
>>> });
>>>   
>>> and this my functions
>>>   
>>> function reemplazarX(e){
>>> alert(e);
>>> alert(e.element);
>>> alert(e.element());
>>> var element = e.element();
>>> alert("s");
>>> var e2 =element.getOffsetParent(element);
>>> alert("t");
>>> //e2.childElements()[2].setStyle('backgroundColor', blue);
>>>   
>>> alert(element);
>>> alert("xx");
>>> e2.childElements()[2].setStyle({
>>> backgroundColor: '#020506',
>>> opacity: 1.0,
>>> borderLeft:'1px #FFF solid'
>>> });
>>> e2.childElements()[2].innerHTML= element.next().innerHTML;
>>>   
>>> }
>>>   
>>> function borrar(e,lista_der){
>>> var element = e.element();
>>> var e2 =element.getOffsetParent(element);
>>> e2.childElements()[2].innerHTML= "";
>>> e2.childElements()[2].setStyle({
>>> backgroundColor: '#000',
>>> opacity: 0.0
>>> });
>>> 

[Proto-Scripty] Re: Refused to get unsafe header "X-JSON"

2009-09-15 Thread Kevin Smith
Can you send us the real URL?  Maybe someone can get an idea on the problem.

T.J. Crowder wrote:
> Hi,
>
> Please don't bump-post. If anyone has any ideas, they'll see the
> thread and reply.
> --
> T.J. Crowder
> tj / crowder software / com
> www.crowdersoftware.com
>
>
> On Sep 15, 11:46 am, adster  wrote:
>
>> Anyone got any ideas on this one?
>>
>> Thanks,
>>
>> Adam
>>
>> On Sep 14, 1:17 pm, adster  wrote:
>>
>>
>>
>>  
>>> Yep - the error I see via the Chrome Javascript console is:
>>>
>>> Refused to get unsafe header "X-JSON"
>>>
>>> And then second time round (i.e. refresh the page) it gives:
>>>
>>> XHR finished loading: "http://127.0.0.1/search-results.cfm?ajax=true";.
>>> search-results.cfm Resource interpreted as other but transferred with
>>> MIME type text/html.
>>>
>>> Generally works OK in Firefox.
>>>
>>> I have a form which submits to /search-hotels which is where the ajax
>>> call takes place. I am using ISAPI rewrite to make the url /search-
>>> results.cfm into /search-hotels but the same thing happens even if I
>>> browse to /search-results.cfm.
>>>
>>> Any ideas?
>>>
>>> On Sep 14, 1:01 pm, "Alex McAuley"
>>> wrote:
>>>
 Cant see "The above error" as described in your post ?
 Can you post the error?
  
 Alex Mcauleyhttp://www.thevacancymarket.com
  
 - Original Message -
 From: "adster"
 To: "Prototype&  script.aculo.us"
 Sent: Monday, September 14, 2009 12:44 PM
 Subject: [Proto-Scripty] Re: Refused to get unsafe header "X-JSON"
  
 Scrub that - it doesn't work first time in IE7 either.
  
 On Sep 14, 10:42 am, adster  wrote:
  
> Hi All,
>
> I'm getting the above error message in Chrome (and Safari) but not in
> Firefox or IE. However, on a page refresh it does work. How can it not
> work first time around and then decide to work on a page refresh?
>
> I think this is a security issue thing...any help much appreciated.
>
> The code is:
>
> function search() {
> working();
> var parameters = 'ajax=true';
> var search_url = 'search-results.cfm';
> // Do ajax request
> try {
> myAjax = new Ajax.Updater(
> 'searchResults',
> search_url,
> {
> method: 'post',
> parameters: parameters,
> onComplete: done
> }
> );
> } catch(err) {
> console.log(err);
> alert(err.description);
> }
>
> } // EOF
>
> window.onload = function() {
> //$('country_select').focus();
> //alert('loaded');
> search();
>
> }
>
> >
>

--~--~-~--~~~---~--~~
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 new element method get_css_attributes

2009-08-30 Thread Kevin Porter

Forgot to mention I moved the '-' to after the '_' in the character 
class. If you use a '-' in a character class it should be the last 
character (to avoid ambiguity because of it's special meaning inside a 
character class).

regards,

- Kev

Marko Zabcic wrote:
>
> On 29 kol, 21:55, Kevin Porter  wrote:
>   
>> Very interesting Marko. Passing data via class attribute probably isn't
>> the 'right' thing to do, but I've chosen to do it myself on occasion.
>> 
>
> Depends on situation and amount of data. I'm using it for tree
> structure on  element and setting variables like:
> "_lft:5 _rgt:10 _parent_id:1 _root". I think this is very simple and
> clean solution for this situation. I'm open to any other suggestions.
>
>   
>> It's certainly a very useful function you've provided. I believe HTML5
>> will allow custom attributes beginning with 'data-' for this very purpose.
>>
>> I would modify your regex slightly to:
>>
>> /(?:^|\s)_([\w_]+)(:([\w_-]+))*(?:)/
>>
>> The changes are the '\w' instead of 'a-zA-Z0-9', and the addition of
>> (?:) at the end. This isn't necessary at all, it just some dummy text to
>> insert between the '*' and '/'  so the '*/' doesn't interfere with
>> multi-line commenting.
>> 
>
> Nice. I don't know how I thought that \w is for letters only :-)
>
>   
>> Does the '-' separator for array values mean that if you have an array
>> of strings, none of the values can contain a '-'? Is there a better
>> character to use as a separator? I suppose you're limited if you don't
>> want the code to stop pages from validating?
>> 
>
> It's validation limit. As it isn't meant for complex data it's not
> that big restriction. You could use '.' instead of '-' and it would be
> valid too. I've choose '-' for separator because code looks lot
> cleaner to me.
>
> Thank you for review,
> Marko
>
>
>   
>> regards,
>>
>> - Kev
>>
>>
>>
>> Marko Zabcic wrote:
>> 
>>> Hi all,
>>>   
>>> I've needed a way for storing data/variables on html elements and
>>> retrieving then through javascript. Here is the 
>>> result:http://pastie.org/598948
>>> and examplehttp://jsbin.com/ajohi(view source code)
>>>   
>>> I would appreciate you opinion on this matter and also is there a way
>>> to optimize/shorten regex.
>>>   
>>> Thanks,
>>> Marko
>>>   
>> --
>> Kevin Porter
>> Advanced Web Construction 
>> Ltdhttp://webutils.co.ukhttp://billiardsearch.nethttp://9ballpool.co.uk
>>
>> AJAX Blackjack - real-time multi-player blackjack game with no flash, java 
>> or software downloads required -http://blackjack.webutils.co.uk
>> 
> >
>
>
>
>   


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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 new element method get_css_attributes

2009-08-29 Thread Kevin Porter

Very interesting Marko. Passing data via class attribute probably isn't 
the 'right' thing to do, but I've chosen to do it myself on occasion. 
It's certainly a very useful function you've provided. I believe HTML5 
will allow custom attributes beginning with 'data-' for this very purpose.

I would modify your regex slightly to:

/(?:^|\s)_([\w_]+)(:([\w_-]+))*(?:)/

The changes are the '\w' instead of 'a-zA-Z0-9', and the addition of 
(?:) at the end. This isn't necessary at all, it just some dummy text to 
insert between the '*' and '/'  so the '*/' doesn't interfere with 
multi-line commenting.

Does the '-' separator for array values mean that if you have an array 
of strings, none of the values can contain a '-'? Is there a better 
character to use as a separator? I suppose you're limited if you don't 
want the code to stop pages from validating?

regards,

- Kev


Marko Zabcic wrote:
> Hi all,
>
> I've needed a way for storing data/variables on html elements and
> retrieving then through javascript. Here is the result: 
> http://pastie.org/598948
> and example http://jsbin.com/ajohi (view source code)
>
> I would appreciate you opinion on this matter and also is there a way
> to optimize/shorten regex.
>
> Thanks,
> Marko
> >
>
>
>
>   


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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: $H need help

2009-08-26 Thread Kevin Porter

Nah, it doesn't like the 'input.id' as an object key. Object keys must 
be literals.

He'll have to assign that key with .set() before passing the hash into 
the update() function.

- Kev


ColinFine wrote:
>
> On Aug 26, 1:09 am, buda  wrote:
>   
>> I need to put into hash pairs:
>>
>> input1.id : input1.getValue
>> 
>> inputN.id : inputN.getValue
>>
>> where N may be from 5 to 25
>>
>> 
> In that case, update is the right tool, and I can't see anything wrong
> with your initial syntax. Could the error be somewhere else? Or might
> you have a stray comma at the end of your object ("h.update
> ({ input.id: input.getValue(), });")?  (IE objects to that, rightly,
> but Firefox is more forgiving).
>
> >
>
>
>
>   


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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: $H need help

2009-08-25 Thread Kevin Porter


What do you mean by 'some pairs'?

Looks like set() is what you want.

What do you want your hash to look like before and after?

- Kev

buda wrote:
> Sorry for not full description of my task - I need to add some pairs
> to a hash - so set() doesnt hepl me :(
>
> On 26 авг, 01:18, Kevin Porter  wrote:
>   
>> Oops sorry! Posted without testing, I didn't realise you lost that
>> assignment notation with a $H() hash.
>>
>> - Kev
>>
>>
>>
>>
>>
>> DJ Mangus wrote:
>> 
>>> what you want to do is h.set(input.id <http://input.id>,
>>> input.getValue())
>>>   
>>> Seehttp://www.prototypejs.org/api/hash/set
>>>   
>>> 2009/8/25 Kevin Porter mailto:k...@9ballpool.co.uk>>
>>>   
>>> Same:
>>>   
>>> var h = $H({});
>>> h[input.id <http://input.id>] = input.getValue();
>>>   
>>> - Kev
>>>   
>>> buda wrote:
>>> > Thanks for replay, but
>>> > I Do need to add it to a $H object 
>>>   
>>> > how to do it? Thanks )
>>>   
>>> > On 26 авг, 00:14, Kevin Porter >> <mailto:k...@9ballpool.co.uk>> wrote:
>>>   
>>> >> var h = {};
>>> >> h[input.id <http://input.id>] = input.getValue();
>>>   
>>> >> Doesn't even need to be a $H(), just a regular JS object/hash.
>>>   
>>> >> - Kev
>>>   
>>> >> buda wrote:
>>>   
>>> >>> I need to add to a hash id of an input and its value
>>> >>> when I try to do
>>>   
>>> >>>  var h = $H({});
>>> >>>  h.update({ input.id <http://input.id>: input.getValue() });
>>>   
>>> >>> an error of bad syntax is generated
>>>   
>>> >>> how can I add an element to a hash which key is an input.id
>>> <http://input.id> and value
>>> >>> is an input.getValue()?
>>>   
>>> >>> Thanks
>>>   
>>> >> --
>>> >> Kevin Porter
>>> >> Advanced Web Construction
>>> Ltdhttp://webutils.co.ukhttp://billiardsearch.nethttp://9ballpool.co.uk
>>> <http://9ballpool.co.uk>
>>>   
>>> >> AJAX Blackjack - real-time multi-player blackjack game with no
>>> flash, java or software downloads required
>>> -http://blackjack.webutils.co.uk-Скрыть цитируемый текст -
>>>   
>>> >> - Показать цитируемый текст -
>>>   
>>> --
>>> Kevin Porter
>>> Advanced Web Construction Ltd
>>>http://webutils.co.uk
>>>http://billiardsearch.net
>>>http://9ballpool.co.uk
>>>   
>>> AJAX Blackjack - real-time multi-player blackjack game with no
>>> flash, java or software downloads required -
>>>http://blackjack.webutils.co.uk
>>>   
>> --
>> Kevin Porter
>> Advanced Web Construction 
>> Ltdhttp://webutils.co.ukhttp://billiardsearch.nethttp://9ballpool.co.uk
>>
>> AJAX Blackjack - real-time multi-player blackjack game with no flash, java 
>> or software downloads required -http://blackjack.webutils.co.uk- Скрыть 
>> цитируемый текст -
>>
>> - Показать цитируемый текст -
>> 
> >
>
>
>
>   


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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: $H need help

2009-08-25 Thread Kevin Porter

Oops sorry! Posted without testing, I didn't realise you lost that 
assignment notation with a $H() hash.

- Kev


DJ Mangus wrote:
> what you want to do is h.set(input.id <http://input.id>, 
> input.getValue())
>
> See http://www.prototypejs.org/api/hash/set
>
> 2009/8/25 Kevin Porter mailto:k...@9ballpool.co.uk>>
>
>
> Same:
>
> var h = $H({});
> h[input.id <http://input.id>] = input.getValue();
>
> - Kev
>
>
> buda wrote:
> > Thanks for replay, but
> > I Do need to add it to a $H object 
> >
> > how to do it? Thanks )
> >
> > On 26 авг, 00:14, Kevin Porter  <mailto:k...@9ballpool.co.uk>> wrote:
> >
> >> var h = {};
> >> h[input.id <http://input.id>] = input.getValue();
> >>
> >> Doesn't even need to be a $H(), just a regular JS object/hash.
> >>
> >> - Kev
> >>
> >>
> >>
> >>
> >>
> >> buda wrote:
> >>
> >>> I need to add to a hash id of an input and its value
> >>> when I try to do
> >>>
> >>>  var h = $H({});
> >>>  h.update({ input.id <http://input.id>: input.getValue() });
> >>>
> >>> an error of bad syntax is generated
> >>>
> >>> how can I add an element to a hash which key is an input.id
> <http://input.id> and value
> >>> is an input.getValue()?
> >>>
> >>> Thanks
> >>>
> >> --
> >> Kevin Porter
> >> Advanced Web Construction
> Ltdhttp://webutils.co.ukhttp://billiardsearch.nethttp://9ballpool.co.uk
> <http://9ballpool.co.uk>
> >>
> >> AJAX Blackjack - real-time multi-player blackjack game with no
> flash, java or software downloads required
> -http://blackjack.webutils.co.uk- Скрыть цитируемый текст -
> >>
> >> - Показать цитируемый текст -
> >>
> > >
> >
> >
> >
> >
>
>
> --
> Kevin Porter
> Advanced Web Construction Ltd
> http://webutils.co.uk
> http://billiardsearch.net
> http://9ballpool.co.uk
>
> AJAX Blackjack - real-time multi-player blackjack game with no
> flash, java or software downloads required -
> http://blackjack.webutils.co.uk
>
>
>
>
>
>
> >


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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: $H need help

2009-08-25 Thread Kevin Porter

Same:

var h = $H({});
h[input.id] = input.getValue();

- Kev


buda wrote:
> Thanks for replay, but
> I Do need to add it to a $H object 
>
> how to do it? Thanks )
>
> On 26 авг, 00:14, Kevin Porter  wrote:
>   
>> var h = {};
>> h[input.id] = input.getValue();
>>
>> Doesn't even need to be a $H(), just a regular JS object/hash.
>>
>> - Kev
>>
>>
>>
>>
>>
>> buda wrote:
>> 
>>> I need to add to a hash id of an input and its value
>>> when I try to do
>>>   
>>>  var h = $H({});
>>>  h.update({ input.id: input.getValue() });
>>>   
>>> an error of bad syntax is generated
>>>   
>>> how can I add an element to a hash which key is an input.id and value
>>> is an input.getValue()?
>>>   
>>> Thanks
>>>   
>> --
>> Kevin Porter
>> Advanced Web Construction 
>> Ltdhttp://webutils.co.ukhttp://billiardsearch.nethttp://9ballpool.co.uk
>>
>> AJAX Blackjack - real-time multi-player blackjack game with no flash, java 
>> or software downloads required -http://blackjack.webutils.co.uk- Скрыть 
>> цитируемый текст -
>>
>> - Показать цитируемый текст -
>> 
> >
>
>
>
>   


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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] can I get a list of event listeners on an element?

2009-08-25 Thread Kevin Porter


Hi,

Can I get a list of registered listeners/observers on an element?

What I'm trying to do is dynamically replace an element with another 
element, but want to preserve the events.

I don't want to resort to something like:

new_element.onclick = old_element.onclick;

as the prototype docs advise against using .onclick, .onmouseover etc.

If prototype doesn't provide a way to do this, is there a bare JS way to 
do it (ie to get a list of events that were registered with 
addEventListener)? I googled but couldn't find this.


regards,

- Kev

-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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: $H need help

2009-08-25 Thread Kevin Porter

var h = {};
h[input.id] = input.getValue();

Doesn't even need to be a $H(), just a regular JS object/hash.

- Kev

buda wrote:
> I need to add to a hash id of an input and its value
> when I try to do
>
>  var h = $H({});
>  h.update({ input.id: input.getValue() });
>
> an error of bad syntax is generated
>
> how can I add an element to a hash which key is an input.id and value
> is an input.getValue()?
>
> Thanks
> >
>
>
>
>   


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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 routine fails in IE

2009-08-25 Thread Kevin Porter

You need ietester :)

http://www.my-debugbar.com/wiki/IETester/HomePage

- Kev

yuval dagan wrote:
> I checked now in ie 6 its OK
> tehere is no ie7 around :)
>  
> Yuval
>
>  
> On 8/25/09, *Milko Kretschmann*  <mailto:mi...@kretschmann.nl>> wrote:
>
> Hi Yuval,
>
>  
>
>  
> Ok, thanks very much. Does it also work under IE7 (6)?
>
>  
> Milko.
>
> On Aug 25, 2009, at 6:01 AM, yuval dagan wrote:
>
>> Hi Miko
>>  
>> Yes, thats what I checked and it worked great here on ie8.
>>  
>> Yuval
>>
>>  
>> On Mon, Aug 24, 2009 at 10:56 PM, Milko Kretschmann
>> mailto:mi...@kretschmann.nl>> wrote:
>>
>> Hello Yuval,
>>
>>  
>> Thank you very much for checking.
>> Did you also test the
>> url: http://www.cartesians.com/geefeenster/enter_ajax.php
>> If you change country under Delivery Address then the content
>> of the popup behind State/Province should change (via ajax).
>>
>>  
>> Thanks again.
>>
>>  
>> Milko.
>>
>>  
>> On Aug 24, 2009, at 9:25 PM, yuval dagan wrote:
>>
>>> hi
>>>  
>>> I checked now at home with ie8 and it works great.
>>> I checked also the net renderer with same ie and it  didnt
>>> worked
>>>  
>>> Yuval
>>>
>>>
>>>  
>>> On Mon, Aug 24, 2009 at 8:06 PM, Walter Lee Davis
>>> mailto:wa...@wdstudio.com>> wrote:
>>>
>>>
>>> Most of the NetRenderers of the world don't process
>>> JavaScript and
>>> Ajax, unless you spend like a sailor for BrowserCam
>>> (where you get to
>>> remote into an actual Windows desktop and drive it in
>>> real time). One
>>> of the reasons I bought a new MacBook Pro last year was
>>> so I could
>>> install VMWare and run XP and IE6 and see how awful
>>> everything could
>>> look.
>>>
>>> Walter
>>>
>>> On Aug 24, 2009, at 12:33 PM, Milko Kretschmann wrote:
>>>
>>> > Hi Yuval and David,
>>> >
>>>     > I'm surprised to hear it works under IE6. Since I use
>>> MacOS and
>>> > don't have IE I test it inderectly via a webbased IE
>>> renderer (http://ipinfo.info/netrenderer/index.php
>>> > ).
>>> > Here I get a Request Failed message when testing IE6.
>>> IE7/8 does not
>>> > render any result at all.
>>>
>>>  
>>>
>>>  
>>>
>>>
>>>  
>>>
>>>
>>>
>>
>>  
>>
>>  
>>
>>
>>  
>>
>>
>>
>
>  
>
>
> >


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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: Delete page on Scriptaculous Wiki

2009-08-22 Thread Kevin Porter

I don't know, sorry :) But when you find out how to delete, how about 
deleting this one too: 
http://wiki.github.com/madrobby/scriptaculous/giving-elements-layout

- Kev

Mojito wrote:
> http://wiki.github.com/madrobby/scriptaculous/edgarm
>
> That page has been here for like a year.  It used to contain a flame
> war, but I edited the text to show what you see now.  How do I delete
> this page? I see no delete button!
> >
>
>
>
>   


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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: this keyword inside of the map function

2009-08-19 Thread Kevin Porter


> I am not positive, but I believe the problem is from my event 
> listeners on the line:
>  
> Now: $(e).observe('click', *this*.doSlide.bind(featuresWrapper[i].id));
>  
You need to pass 'this' as the first argument to bind().

regards,

- Kev

-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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: Observing a checkbox

2009-08-18 Thread Kevin Porter


Yep, too many browser differences, use click.

Some browsers fire onchange event as soon as you change the value, 
others (IE in fact) only fire the event after the checkbox loses focus.
Good explanation here: http://video.yahoo.com/watch/4943143/13163203 (at 
about time -41:46).

regards,

- Kev


DJ Mangus wrote:
> Spec and reality often differ.
>
> On 8/18/09, ColinFine  wrote:
>   
>>
>> On Aug 13, 2:53 pm, Jeztah  wrote:
>> 
>>> 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');
>>>
>>> } else {
>>>
>>> $$('.dead-vacancy').invoke('hide');
>>>
>>> }
>>>
>>> });
>>>
>>> But it doesnt seem to want to work in IE8 and it doesnt throw an
>>> error SHoudl i just use "click" instead?
>>>
>>>   
>> You are tabbing to a different field after clicking, yes?
>>
>> The definition of 'onChange' in the HTML spec (http://www.w3.org/TR/
>> html401/interact/scripts.html#adef-onchange) is "The onchange event
>> occurs when a control loses the input focus and its value has been
>> modified since gaining focus".
>>
>> 
>
>   


-- 
Kevin Porter
Advanced Web Construction Ltd
http://webutils.co.uk
http://billiardsearch.net
http://9ballpool.co.uk

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk



--~--~-~--~~~---~--~~
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] Limit depth of Sortable Tree

2009-07-08 Thread Kevin

I'm attempting to make a list of grouped terms.  I'm approaching this
by creating a Sortable object as a tree, so the user will be able to
drag terms into and out of groups, as well as reordering the groups
themselves.  I do not want the user to be able to drag a group into
another group.

I was wondering if there was an option (or a workaround) for limiting
the depth of a Sortable tree.

Another idea I had about solving this was to make the Droppable
'group' elements only accept terms (since accept is an option for the
Droppable class).  Although, since creating the draggable and
droppables is all done when calling Sortable.create, I'm not sure how
I can modify the options for individual elements.

Any ideas?

Kevin

--~--~-~--~~~---~--~~
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: Sortable is undefined

2009-07-07 Thread kevin

It doesn't seem to matter if I'm using relative or absolute paths.

I know the file is being included as I can put an alert which comes up
on the page load.

Kevin

On Jul 7, 10:06 am, Narendra sisodiya 
wrote:
> I think your src url is not valid. check the same.
>
> It is /javascripts/ur_file.js  for default rails structure.
>
> ~ N a R e N
>
>
>
> On Tue, Jul 7, 2009 at 11:50 AM, kevin  wrote:
>
> > Hi. I just downloaded 1.8.2 and was attempting to use Sortable. I
> > think I have it right, but I get the error
>
> > Webpage error details
>
> > User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/
> > 4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR
> > 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR
> > 3.5.30729)
> > Timestamp: Tue, 7 Jul 2009 06:17:17 UTC
>
> > Message: 'Sortable' is undefined
> > Line: 26
> > Char: 2
> > Code: 0
> > URI:http://www.ig.utexas.edu/pubs/draggable.js
>
> > That line is
>
> >        Sortable.create(obj);
>
> > The odd thing is that I get this message with my js files are included
> > as such...
>
> > 
> > 
>
> > , but if I include the scriptaculous files as
>
> > http://script.aculo.us/</a>
> > prototype.js <<a  rel="nofollow" href="http://script.aculo.us/%0Aprototype.js">http://script.aculo.us/%0Aprototype.js</a>>">
> > http://script.aculo.us/</a>
> > scriptaculous.js <<a  rel="nofollow" href="http://script.aculo.us/%0Ascriptaculous.js">http://script.aculo.us/%0Ascriptaculous.js</a>>">
>
> > then the script runs correctly. Thoughts?
>
> > Kevin- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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] Sortable is undefined

2009-07-07 Thread kevin

Hi. I just downloaded 1.8.2 and was attempting to use Sortable. I
think I have it right, but I get the error

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/
4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR
3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR
3.5.30729)
Timestamp: Tue, 7 Jul 2009 06:17:17 UTC

Message: 'Sortable' is undefined
Line: 26
Char: 2
Code: 0
URI: http://www.ig.utexas.edu/pubs/draggable.js

That line is

Sortable.create(obj);

The odd thing is that I get this message with my js files are included
as such...




, but if I include the scriptaculous files as

http://script.aculo.us/</a>
prototype.js">
http://script.aculo.us/</a>
scriptaculous.js">

then the script runs correctly. Thoughts?

Kevin

--~--~-~--~~~---~--~~
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: Download page via prototype. with making all scripts on page. Help with code.

2009-03-12 Thread kevin

i just wanted to download page. page has 

[Proto-Scripty] Download page via prototype. with making all scripts on page. Help with code.

2009-03-10 Thread kevin

i need to enter to the page with making all scripts on it. so i need
to download it via seeds (hhtp headers). and make all scripts. how can
i do it?
i thought via Ajax.Update i can do it. but something is wrong.
i don't know what to do with parameters. because i need to download
all page.



function getHTML()
{
var url = 'http://mypage.com';


var myAjax = new Ajax.Updater( {success: 'placeholder'}, url, {method:
'get', onFailure: reportError, evalScripts: true});

}

function reportError(request)
{
alert('Sorry. There was an error.');
}





--~--~-~--~~~---~--~~
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: grabbing form values from multiple pages.

2009-02-04 Thread Kevin Smith
Seeing as your using AJAX, why even bother with more than one page. You 
can do everything on one page.

Richard Quadling wrote:
> 2009/2/4 Richard Quadling :
>   
>> 2009/2/4 david :
>> 
>>> Hi sqaured,
>>>
>>> It seems, that you only transmit the value of the previous form to the
>>> DB, and for the third form to be generated, you need to pass first AND
>>> second one !
>>> So this could be done in a couple of lines (I think).
>>>
>>> Give us your code, or a sample, we will surelly help.
>>>
>>> --
>>> david
>>>
>>> On 2 fév, 19:00, Squared  wrote:
>>>   
 The abbreviated question:
 How do I pass the value of a list item on page 1 AND page 2 to a third
 page so I can use the values in php and mySQL?

 The extended version:
 I have three form lists with select values taken from a mySQL
 database. The second list is generated based on the selection from the
 first, and the third is generated based on the selection from the
 first and second. Finally, a table is generated based on all values
 selected in all three. I have this working with php, but the page
 reloads after every list item is selected. I have done a lot of
 research and have almost gotten this to work without a reload using
 AJAX from Prototype, but I am running into a problem. The second list
 generates correctly, but the third does not. This is because my mySQL
 statement pulls the values from the first two lists. Since the page is
 not reloaded it only sees the value of the second list and not the
 first. How can I pass the value from the first list and the second
 list (which are on two separate pages) to the third list?
 
>> What is probably going to be of most use is to understand sessions.
>>
>> Essentially a session (accessed in PHP using the super global
>> $_SESSION) allows you to remember data between requests.
>>
>> A session is unique to a connection (a user normally). If they haven't
>> got a session ID, they they will be given a new one.
>>
>> Read about sessions at http://docs.php.net/sessions and
>> http://docs.php.net/manual/en/book.session.php
>>
>> --
>> -
>> Richard Quadling
>> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
>> "Standing on the shoulders of some very clever giants!"
>>
>> 
>
> By using a session, you don't need to "store" data in the DB until the
> final request. Allowing the user to spend as long as they want
> travelling between the different pages until they are ready.
>
> Ok, for me, I log my sessions in a DB, but that's another story.
>
>
>
>   

--~--~-~--~~~---~--~~
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: evalJSON hangs IE

2008-11-13 Thread Kevin Smith

Hi,

I'm running the exact code and do not get any IE7 hangs:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>




Event.observe(window, 'load', function() {
Event.observe($('btn'), 'click', function() {
var j = ' {"easting": "518353", "northing": "168119"} ';
var c = j.evalJSON();
alert(c.easting);
});
});









Regards,
Kevin

gingerbbm wrote:
> Dear all
>
> I'm looking for inspiration. Take a look at this code:
>
> http://pastie.org/313941
>
> In a simple HTML page this does what one would expect.
> But the exact same code on a page in my application hangs IE7 on the
> evalJSON() line (eventually I get a "Stop running this script?"
> prompt).
>
> I would appreciate absolutely any suggestions as to why this might be
> happening.
>
> Thanks
> Stuart
> >
>   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Does Prototype have a future?

2008-09-30 Thread Kevin King

I second the recommendation on the book.  Excellent resource!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: IE7 crashes with ghosting enabled on Draggable

2008-09-25 Thread Kevin King

Crap.. I've extended the containers via Element.extend() and IE7 still
crashes with any ghosting: true on Draggables.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: IE7 crashes with ghosting enabled on Draggable

2008-09-25 Thread Kevin King

I would have expected the items to be extended when they were declared
as Draggables - no?  Or are we talking about possibly the container
that the items came from?  And without getting into the browser
incompatibilities, wouldn't that fail on FF and IE equally?

On Sep 25, 11:45 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> Hi Kevin,
>
> Usually "Object does not support this action" messages in IE mean that
> you're trying to use extended functions on an unextended element.
> Make sure that all elements you're working with have been extended via
> $().  More:http://www.prototypejs.org/learn/extensions
>
> HTH,
> --
> T.J. Crowder
> tj / crowder software / com
>
> On Sep 25, 6:36 pm, Kevin King <[EMAIL PROTECTED]> wrote:
>
> > I am reasonably new to Prototype and script.aculo.us but I have a
> > project where dragging and dropping are crucial elements of the
> > solution.  Ghosting would make the drag-n-drop even better, but on IE7
> > everything I've tried - including the samples - generates "Object does
> > not support this action" messages in IE on line 413 of dragdrop.js.
>
> > I've tried running script.aculo.us 1.8.1 with the included Prototype
> > and also with the 1.8.1 Prototype with no luck for either.  I have to
> > believe that someone has ghosting working on IE7, so what am I missing?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] IE7 crashes with ghosting enabled on Draggable

2008-09-25 Thread Kevin King

I am reasonably new to Prototype and script.aculo.us but I have a
project where dragging and dropping are crucial elements of the
solution.  Ghosting would make the drag-n-drop even better, but on IE7
everything I've tried - including the samples - generates "Object does
not support this action" messages in IE on line 413 of dragdrop.js.

I've tried running script.aculo.us 1.8.1 with the included Prototype
and also with the 1.8.1 Prototype with no luck for either.  I have to
believe that someone has ghosting working on IE7, so what am I missing?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---