@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info


Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<BilZ0r> So I'm being retarded here I know.. or more just unimaginative, but if I've got an array fileCatch[n] and some of the text it has, contains a dot "." I want to put it in another array
<BilZ0r> How do I scan the text for a dot
<BilZ0r> for(var i = 0; i < fileCatch.length; i++) { if(fileCatch[i]
<BilZ0r> and then...
<BilZ0r> ?
<BilZ0r> indexOf(".")
<BilZ0r> *duh*
<duality> does anyone here have any experience with ajax (I'm aware that some people hate this term!)? I'm having problems with accessing the XML document in javascript... It behaves kinda weird: the .toString() doesn't work, elements that I get using getElementsByTagName do not support getElementsByTagName, etc.
<ht311> my htpc running at 1080i now
<xeer> XMLHTTPRequest supports compression (basedo on the gzip header), right?
<barf|y> hey n e 1 there?
<ht311> xeer: yes, as long as the browser support it
<fatbrain> *yawn*
<eIf> hi
<eIf> what shall i use for createElement if i want to create a simple text
<eIf> not even <span></span>.. just a simple string
<ht311> var span = document.createElement("span"); document.body.appendChild(span);
<ht311> oh
<ht311> createTextNode?
<eIf> ok thanks
<eIf> createtextnode shall do it, yep
<Zefir> when I p*** object in javascript like addSmiley(frm.txt,"1") and add string 1 to txt works fine in IE but dont work in firefox any help?
<ht311> to txt ? a text file?
<Zefir> to txt (textbox)
<Zefir> my addSmiley contains x.value=x.value+y where y is the 2nd parameter
<Zefir> and x is the 1st
<ht311> in this case, seem to be the way you get the reference have issue
<Zefir> it works fine in IE what could be wrong in firefox
<ht311> any url?
<Zefir> if its uploaded?
<Crow-1> anyone know of some freeware code samples of an app that does similar stuff to the ebay website?
<ht311> Zefir: pb.html-channel.com
<Zefir> that code is generated by PHP i dont know how I will paste it
<Zefir> ht311: http://net.altlimit.com/ try this. there is a shoutbox at the right side click the smileys and it should add the text fine in IE
<ht311> document.forms["frmshout"].txtshout
<ht311> http://www.jibbering.com/faq/faq_notes/form_access.html
<Zefir> ok w8 ill check
<Zefir> hmm im getting an error thanks ill figure this out. might be some simple js errors
<Zefir> i got it to work with this method but still not working in firefox (document[frm].elements[txt].value=document[frm].elements[txt].value + smiley)
<Crow-1> Thanks guys. I'm out.
<ZRated> can someone help me out?
<fatbrain> Ask a question.
<fatbrain> hm, bad connection
<SufiBlade> see if i care, fatso :P
<SufiBlade> hihihi
<Thunder^> Hey guys :-)
<eIf> hello
<eIf> how can i make differences between two dates? for instance, '2005-01-01 12:20:31' and '2005-02-12 00:00:00'
<fatbrain> eIf: dataA.valueOf() - dateB.valueOf() gives you the timespan in ns (iirc)
<Thunder^> ns ?
<Thunder^> nano seconds?
<Thunder^> isn't it ms as in milli seconds? :-)
<fatbrain> yeah
<fatbrain> no i don't think so
<Thunder^> ns ?
<fatbrain> y
<Thunder^> hmm
<Thunder^> isn't it always "milli seconds since January the 1st 1970" ??
<fatbrain> easiliy verifeid tho, as I said... iirc ;P you verify it
<fatbrain> if the js-ref sais it's ms since 1970, then it's ms not ns, but I don't know
<Thunder^> hehe
<eIf> fatbrain i found the sol anyway, thanks
<PapaBear> ok, got strange problem
<PapaBear> trying to eval a json string, getting an syntax error at [[" <--the "
<ht311> may be somewhere else missing , or "
<fatbrain> PapaBear: that's probably because there's a " where it should be a \"
<fatbrain> hah!
<ht311> pb.html-channel.com
<ht311> hi fatbrain
<PapaBear> eval(http_request.responseText); <--the eval
<fatbrain> ht311: howdy ht311
<PapaBear> http://papa.bearcavecc.com:91/test.php?x=80&y=80 <--you can see the json string there
<NeoFuture> i wish there was another way to handle response text i hate eval
<PapaBear> yeah, eval ****s for several reasons
<[Torgo]> why are you evaling an array?
<[Torgo]> eval("var myArray = " + http_request.responseText);
<fatbrain> not that evaulating an array *should* cause an error
<NeoFuture> maybe the response it ("test", "demo", "testinG")
<NeoFuture> torgo
<fatbrain> but you should do it as [Torgo] said.
<ht311> and why inner array contain only 1 element ?
<PapaBear> dunno, using php-json
<PapaBear> thats how it encoded it
<fatbrain> haha, php-json ****s
<PapaBear> its fast... if it would work :)
<ht311> that string don't have problem in ie or ff
<PapaBear> ok... giving me a syntax error at var bgArray=
<fatbrain> PapaBear: Is the .htm using the RPC available public?
<[Torgo]> now your url contains the var ***ignment
<PapaBear> torgo, yeah copying some crap from another project over
<[Torgo]> so now you have var bgArray = var map = [
<PapaBear> http://papa.bearcavecc.com:91/jsontest.html
<[Torgo]> err......
<[Torgo]> that's wrong on sooo many levels
<NeoFuture> eval("var bgArray = array(" + http_request.responseText + ")");
<NeoFuture> WTF
<ht311> "The data necessary to complete this operation is not yet available."
<[Torgo]> yes, he's treating this as though it were asyncronous
<[Torgo]> neo, it doesn't even get to that part yet ;)
<[Torgo]> PapaBear, these are pretty advanced topics to just jump right into. I'd brush up on js a bit first
<ht311> don't , it hurt your eyes
<fatbrain> to makes things easy, make his requests synchronous.
<fatbrain> (and yes, it did hurt my eyes)
<fatbrain> I only briefly looked at the top 20lines... then I had to *ctrl+w*
<ht311> hope it is not the final code also, i don't see any html in there, even if there is html code, before onload happen, getElementById may not work also
<ht311> and .bmp as background...
<PapaBear> its just the javascript, and also based it on the IBM ajax article
<PapaBear> the images are small, converting to another format didn't save any file size, just lost detail
<[Torgo]> you only need jax though
<ht311> that's needed ? "overrideMimeType('text/xml')"
<ht311> PapaBear: it is not about image size
<PapaBear> the previous system was a python backend serving the xml data, trying to change / adapt it to php-json
<ht311> so, right now, you have problem sync/async , the eval part could be var bgArray = eval(response.responseText); or eval("var bgArray =" + response.responseText)
<[Torgo]> the second is preferred
<ht311> ic, only if it is array or any json in general?
<fatbrain> iirc, using var bleh = eval("...") doesn't work
<fatbrain> since eval doesn't return the evaulated *result* ?
<fatbrain> I know I've had trouble with this in the past.
<ht311> it does work...
<[Torgo]> it works, but it really shouldn't be done that way
<ht311> k
<[Torgo]> didn't work prior to 1.5
<ht311> ah
<PapaBear> reading up on response states
<PapaBear> momento
<[Torgo]> PapaBear, making this to hard on yourself
<[Torgo]> switch to syncronous
<fatbrain> hehe, string concatenation operator in Haskell '++'
<fatbrain> now nifty
<fatbrain> beats php's tho, but most do
<PapaBear> ok starting to get hte logic worked out
<PapaBear> ok, still getting syntax error on the eval
<fatbrain> PapaBear: it's very easy, since you'r using PHP-JSON
<fatbrain> eval("var jsonObject = " + r.responseText);
<fatbrain> alert(jsonObject);
<fatbrain> /* done */
<PapaBear> alright, now created the string myself
<PapaBear> still returning error
<fatbrain> I'd have to advice you to look for the error elsewhere.
<ht311> you still haven't switch to sync yet
<ht311> i bet the responseText is not complete at the mement you eval
<PapaBear> i set it to wait till response was complete to eval
<PapaBear> lemme scrap this ****, and start again
<Sparkle> good morning
<Pilum> Evening.
<Sparkle> http://www.nomorepasting.com/paste.php?pasteID=56238
<Sparkle> in this script, there is an if then else statment, I wonder if a wildcard can be used.
<Sparkle> if (a == 'tools') { menuclose(document.getElementById('comm')); } else { menuclose(document.getElementById('tools')); }
<Sparkle> what if I have 600+ menus, I have to write 600x600 statements so that if I open a menu, if there is one already opened it will close.
<Sparkle> 600 if statement is kinda killing to write :-s


Name:

Comments:

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






Return to #javascript
or
Go to some related logs:

+dumped you several
eeprom emulator
Cilsh
ircdough
#MissKitten
#chatzone
flashmp3_menu
#networking
#mirc
gordboy



Home  |  disclaimer  |  contact  |  submit quotes