@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> uhm... I have an object that has a member function that I would like to p*** to another function, but I want to p*** it as part of that object
<0> so when it will be called it will work in the object's scope
<0> any idea how I could do that?
<1> hmm, I don't see anything special thing you need to do to have that
<0> wouldn't this.funcName point to the same function for all objects?
<0> with out knowing the object instance?
<1> if you using prototype, all object in that "cl***" will be using the same function instance, if you make the method like this.method1 = function() { ...} all the function is a different instance
<0> I see
<0> thanks
<0> http://dumb.ro
<0> it doesn't seem to work
<0> any idea?
<1> you need to understand what is "this" in this case
<0> well, it will be the other function
<0> call() from objx
<1> and the code didn't make sense to me



<0> why?
<1> this in there is x. and alert this.x won't yield anything
<1> also this.call = function(){fn();} , don't think is correct for what you want there
<0> I can't control what's in objx
<0> that's the big problem
<1> why? i don't know why, since i have no clue what you trying to do, I just like to write safe and simple code
<0> I want to write a cl*** to simplify ajax calls
<0> so I'll have to p*** my _instance_ handler to the object
<0> and I'm pretty sure that that's how it does the calling
<1> hmmmmmm
<1> how about myajaxrequest.send({content:blah,url:blah,callBack:blahfunc});?
<0> hmm can I specify the callback in there?
<1> it is all up to you
<0> didn't knew that
<0> thanks, I'll look it up
<1> no, this is json a simple object with no "cl***"
<1> it is like you swaping the your lala at the last minute
<0> myajaxrequest is an instance of XMLHttpRequest?
<1> you suppose to write that
<1> that what you told me you are doing
<0> oh, I don't know if it will help
<1> I really have no clue. your quota is up for this morning now :D
<0> :)
<0> ht311: I got an idea ;)
<0> I could use a global variable
<0> that could be defined by each instance
<0> but still I don't know how I would get instance of the object
<1> if you are writing library code, you better layout how you will like to use it, what is the easiest way for you to use. writing pseudo code. figure out the detail after
<1> and other people people will have more idea what you are trying to do.
<0> well I already know how I want to use it
<1> as I always told my code monkey, know "what" to do first, not the "how"
<0> var a = new myAjax(callback); a.get(link); a.post(link, vars);
<0> the callback would be called after the page is received
<1> ok, what the callback may look like?
<0> function myCallback(str, xml) { alert(str); alert(xml); }
<0> myCallback is userdefined but it should take 2 params
<0> since it will be called by the myAjax handler when the loading is finished
<1> good, i kidn of kown what you are doing, so the question is ?
<0> how do I instantiate XMLHttpRequest so it will call myAjax.handler()
<0> for a given instance
<0> for example I could have var a = new myAjax(callback1); var b = new myAjax(callback2);
<1> onstatuschange = function () { if status is fine , if(a.callBack) (a,callBack(blah,blah)};
<0> hmm will a closure work?
<0> and shouldn't that be this.callback?
<1> it is as simple as creating a new function instance when you call post or get , and p*** that to the xmlhttprequest onstatuschange handler here.
<1> could be this, I jsut show an example
<0> ok, let me run some tests, I really hope it will keep the scope
<0> it works, thanks
<0> kinda weird to be honest, I wouldn't have expected it to work this way
<2> hello all
<2> anybody can help me with javascript?
<3> Depends.
<3> Do not msg me.
<3> Ask in the channel.
<2> ok
<2> this is what i have:-
<2> document.write('10 green bottles sitting on the wall' +
<2> '<BR>');
<2> document.write('10 green bottles sitting on the wall' +



<2> '<BR>');
<2> document.write('But if 1 green bottle should accidentally
<2> fall' + '<BR>');
<2> document.write('There\'ll be' + (10 1) + ' green
<2> now I need to do modification so that it uses variable
<2> Modify the code so that, instead of using the number 10 wherever
<2> it occurs, the program uses the value of a variable, called
<2> bottleNumber which you should declare and initialise to the
<2> value 10.
<2> For example the last line of code should become:
<2> document.write('There\'ll be' + (bottleNumber 1) + '
<2> green bottles sitting on the wall' + '<BR>')
<2> did u understand?
<3> Jeez.
<3> Use a pastebin next time.
<3> So what's wrong with it?
<3> Aside from the fact that you use document.write I mean.
<3> You do seem to be on the right track concerning concatenation.
<1> learn how to decrement a varaible
<2> yes, but I am comfused in putting a variable that is called bottleNumber so that the last line of the program can read as I showed
<2> were do i put the var bottleNumber & how do i do it exaclty pls
<3> Was "bottles of beer" last time I heard that song. ;-)
<2> hehe
<3> "There'll be " + --bottleNumber + " bottles of beer on the wall."
<1> that's too advance. he need to do bottleNumber = bottleNumber - 1; frist :{
<1> :P
<3> Heheh.
<2> this is what I did but i'm not having a good result
<2> HTML>
<2> <HEAD>
<2> <TITLE>
<2> Ten Green Javascript Bottles
<2> </TITLE>
<2> </HEAD>
<2> <BODY>
<2> <SCRIPT language="Javascript">
<2> can you pls tell me what & were i need to modify pls?
<3> You were kicked before your js code got through.
<2> ley me send it to iu in private since I got the feeling i will be kicked again
<3> You know... you need to start paying attention.
<3> Use a friggin pastebin. This is your final warning.
<2> tell me how to use it I dont know what it is!!
<1> http://www.google.ca/search?hl=en&q=pastebin&btnG=Google+Search&meta=
<2> ok
<2> so, did u see what I mean in the program i sent u?
<1> what to see? btw, they still teach document.write in school? that really ****s
<2> hehe
<2> i hate javescripting
<1> may be you should.
<4> Hey everyone
<4> ANYONE HERE?
<4> sheeesh
<4> ugh
<5> mmm?
<4> hiya RoBorg..
<4> Do u help users with javascript issues here?
<5> yup
<4> Umm..
<4> I got a webpage..need a code to turn the default hand cursor to crosshair when i rollover a link
<5> you can do that with CSS
<4> Yeah..I know ..
<4> I'm a noob to scripts
<4> Can u tell me the code?
<5> a:hover {cursor:crosshair}
<4> Where do i put it?
<4> sorry..i'm being annoying
<5> in <style type="text/css"> .. </style> inside your <head>
<4> : )
<4> Thanks mate..
<5> np :)
<4> Adios amigo


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #javascript
or
Go to some related logs:

javascript windows login name
#skype
#AllNiteCafe
What city is served by Narita Airport ?
mysql count weekends
disable flash in firefox
phpMyAdmin import raising limit
#MissKitten
#MissKitten
pet assembly language



Home  |  disclaimer  |  contact  |  submit quotes