Re: [OT] Javascript in HTML events

2006-03-11 Thread Niall Pemberton
On 3/11/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > On 3/11/06, Niall Pemberton <[EMAIL PROTECTED]> wrote: > > > > Yes but you have to create an object and assign it to your "aaa" var > > first, > > before assigning a variable value such as "bbb" > > > > Try > > var aaa = {}; > > > > Ni

Re: [OT] Javascript in HTML events

2006-03-11 Thread Michael Jouravlev
Frank, I am sorry you took time checking this. I guess, this recommendation "Optimally, the reply should be to the thread started by the original question posting, and should have 'FIXED', 'RESOLVED' or an equally obvious tag in the subject line." from http://www.catb.org/~esr/faqs/smart-questions.

Re: [OT] Javascript in HTML events

2006-03-11 Thread Frank W. Zammetti
Weird, I can't explain that. I just did this as a test: xhr = null; function test() { if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } xhr.onreadystatechange = handler; xhr.open("post", "test.h

Re: [OT] Javascript in HTML events - RESOLVED

2006-03-11 Thread Michael Jouravlev
Resolved. Sorry to type the question before searching thoroughly. For POST request I had to set content-type header: ajaxRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); Michael. On 3/11/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > I am cleaning up my Javascr

Re: [OT] Javascript in HTML events

2006-03-11 Thread Michael Jouravlev
Thanks, Frank. I guess I need this book :) Before I get it, allow me one more question. I have a working XHR using GET (target is full URL with query params): ajaxRequest.open("GET", target, true); ajaxRequest.send(null); Now I want to switch to POST (url is base URL, params contain request

Re: [OT] Javascript in HTML events

2006-03-11 Thread Frank W. Zammetti
The Manning AJAX In Action book has an appendix that covers a great many of these useful techniques. Even if you have zero interest in AJAX, I haven't seen many books or articles that covers Javascript as well as this one. I consider myself fairly well-versed in Javascript, and even I picked

Re: [OT] Javascript in HTML events

2006-03-11 Thread Michael Jouravlev
On 3/11/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > On 3/11/06, Niall Pemberton <[EMAIL PROTECTED]> wrote: > > > > Yes but you have to create an object and assign it to your "aaa" var > > first, > > before assigning a variable value such as "bbb" > > > > Try > > var aaa = {}; > > > > Ni

Re: [OT] Javascript in HTML events

2006-03-11 Thread Craig McClanahan
On 3/11/06, Niall Pemberton <[EMAIL PROTECTED]> wrote: > > Yes but you have to create an object and assign it to your "aaa" var > first, > before assigning a variable value such as "bbb" > > Try > var aaa = {}; > > Niall I figured out how to do this by reading the beginning of the dojo.js.u

Re: [OT] Javascript in HTML events

2006-03-11 Thread Niall Pemberton
Yes but you have to create an object and assign it to your "aaa" var first, before assigning a variable value such as "bbb" Try var aaa = {}; Niall - Original Message - From: "Michael Jouravlev" <[EMAIL PROTECTED]> Sent: Saturday, March 11, 2006 8:34 AM I am cleaning up my Javas

[OT] Javascript in HTML events

2006-03-11 Thread Michael Jouravlev
I am cleaning up my Javascript code. First I made all functions having prefix, so they won't mix with others' functions. Then I noticed that DOJO uses one global variable dojo, and defines everything including functions inside it. I thought that was cool, and tried it myself, but it does not work.