Re: [JSMentors] Re: Does a function always keep its reference to the outer scope?

2011-04-19 Thread Sergio Cinos
I wonder... is there any way (no matter how tricky it is) to modify the variables available in the function's scope? It is possible to do something like this (using Angus example)?: inner.inject("b", "valueOfb"); //Injection in function's scope inner("console.log(b)"); //"valueOfb" Thanks, Sergio

Re: [JSMentors] Re: Delay between instructions

2011-04-19 Thread Marcelo Henrique
Hey guys, thank you, it worked. I discovered that if I use like a recursion, javascript thread will be unique. Henrique On Tue, Apr 19, 2011 at 8:33 AM, twilsoncom wrote: > Sorry, I had some extraneous brackets there, but I hope you get the > idea. > > --Tom > > -- > To view archived discu

[JSMentors] Re: Does a function always keep its reference to the outer scope?

2011-04-19 Thread Angus Croll
Short answer is yes. In fact every function (even globals) forms a closure whether its leveraged or not Here's the long answer from http://javascriptweblog.wordpress.com/2010/10/25/understanding-javascript-closures/... "When a given *execution context* encounters a function definition in the

[JSMentors] Re: Does a function always keep its reference to the outer scope?

2011-04-19 Thread Anton Kovalyov
Here is a gist with an example: https://gist.github.com/929861 Anton On Tuesday, April 19, 2011 at 3:30 PM, Anton Kovalyov wrote: > We were talking with colleagues about closures and this question came up. > When JavaScript interpreters parse a function, do they always keep its > reference to

Re: [JSMentors] Re: VJET JavaScript IDE for Eclipse just released

2011-04-19 Thread Andrei Danciuc
Also I should add as the best prototype for folding feature is Notepad++ (with js syntax enabled). If the JVET developers have needs inspiration then they can borrow logic's, architecture, pattern solution from notepad++ implementation, it also is open as I know. This is the top reason why nowaday

[JSMentors] Re: VJET JavaScript IDE for Eclipse just released

2011-04-19 Thread Justin
Hi Andrei, We currently don't support code folding for object literals but I have added a feature request for this. You can see progress here - https://www.ebayopensource.org/jira/browse/VJET-3 Great idea. Thanks for the feedback. Justin On Apr 19, 11:45 am, Andrei Danciuc wrote: > doe's this i

Re: [JSMentors] VJET JavaScript IDE for Eclipse just released

2011-04-19 Thread Andrei Danciuc
doe's this ide have collapse feature for "{ ... }" ? On Tue, Apr 19, 2011 at 6:08 PM, Justin wrote: > I am a lead for a JavaScript IDE named VJET. The project is hosted on > ebayopensource.org: https://www.ebayopensource.org/index.php/VJET/. I > welcome members of JSMentors to download and try o

[JSMentors] VJET JavaScript IDE for Eclipse just released

2011-04-19 Thread Justin
I am a lead for a JavaScript IDE named VJET. The project is hosted on ebayopensource.org: https://www.ebayopensource.org/index.php/VJET/. I welcome members of JSMentors to download and try out this IDE. It was made for JavaScript developers by JavaScript developers. This tool provides code assist,

[JSMentors] XML XSD Validation

2011-04-19 Thread Rocket
Hi all, I need help. Does anyone know javascript code, library, approach etc. to validate xml against schema? Please do not ask why I need it :). Surely it should work on any browser. -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@

[JSMentors] Re: Help on using jQuery autocomplete

2011-04-19 Thread Brandon Burch
Evan, Thank you for responding. I am looking for a drop down listing of records, (in the current incarnation) titles of journals, to appear below a text box when the user enter text into the text box. I feel it would be best to dynamically load the records as the current database table currently h

Re: [JSMentors] how to get cookie DSID ?

2011-04-19 Thread Jim Green
On 19 April 2011 12:44, Ben Barber wrote: > On Mon, Apr 18, 2011 at 11:09 PM, Jim Green > wrote: >> I need DSID for connecting to my vpn server at work. is that possible >> to have a shell/perl script that pulls the DSID from the url? > > I know you asked about shell or Perl scripts specifically,

Re: [JSMentors] how to get cookie DSID ?

2011-04-19 Thread Ben Barber
On Mon, Apr 18, 2011 at 11:09 PM, Jim Green wrote: > I need DSID for connecting to my vpn server at work. is that possible > to have a shell/perl script that pulls the DSID from the url? I know you asked about shell or Perl scripts specifically, but if you wanted to use Node.js to check the 'Set-

Re: [JSMentors] Re: how to get cookie DSID ?

2011-04-19 Thread Jim Green
On 19 April 2011 06:09, Dmitry Pashkevich wrote: > If you need to figure out the DSID when it is _assigned_ to the client by > server then you need to analyze the Set-Cookie HTTP header Thanks guys! let me try. -- To view archived discussions from the original JSMentors Mailman list: http://ww

Re: [JSMentors] Help on using jQuery autocomplete

