| |
| |
| |
|
Page: 1 2
Comments:
<0> hello.. im making a texteditor.. and im going to insert text into a form by clicking some image-buttons.. <1> thats just great! <0> it works fine with sendText() ..but im not sure how to insert several times <0> heh..thanks <1> youre sending into <textarea> ? <1> anyway <0> yes <1> ok <1> then just use innerHTML <1> and <1> var actualtext = document.getElementById('yourTextAera').innetHTML; <1> or mabe better will be <1> var actualtext = document.getElementById('yourTextAera'); <1> var at = document.getElementById('yourTextAera').innerHTML; <1> at.innerHTML = at+"\n"+newtext; <0> mkey ill check that out.. danke schn
<0> is it possible to mark a text and make it strong ? <0> with js <2> yes <2> js and css <0> do you know of any tutorial on that spesific function? <2> not a function it's a style property <0> but how do I identify whats marked? <0> or selected <2> o <2> so you have text.. and the client selects the text.. let's go and it become bold? <0> select text, hit a bold-button-thing... voila <2> mmk <2> one sec <2> let me try it really quick <0> document.getSelection() probably ? <2> yeah <2> you looking at <2> http://www.quirksmode.org/js/selected.html <2> ? <0> yes, reading it right now <2> it doesn't tell you how to modify that text <2> but look up styles specifics <3> hiya <4> yop@all <5> im using prototype.js and when i get a word called mn from my db, it is put into the innerHTML as m?n <5> any ideas why ? <6> Charset mismatch. <5> how do i fix it? <5> if i output the result by submitting form to a new page, then its fine <7> Hi, anyone know a substitute for the "scrollTop" attribute that works in Opera, and lets me scroll a div? <7> Does anyone know of a substitute for the "scrollTop" attribute that will work in Opera, to let me scroll a <div> ? <7> Anyone? =) <1> how to check the miage width ? <1> image.width ? <1> and will that be 0 unless the image is loaded ? <1> Pilum, ? :/ <6> Try it? <1> i tried. <1> http://pastebin.com/745214 <1> i always get the 0 <1> i dont see anything wrong in here, but im lame in js... <8> of course not <8> if you don't have the width set <8> use offsetWidth instead <1> sk8ing, its an image <6> So? <1> how to i use offsetwidth in an image ? <8> you compare it to 0? <1> hm <1> wait <6> s/document.getElementById(/document.images[/ <1> e ? :/ <1> (document.images['wykres']) ? <1> brb :/ <4> 'night@all <9> hi <9> ok, I've just now started with javascript and run into my first problem <9> I want to use setInterval, however, I'm alway getting "[function] is not defined", although it is defined... what does that mean? <6> What's your code?
<9> sec <9> http://pastebin.com/745367 <6> setInterval(function() { switchColor(z++) },3000); <9> 'k, so using code instead of a function... although in my book it says that I could also use a function... but let's see is this works <6> Code instead of a function? That is a function. :-) <9> seems to work, because I'm getting a different error now :) <9> ah, I know... :) <6> setInterval("switchColor(" + z++ + ")",3000); is an uglier hack for it. <9> ah... hmm.. javascript internals I'm not used to so far ;) <9> ok, now that new problem... :) It executes once, then tells me: "spaceholder.parentNode has no properties, line 44" <9> so I added: <9> statusMsg.setAttribute("id","spaceholder"); <9> but that doesn't do it <9> well and the parent node should be the body tag anyway... why would it have any properties after execution of the code? <6> alert(spaceholder) when you run it. Make sure it doesn't change. <9> 'k <9> ok, so the first time it says HTMLDivElement and the following times nothing at all... <6> Hm. That's odd. <9> yeah :) <9> so it's not even undefined... <6> Probably deletes the node on replaceChild then. <9> but shouldn't it create a new one?, <9> ah! <6> You don't make a new reference <9> I think I know <9> exactly, onload is only called once <6> Aye. <9> I'll try smt <9> h <6> No wait. Of course it's not undefined. It's just not in the document tree. <6> You replace it with the same node. But the 2nd time it's already replaced - and you're trying to do the exact same operation. <9> hmm.. isn't the problem, that I'm using body onload="document.getElementById("spaceholder"), and that the second time... no... :) argh... I'm not grasping it <9> ok <9> now I do <9> :) <9> ok, great, now the error message is gone but nothing happens :) I'll try to figure it out some more by myself... <9> there seems to be a problem with the getFontColor function <10> hi <6> Hello. <10> i need to put hex values in an Array put that code isnt working <10> var DataString = new Array(); <10> DataString = [0x63, 0x01, 0x00, 0x6d, 0x00, 0x03, 0x61, 0x64, 0x64, 0x49, 0x00, 0x00, 0x00, 0x02, 0x49, 0x00, 0x00, 0x00, 0x05, 0x7a]; <10> what is the right way to do this ? <1> im back <9> if(spaceholder.parentNode){ <9> 44 spaceholder.parentNode.replaceChild(statusMsg,spaceholder); <9> 45 } else if (statusMsg.parentNode){ <9> 46 statusMsg.parentNode.replaceChild(statusMsg,statusMsg); <9> 47 } else alert("no parentnode to statusMsg"); <9> that doesn't seem to work either... <9> i guess it cannot replace itself by itself <9> eh, with itself <6> Indeed. <1> Pilum, how do i get the actual width of an image, not the width="x" one ? <6> offsetWidth <9> Ok, trying something entirely different <1> it definately doesnt work :( <6> Works for me. <1> i mean it works, but not like i wanted to, and i dont know why <1> i have a div, with "loading...." text, have the display:none; for the image until its loaded, but, somehow, the div doesnt appear too .... <1> http://pastebin.com/745541 <6> lint_: Looks right to me. <1> from my observations offsetWidth is > 0 when the image is not loaded <9> ok <9> ;) <9> it was all about the style.fontColor :) <9> great, looking for an error where there was none <8> pieg: set the width in the css <8> or the width property of the img tag <8> it should affect the offsetWidth too <1> OMG <9> Pilum: so in fact, "statusMsg.parentNode.replaceChild(statusMsg,statusMsg);" works <1> if(im.offetWidth == 0) { <1> setTimeout("imageloaded('"+img+"')",200);
Return to
#javascript or Go to some related
logs:
#linux brigikee MMORPG server io completion ports cable internet tweaking #MissKitten #linux #MissKitten #AllNiteCafe #AllNiteCafe #chatzone
|
|