Looking up event listeners.

 
Strube: Meh i figured it oout

Schellenger: Windows doesn’t allow these characters /:*?” included in a file name, so if a string contained any of these characters, I want to replace it with _ , I write this //:*?”/g as the regexp , is it right ?

Mate: Ankr: string ‘hello__world______’

Lahmann: IMath you want to replace “” as well?

Housemate: Ankr: this is what I am wondering about , is there a need to escape it even when it is within ?

Vafiades: Is there any way JavaScript can know if I am on my home computer or laptop computer, when visiting my page?

Wareing: JAvaScript has access to that information?

Friskney: My googling said no, but maybe i am wrong

Offen: I have a cl*** that should create an event listener that would call an outside object method, but I get “cannot read property ‘x’ of undefined”. I’m giving the cl*** the object reference, I can call methods of the outside object, but as soon as I try to do it from a eventlistener it seems to break. Any ideas?

Miles: If anyone has an idea, please ping me :

Osaile: Offen: Show the code.

Marsalis: Ankr: yes,I do want to replace “” as well

Rachlin: Squeakytoy: try ident.me

Meisenburg: Oh, using a third party solution

Rachlin: I don’t remember, do they have proper CORS or not, but you may try to get page via ajax

Rachlin: It’s only ip, but you can differentiate by this

Greif: IMath this seems to work

Mate: Ankr: string ‘_________’

Juel: Ankr: is there a need to escape even when it is within ?

Vining: Anyone bored and want to help a newbie with a JS problem? I need to make a To-Do list: it needs to have a form with one text field, one button, and one list item under the form. When the button is clicked the text in the input field needs to be added as a new item to the list. I know a little, but my book isn’t helping much. Here is what I have so far: http://pastebin.com/bkFVr6xt

Templer: IMath otherwise you are just escaping the next character

Vining: It posts the one list item correctly, but the text field won’t post the text to the list.

Goldmann: Ankr: so it is needed ?

Offen: Havvy: https://jsfiddle.net/n3e8tt9s/

Brogan: Vining: so you can show us ur problem directly

Nurnberger: Vining: will attract a lot more people to take a look at it, than a pastebin :p

Lesnick: Offen: Change this.onClick to this.onClick.bindthis

Mate: Ankr: string ‘________’

Mate: Offen: If a function call is of the form a.b, this will be the object you accessed the “b” property from. Otherwise, if it’s of the form a, this will be undefined, which is turned into the global object if the function wasn’t defined in strict mode. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this http://javascriptweblog.----escape_autolink_uri:a03ded6cd97ffffa8f7b4e1454f3eecc----.com/2010/08/30/understanding-javascripts-this/

Raftery: IMath Otherwise that — Your “” is effectively escaping the “/” instead of being part of the group.

Dovenmuehler: Vining: http://jsfiddle.net/z9tec42b/

Lulic: Vining: what u wanna do exaxctly now as next step?

Vining: I need the input field to add a new item to the list.

Sattel: Ankr: thanks very much!

Fonck: Vining: u should take a look at event listeners then

Offen: Havvy: this does, the bind stuff doesnt

Shubrooks: You have to register an event listener on the button click

Jarrar: Offen: It creates a new function that forces this to be whatever the first argument is.

Vining: Or, should I leave the action ” ” blank, as it is, Xatenev?

Cornog: Effectively. var bind = function fn, thisBinding { return function .args { return fn.callthisBinding, args; }

Vining: Looking up event listeners in the book now to refresh my memory