2011-04-19 Thread Evan James Bowling
Hello Brandon, Could you please give me more details about what you are looking for? I found the documentation and demo on the jquery site. Sharing some of your code might help me to understa

Re: [JSMentors] Object name

2011-04-19 Thread Evan James Bowling
W.r.t your initial question, "how to programmatically get string name of variables?": I can only think to store all of the relevant variables in a list. If you need to call similar calls for each variable, the above syntax for dynamically defining an anonymous function seems to be the most straigh

Re: [JSMentors] Object name

2011-04-19 Thread Shreyas Subramaniam
Ah..that's a nice one. Thanks a lot! Doesnt jquery do something like this? So I'm guessing the answer to my initial question about variable names is No. Shreyas On Tue, Apr 19, 2011 at 6:45 PM, Poetro wrote: > 2011/4/19 Shreyas Subramaniam : > > Thats how I would do it for a regular AJAX call.

Re: [JSMentors] Object name

2011-04-19 Thread Poetro
2011/4/19 Shreyas Subramaniam : > Thats how I would do it for a regular AJAX call...but I am looking to make a > JSONP call. Thats where the problem arises. > Create unique functions... for example: var generateFunction = (function (window) { var uid = 0; return function (instance, callback)

[JSMentors] Re: Delay between instructions

2011-04-19 Thread twilsoncom
Sorry, I had some extraneous brackets there, but I hope you get the idea. --Tom -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive, visit here: http://www.mail-archive.com/jsmentors@

[JSMentors] Re: Delay between instructions

2011-04-19 Thread twilsoncom
If you're trying to add a number of elements at 3 second intervals then you'll want to use setInterval() or else increment the time on the setTimeout(). So your function onclick is either: function(){ var count = 0; var myInterval = setInterval(function(){ //Append the element

Re: [JSMentors] Object name

2011-04-19 Thread Shreyas Subramaniam
Thats how I would do it for a regular AJAX call...but I am looking to make a JSONP call. Thats where the problem arises. On Tue, Apr 19, 2011 at 3:56 PM, Asen Bozhilov wrote: > Shreyas Subramaniam: > > > var foo = function() { > > //some class > > } > > > > foo.prototype.makeJSONPCall = function(

Re: [JSMentors] Object name

2011-04-19 Thread Asen Bozhilov
Shreyas Subramaniam: > var foo = function() { > //some class > } > > foo.prototype.makeJSONPCall = function() { > } > > foo.prototype.responseHandler = function(str) { > this.value = str; > } > > var a = new foo(); > var b = new foo(); > var c = new foo(); > > So, a.responseHandler needs to be the

[JSMentors] Re: how to get cookie DSID ?

2011-04-19 Thread Dmitry Pashkevich
If you need to figure out the DSID when it is _assigned_ to the client by server then you need to analyze the Set-Cookie HTTP header -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive

Re: [JSMentors] Delay between instructions

2011-04-19 Thread Steven Yang
i think there is a miss understanding. either setTimeout(imprime, 3000) or setTimeout("imprime()", 3000) will be the same because imprime() is in quotes as in a String, even though the former should be used. i think what Bissu want is to have a delay between every $(body).append() if thats the ca

Re: [JSMentors] how to get cookie DSID ?

2011-04-19 Thread Poetro
2011/4/19 Jim Green : > Hello Jsmentors: > > this is my first post here: > > I can type > > javascript:alert(document.cookie) in the url bar to get the DSID. > > I need DSID for connecting to my vpn server at work. is that possible > to > have a shell/perl script that pulls the DSID from the url? >

Re: [JSMentors] Delay between instructions

2011-04-19 Thread Rob Griffiths
your setTimeout call is slightly wrong. try setTimeout(imprime, 3000); When you add the brackets, the function is invoked straight away instead of being called by setTimeout Rob -- Rob Griffiths http://bytespider.eu https://github.com/bytespider -- Rob Griffiths Sent with Sparrow On Monday, 1

[JSMentors] Help on using jQuery autocomplete

2011-04-19 Thread Brandon Burch
Afternoon all, I have been trying to code an autocomplete with the jQuery autocomplete for a textbox. I would like to have autocomplete's source get its data from a pagemethod. I have already coded the pagemethod on the code behind page, and I am getting the desired results. I would like the resul

[JSMentors] Delay between instructions

2011-04-19 Thread Bissu
Hi, I am trying to use settimeout, delay (jquery) or even a wait function implemented, and any of these provide me what I need. I would like to put a delay between some instructions, for example: $('#btn_update').click(function(){ var t=setTimeout("imprime()",3000); }); function imprime

[JSMentors] how to get cookie DSID ?

2011-04-19 Thread Jim Green
Hello Jsmentors: this is my first post here: I can type javascript:alert(document.cookie) in the url bar to get the DSID. I need DSID for connecting to my vpn server at work. is that possible to have a shell/perl script that pulls the DSID from the url? Thanks! Jim -- To view archived discus