@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11



Comments:

<0> only good for spying on XHR? its built in Javascript debugger is absolutely essential
<1> hey all
<1> does somebody know how I can test if an onclick handle exists on a element?
<1> like if (inputs[1].onclick) { inputs[1].onclick(); }
<1> but that code desn't work
<2> MaartenB, if it is set with element.onClick then you could try element.getAttribute
<2> but that won't work with addEventListener
<2> afaik it's not possible to detect eventlisteners added
<1> it is set in the html with onclick =
<2> should be possible with getAttribute then
<2> your condition probably works
<2> just not your inputs[1].onclick()
<2> you can't do that
<2> onclick is an attribute not a method
<2> oops, event handler
<2> don't listen to me



<1> I am a bit confused with all that
<1> :)
<1> what can I do with this, should I do if (inputs[i].getAttribute('onclick')) ?
<1> yeah, works
<3> I have a script that takes position X,Y(taked from mouse) and put a div at that position. When my scrool is down i have a problem and the div is created at that cordenates. Somebody know how to fix this?
<4> Anything see anything wrong with <input id="test" type="hidden" value="plz work"> and then doing something like function test() { info = document.test.value; alert(""+info+""); } ?
<5> yes
<5> id's are not global document references
<5> use document.getElementById('test').value
<4> Ok, what if the browser doesn't support that? Should I do a check and have two functions?
<4> Well, what about input tags?
<4> Like <input id="test" value="somedata"> and then <input id="test" value="someotherdata"> all in one page?
<6> this is not working onclick="window.location(../test.php)"
<6> this is used in xul
<4> hmm, that gives me "null" is there something I can do instead?
<7> any gay *** niggas up in dis bitch?
<8> what should I do if I have an error in the scriptaculous library and I dont know how to fix it?
<9> Stop using scriptaculous or ask the devs
<10> is there some reason why I can't set element.innerHTML in a table in ie?
<9> Coz innerHTML is bad and broken
<8> ok
<10> Woosta: is there any other way to acheive the same effect?
<11> Is there a good way to create a select list in javascript?
<11> I need to let the user select how many inputs they want to fill out, and each input area has a text box and a select
<9> wyvern: if each is the same, I'd look at cloneNode
<11> okay.
<11> Next question: once i have an option node (like, document.createElement('option') and I've given it a 'value' attribute, how do i set the text for it?
<9> yourOption.appendChild( document.createTextNode( 'the Text' ) ); is the domish way
<11> ok
<9> but I think you can also do yourOption.text = 'the text' .. but don't hold me to that
<4> is there a way that I can ***ign an id to multiple elements?
<11> will cloneNode also clone child nodes?
<4> and get the value from all of them?
<9> Akiyuki: No. That would be pointless.
<10> Woosta: any alternatives to innerHTML in a table?
<9> wyvern: read the docs and don't be lazy :)
<9> megasquid: yes, use the DOM
<4> Well... what do you suggest? making an array or something?
<11> Woosta: where should I read about this?
<4> i want to get the value of a bunch of different elements and store them.. but i dont want to manually name them all because there will be too many
<10> Akiyuki: give them a cl*** name
<4> and then take the .value of the cl*** id?
<9> wyvern: http://ref.isite.net.au/dom/cloneNode
<11> great, thanks
<9> Akiyuki: how are you creating the bunch? Via JS?
<4> perl...
<4> but JS will load it
<9> OK, then yeah, a cl*** is the go
<4> so stuff = document.something.cl***id.value; ?
<12> I'm trying to write a script that loads 10 URL's in a row....anyone know how that's possible?
<9> Then get chino[dev]'s getElementsByAttributes and get all the elements of that cl***: var myInputs = getElementsByAttributes( { cl***Name: /\byourCl***\b/ }, yourFormOrDocument );
<9> YaroslavVB: no idea what you mean
<9> Akiyuki: then, loop over myInputs and get the .value
<4> Hmm, why the regexp?
<4> var stuff = getElementsByAttributes("mycl***"); ?
<6> this is not working onclick="window.location(../test.php)"
<9> Akiyuki: coz that's how you match against cl*** name
<4> oh
<4> lame :(
<9> bony: window.location isn't a function



<9> Akiyuki: no, not lame .. it's the way the function works .. cl***Name doesn't HAVE to only have one cl*** in it
<9> If you're certain that is does, then just p*** the string
<6> Woosta, i want to call test.php when i click the menu item
<6> Woosta, i am using xul
<9> var myInputs = getElementsByAttributes( { cl***Name:"yourCl***" }, yourFormOrDocument );
<9> bony: I don't use xul (yet) but window.location = blah ... it's an attribute
<4> <form id="plz">
<4> and then in my script.. var blank = getElementsByAttributes( { cl***Name: /\bmycl***\b/ }, plz );
<4> ?
<6> ok so you mean this will work window.location="test.php"
<9> Akiyuki: document.getElementById('plz') or the shorthand 'plz' .. but not as a bareword
<9> bony: something like that will work
<6> Woosta, ok i will try
<4> oh
<4> var blank = getElementsByAttributes( { cl***Name: /\bmycl***\b/ }, 'plz' );
<4> so that's fine?
<9> yes
<11> anyone happen to know how to make a special character (e.g. greek) show up in an <option> in a <select>?
<9> getElementsByAttributes is chino[dev]'s library for getting an array of elements matching criteria matching strings, regexen or functions: http://chino.homelinux.org/projects/getElementsByAttributes.html
<9> buubot: getElementsByAttributes
<13> Woosta: getElementsByAttributes is chino[dev]'s library for getting an array of elements matching criteria matching strings, regexen or functions: http://chino.homelinux.org/projects/getElementsByAttributes.html
<9> wyvern: make sure your doc is served in an appropriate charset
<14> "Akiyuki" at 66.180.175.30 pasted "hmm.. needs help?" (13 lines) at http://erxz.com/pb/2080
<9> Eh .. what's with the action? And you'll need to load the getElementsByAttributes library
<4> Oh, I didn't know that...
<9> You also have to have a name on all form elements
<4> so each tag needs id= ?
<9> action="" onsubmit="test(); return false;"
<9> No, each input needs a NAME
<4> ty
<4> How do I load the library?
<4> Do I need to download it?
<9> yes
<9> THen in the top of your file put <script type="text/javascript" src="getElementsByAttributes.js"></script>
<11> Woosta: the encoding's fine, sine i can see the entity in body text
<4> ty
<15> i would like to display a few tables of data with functionality such as sort, totals, % of total, along with a few charts/graphs of the same data, I am inclined to keep my data in javascript arrays and instantiate my tables and graphs from those arrays on the client's browser...does this technique have any obvious problems, is there any data which shows the limits of this technique in terms of the amount of data?
<9> wyvern: I'm not talking entity .. I'm talking actually typing a mu in the source
<11> oh
<11> no i'm just using an entity
<9> But it's not working right?
<11> the weird thing is when I type in the entity by hand in a test html doc, it shows up fine
<11> but when i generate it with js, it doesn't work
<9> yes ..
<9> JS doesn't insert text via entities .. entities are HTML
<14> "Akiyuki" at 66.180.175.30 pasted "hmm how about this?" (19 lines) at http://erxz.com/pb/2081
<11> Woosta: but if I'm adding a text node whose contents are an entity, shouldn't that work?
<9> no
<9> You're not injecting HTML, you're creating an element via the DOM
<11> oh.
<11> yep, that worked. Thanks.
<11> makes sense now.
<16> is there a simple way (maybe an existing script/lib) to remove url-unsafe characters from a string?
<4> Woosta, see anything wrong with that? :(
<9> trym: you just encodeURI them: http://ref.isite.net.au/js/encodeURI
<16> but I want to remove them
<16> not encode them.. is that easily done?
<9> What do you want to remove though?
<16> unsafe characters
<16> Im writing my own function
<9> LOL .. what are 'unsafe'?
<7> BULLETS
<16> the ones that usually needs escaping/encoding
<7> MIND BULLETS
<16> I just need answer to one thing, and it will work. How do I return character n of a string?
<7> THE KIND THAT DO DASTARDLY DEEDS
<9> Just do yourString.replace(/[&+\/]/,'') .. no need for a function .. just put everything you consider 'unsafe' in there
<7> tell woosta his mama got a fat ***
<7> now...... if you have an xml document, what decodes it? the dtd?
<16> Woosta: ah nice
<16> if I already have the characters in a var.. would I do .replace(myvar,'') ?
<9> No .. .replace( new RegExp( yourVar, 'g' ), '')
<16> ah
<16> does Error: invalid ***ignment left-hand side mean my regex is invalid?


Name:

Comments:

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






Return to #javascript
or
Go to some related logs:

#gentoo
parsing a touple
2.6.15-1.1833_FC4 dlm-kernel
#lisp
css underlapping hover
AHCI vxWorks
openbsd apache chroot mod_perl
freebsd rx byte ifconfig
#ai
grub-reboot doesn't work ubuntu



Home  |  disclaimer  |  contact  |  submit quotes