| |
| |
| |
|
Page: 1 2
Comments:
<MarkP> I am trying to change an image. It works fine in IE, but in firefox the image won't change <NeoFu7ure> uninstall firefox then <NeoFu7ure> hehehe <MarkP> blasphemy <MarkP> I'm using this line document.getElementById("image").src=document.getElementById("filename_"+pos).innerText; <furtive> innerText doesn't work in moz, it's IE only <ht311> [Torgo], the site still have caching issue, after a post , when it go back to the home page, it didn't see the updated forum posts <[Torgo]> very likely <[Torgo]> in order to fix the image flickering in the example pages i needed to enforce caching everywhere <ht311> i trying to push down that license post off the front page :D <[Torgo]> hrrm <[Torgo]> grumble grumble <ht311> he may have his point, jsut start off with a very wrong foot <[Torgo]> that really made my day :/ <furtive> yeah, not very cool <ht311> if he say that in the channel, you already slap/kick/ban him :) <[Torgo]> guess he doens't quite grasp the amount of work that went into writing 4.0 <[Torgo]> what would be my motivation to work on it for 3 years and then just give it away? <[Torgo]> ridiculous <ht311> hope it won't need 3 years for 5,0 ;) <ht311> 1 more post to go <furtive> hey [Torgo] i just watched March of the Penguins and I hate to say it but the bub has some stiff competetion from those baby penguins when it comes to cuteness. <[Torgo]> lol <[Torgo]> don't eg him on ;) <ht311> http://www.cuteoverload.com/ <furtive> http://justalittleguy.blogspot.com/ <[Torgo]> sheesh, you guys need a hobby <[Torgo]> don't make me pull out the baby elmo pic <[Torgo]> http://www.spinning-jennie.com/cats/elmo.htm <furtive> in china you are allowed one child and two pandas: http://www.pandafix.com/photos/uncategorized/1179.jpg <furtive> hehe, new cat? that is pretty cute, better put it up on http://www.kittenwars.com <ht311> missio accomplish, that post is off the front page now. ;) <[Torgo]> :P <[Torgo]> if it gets out of hand, i reserve the right to delete it altogether <[Torgo]> nite <GNeRation> hello.. what is the good syntax to use the active form elements ? <GNeRation> i don't want to precise the name of my form in forms['name'] <ht311> there is no concept of active element <ht311> you can set that manually by handling onfocus on the fields <GNeRation> onfocus on the <form> and use a JS variable ? <[Torgo]> you may be able to get away with one event on the form, yes <ht311> yes, and check srcElement of the event (different in FF) <[Torgo]> failing that you'll need to attach an event to every element using a loop <GNeRation> ok i see <GNeRation> thanks you for your help.. it's appreciate <L`0cuS> salutations matinales / morning greetings <Sa|nT> hi all <brutis> is it possible to upload files with ajax ? <Pilum> Doubt it. <Pilum> You could probably upload file content though and have your serverside script create the file. <Pilum> However, it wouldn't be like regular file upload. <brutis> ok how would i get the file content for posting ? <Pilum> Copy&paste. :-P <Pilum> You could always try with a regular file input. <skins> Anyone know of a way to do something PHP's Variable Variable in javascript? basically... got a function func(var) which is called with something like func(SOME_CONSTANT), so I get the content of SOME_CONSTANT in my var param, however... I need to know the constant as well... ideas? <L`OcuS> I can't understand <ht311> skins: you need to stop thing there is relationship between your severside script and javascript in the browser. from js point of view, all it want to know is var abc="blah"; now , you need to make the serverside to output that. var abc="${myjava_var}"; (<-jsp syntax here, replace with your php syntax <ht311> s/thing/thinking <jbanning> can anyone tell me if there is a way to increase font size or bold text within a confirm popup window? <ht311> no <jbanning> so just plain text is my only option? <ht311> yes <jbanning> bummer! <jbanning> thanks anyways! <Joske> Hi, I am working on a page where I can add div's with javascript (that works okay, i can set all the attributes I want, like height,bgcolor,...), but I want to add some onMouseOver and onMouseDown event handlers (specific for each div) to the DIV I add. How can I do that? <furtive> divRef.onmouseover = function (){//your code here} <Joske> and should it be document.getElementById(divid).onmouseover <furtive> sure, that's fine <Joske> hmmm, I first do: newdiv = document.createElement("div"); <Joske> then newdiv.onMouseOver=function(){alert("blaat"); and then document.body.appendChild(newdiv); <Joske> and the layer gets added, I can see it, but when I go with my mouse over it nothing happens <Pilum> ***uming you didn't forget the last } in your code, that's just about right <furtive> onmouseover needs to be lowercase <Pilum> Yes. Lowercase <Joske> lowercase? <Pilum> Yes. <Joske> why is that? isnt the correct syntax OnMouseOver ? <Pilum> No. <Pilum> Never was. <Joske> ah... where did I get that then? <Pilum> That's just something some people did to make it easier to read. <Joske> ah ok <Pilum> You don't have to do it that way in HTML either. HTML isn't case sensitive after all. :-) <Joske> ok <Joske> with onmouseover it works now. thanks <furtive> xhtml is case sensitive, so you're better off in the long term to leave it lowercase <Pilum> Indeed <Joske> okay. Another problem: When i add a div manually (so I really type it into the HTML code), and I add this: onMouseUp="ReleaseLayer(this.id);" it works, but when I do in the JS this: newdiv.onmouseup=function(){ReleaseLayer(this.id);} it doesnt work (i cant move the layer). Why is that? <Joske> (the ReleaseLayer function works correctly) <Pilum> Why do you p*** the id btw? <Pilum> If you use the id for getElementById, then you might as well just p*** the reference. <Joske> ah yes <Pilum> As for the question... function() { ReleaseLayer(newdiv.id); } <Pilum> Or just ReleaseLayer(newdiv) if you follow my advice. :-) <Joske> I will add that later, its a good one <Joske> but for function() { ReleaseLayer(newdiv.id); }, it doesnt work neither <Joske> I now have this: newdiv.onmousedown=function() { PickupLayer(newdiv.id); } <furtive> that's no good because newdiv won't be anything when the function is called <furtive> i'm never sure of the syntax, but you need something like newdiv.onmousedown=function(arg){PickupLayer(arg.id)} if you know what i'm saying. pilum or definitely fatbrain should be able to elaborate. <Joske> http://cpp.enisoc.com/pastebin/6653 here is the piece of code thats relevant (for actually adding the layer) <Pilum> Should apply the functions after you've added it to the body. <furtive> yeah, i agree with pilum <Joske> k <furtive> back in 20 <Joske> It still doesnt work: I posted some more code here: http://cpp.enisoc.com/pastebin/6654 <Joske> hmm, never mind, it isnt in the event handlers <Joske> the functions are cales (i tested it with an alert() inthe function) <Joske> Okay, I got it, the clou was that I had to add the newdiv.position="absolute" to the new layer... <furtive|away> it's the reference to the object from within the function <furtive|away> ah <ht311> i hope you mean newdiv.style.position = "absolute" <Joske> yes <Joske> I meant that, sorry <Joske> Is there an opposite of document.body.appendChild ? (I suppose so :) ) <RoBorg> .removeChild <furtive> .asplodeChild <Joske> ok <RoBorg> heheh <furtive> better go with RoBorg's choice ;-) <RoBorg> mine is safe for indoor use <Joske> :) <ht311> is hot today in montreal ... <furtive> yup <furtive> in an hour i'll know if i'm going back to work next week. <Joske> can you overload functions in JS? <Joske> like in JAVA? <ht311> no <Joske> pitty :( <ht311> but you can detect have you p*** in a certain parameter <ht311> function a(p1,p2) {} .... you can just call it with a(myp1); <Joske> ah ok <ht311> furtive: you sign the contract just in time ;) <furtive> yup <JasonMog> persons = xmlDoc.getElementsByTagName("name"); persons.length returns 2 but persons[0].nodeValue returns null despite the XML element containing cdata "Sanchez" <furtive> i don't know of any tag called <name> <[Torgo]> xml <[Torgo]> JasonMog, what parser? <Joske> I am making a fairly big Javascript application, that is supposed to be ran from the internet. Now I have 6 different .js files with the functions in, so I easily know wich function is where. Is that good, or should the number of .js files be limited? <[Torgo]> Joske, that's good <furtive> yeah. you can pick and chose what needs to be included in which page. <[Torgo]> JasonMog, try without nodeValue <Joske> ok... But I need every file on every page (it is becomming some kind of windows like GUI, with windows etc, so there is just 1 "page") <Joske> but then I will continue splitting up the files inthe future <[Torgo]> great idea, they will be cached <Joske> Is there another argument against NOT using global variables in JS besides the regular ones that are there for any language? <[Torgo]> used responsibly there is no problem with them <[Torgo]> you're better off placing them in your own namespace though <[Torgo]> like var globals = {}; globals.mySetting = 123; <Joske> ah yeah, that is indeed safer
Return to
#javascript or Go to some related
logs:
#php #php funnyinside;com #AllNiteCafe #linux #AllNiteCafe reddiena What sport was Boris Onishchenko caught cheating at in the Montreal Olympics ?
#c shrunkgirl
|
|