Re: [Proto-Scripty] element is null - say what

2011-06-13 Thread Walter Davis
Does your field have the ID attribute set to 'zip'? If it's working in IE, that's a strong bet that it doesn't, but that it does have the name set to 'zip'. Element.getValue() and $F() need a valid (properly- formed and unique on the page) ID for their magic to happen. If you can't add an

Re: [Proto-Scripty] element is null - say what

2011-06-13 Thread Walter Davis
form but I had made those changes. Event.observe('ajzip', 'keyup', cities); label class='column' id='labzip' for='ajzip'5 Digit Zip:/ labelinput type='text' name='zip' size='5' maxlength='5' id='ajzip' class='required validate-digits' On Mon, Jun 13, 2011 at 11:12 AM, Walter Davis wa

Re: [Proto-Scripty] how-to add option to select

2011-06-08 Thread Walter Davis
JSbin is a popular way to show working examples. Gives you a persistent URL and you can edit it and demo it right in the browser. Walter On Jun 8, 2011, at 3:19 PM, Phil Petree wrote: Where are ya'll posting the demo code? -- You received this message because you are subscribed to the

Re: [Proto-Scripty] how-to add option to select

2011-06-08 Thread Walter Davis
wanted to stick all the source modules up. On Wed, Jun 8, 2011 at 3:28 PM, Walter Davis wa...@wdstudio.com wrote: JSbin is a popular way to show working examples. Gives you a persistent URL and you can edit it and demo it right in the browser. Walter On Jun 8, 2011, at 3:19 PM, Phil Petree

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Walter Davis
Your function is using add() to add an option to the end of the select, but I have never seen that work completely myself. Best to stick with the long-hand methods, they are at least known to work in most browsers: menu = $('mySelectList'); menu.options[menu.options.length] = new

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Walter Davis
; ijson.options.length; i++) { var szValue = json.options[i].value; var szDisplay = json.options[i].text; addOption('city', 'New York', 'New York'); } } On Tue, Jun 7, 2011 at 5:08 PM, Walter Davis wa...@wdstudio.com wrote: Your function is using add() to add an option to the end

Re: [Proto-Scripty] how-to add option to select

2011-06-07 Thread Walter Davis
On Jun 7, 2011, at 9:00 PM, Phil Petree wrote: Matt Walter, You are both right... Ajax.Updater is, apparently, trying to update the select AFTER it calls onSuccess and since it is incapable of updating a select it was thereby overwritting my adds... no problem, once I figured that

Re: [Proto-Scripty] Re: A bit of assistance please

2011-06-03 Thread Walter Davis
On Jun 3, 2011, at 11:21 AM, Eric wrote: On Jun 1, 4:33 pm, Walter Davis wa...@wdstudio.com wrote: On Jun 1, 2011, at 10:19 AM, Eric wrote: On May 31, 5:51 pm, Walter Davis wa...@wdstudio.com wrote: On May 31, 2011, at 11:12 AM, bill wrote: I need the scroll of the div contents only

Re: [Proto-Scripty] Re: A bit of assistance please

2011-05-31 Thread Walter Davis
On May 31, 2011, at 10:57 AM, bill wrote: On 5/30/2011 11:22 AM, Eric wrote: Hi Bill, Using Event.PointerX() and Event.PointerY() you can get the absolute position of the mouse on the page. Using Element.Layout you can get the exact position of your image. If you substract the layout's

Re: [Proto-Scripty] Re: A bit of assistance please

2011-05-31 Thread Walter Davis
On May 31, 2011, at 11:12 AM, bill wrote: On 5/31/2011 11:06 AM, Walter Davis wrote: On May 31, 2011, at 10:57 AM, bill wrote: On 5/30/2011 11:22 AM, Eric wrote: Hi Bill, Using Event.PointerX() and Event.PointerY() you can get the absolute position of the mouse on the page. Using

Re: [Proto-Scripty] Strange behaviour of innerHTML

2011-05-13 Thread Walter Davis
Maybe those browsers don't expose getters and setters as if they were attributes. What you're coding in your new Element call is equivalent to this: div innerHTML=hello/div IE has lots of bugs around attributes and methods clashing. Try naming a submit button submit some time and

Re: [Proto-Scripty] Text selections

2011-05-09 Thread Walter Davis
Selecting all text in a textarea is as simple as $ ('theIdOfTheBox').select(); I have written an example that works with any text on the page, inspired by the New York Times' definition widget. http://scripty.walterdavisstudio.com/lookup Walter On May 9, 2011, at 10:33 PM, kstubs wrote:

Re: [Proto-Scripty] IE Sortable issue

2011-05-03 Thread Walter Davis
the list each time you re- order the list. Walter On May 2, 2011, at 5:06 PM, Walter Davis wrote: This is where the Self Contained Failing Test is useful. Try to make a static HTML version of your assembled page at the point where it fails. Use Firebug's inspector to see the rendered HTML

Re: [Proto-Scripty] IE Sortable issue

2011-05-02 Thread Walter Davis
What is the HTML structure that you are sorting? Is it an UL with sortable LIs, or another structure? Walter On May 2, 2011, at 11:11 AM, Audrey wrote: I have a problem with the sortable function in IE (I've tested both 7 8). It does not occur in Firefox or Chrome. What is happening is

Re: [Proto-Scripty] IE Sortable issue

2011-05-02 Thread Walter Davis
formatted result set that I want users to be able to re- sort as necessary. Thanks for your help, Audrey On Mon, May 2, 2011 at 1:28 PM, Walter Davis wa...@wdstudio.com wrote: What is the HTML structure that you are sorting? Is it an UL with sortable LIs, or another structure? Walter On May 2

Re: [Proto-Scripty] Re: FInd and iterate over ProcessingInstruction nodes?

2011-04-28 Thread Walter Davis
/ com On Apr 28, 3:26 am, Walter Davis wa...@wdstudio.com wrote: That would work if I was grepping through the source, but I'm trying to pick this thing out of the DOM so I can hook onto it and add a visible element near it. I can't seem to find a way to access it there. Thanks for the suggestion

Re: [Proto-Scripty] Re: FInd and iterate over ProcessingInstruction nodes?

2011-04-28 Thread Walter Davis
Aha, I just read further, and it appears this won't work for what I'm doing, which is in part creating a valid XHTML branch to build epub documents, PrinceXML PDF documents, etc. from. I could certainly strip these out when building those iterations, but I guess I'll keep looking and see

Re: [Proto-Scripty] Template to element

2011-04-28 Thread Walter Davis
You can insert it, and it will be instantiated into the element you desire, assuming that it is valid HTML after it's been evaluated, and you're inserting it into a spot in the DOM where that makes sense. For example, a TR inside a TBODY or THEAD, a SPAN inside a P... If you want to make

Re: [Proto-Scripty] Re: FInd and iterate over ProcessingInstruction nodes?

2011-04-27 Thread Walter Davis
That would work if I was grepping through the source, but I'm trying to pick this thing out of the DOM so I can hook onto it and add a visible element near it. I can't seem to find a way to access it there. Thanks for the suggestion, though. Walter On Apr 27, 2011, at 8:32 PM, kstubs