| |
| |
| |
|
Page: 1 2
Comments:
<VaranG|aN> what does the appendChild means? <sk8ing> it adds a child element to an object <VaranG|aN> an element cannot be directly added like document.createElement ? <sk8ing> nope, that just creatas it <sk8ing> you'll have to add it after you create it <sk8ing> *creates <sk8ing> any idea how I can hide the fact that I'm loading data from the server in the background? <sk8ing> like ajax does? <ht311> you won't get the answer even you ask 100 times <ht311> i do know a way <sk8ing> you do? :) <sk8ing> but I won't get the answer? :)) <ht311> "write your own browser" <sk8ing> at least there is hope <sk8ing> oh, cool <exacube> lawl <VaranG|aN> sk8ing: you have to learn Ajax I think <sk8ing> yeah, I think so <VaranG|aN> I use AJAX but microsofts one <VaranG|aN> the CallbackReference <sk8ing> CallbackReference? <sk8ing> what's that? <sk8ing> I know what's a callback function <VaranG|aN> document.appendChild(document.createElement('img_Fire').src = "./Images/Weapons/fire.JPG"; ---- whats wrong with this ? <sk8ing> ); <sk8ing> you forgot a ) <sk8ing> tho <sk8ing> it shouldn't work <sk8ing> it will return "./Images/Weapons/fire.JPG" <sk8ing> to appendChild <VaranG|aN> ? <sk8ing> document.appendChild(document.createElement('img_Fire').src = "./Images/Weapons/fire.JPG"_)_; <sk8ing> and it's not correct in my view <sk8ing> cuz src is a string <sk8ing> and operator = <sk8ing> should return "this" <sk8ing> => you have document.appendChild("./Images/Weapons/fire.JPG"); <sk8ing> but I don't know that much js... I don't know if this rule applyes in here <sk8ing> ah <sk8ing> and img_fire is not an element <sk8ing> x = document.createElement("img"); x.name = "img_Fire"; x.src = "thatsource.jpg"; document.appendChild(x); <VaranG|aN> IC very much thankful <ht311> var e =document.createElement('img');e.src = "./Images/Weapons/fire.JPG";document.appendChild(e); <VaranG|aN> about callbackreferences btw its found in the ASp.net 2.0 <sk8ing> ah, I see <VaranG|aN> to a control add javascript attributes <ht311> oh, damn window scroll <sk8ing> :) <sk8ing> .net requires too much resources <sk8ing> that I don't have <sk8ing> I'll keep away from .net at least for another 2-3 years <VaranG|aN> it wasn't displayed ...though no errors were given <sk8ing> hmm... are you sure the path is correct? <sk8ing> hmm... isn't there a way to send a real object as response to an ajax call? <sk8ing> or I'm stuck with serializing stuff by myself? <rocki> make a text-input active by clicking a href, thats javascripting? <[Torgo]> sure <rocki> im not sure if its a good or a bad thing to do, but its for a form-validation, when errors show - the error-message activates the spesific input <rocki> onclick <[Torgo]> just be sure to check it on the server too, in case js is turned off <rocki> the form-validation itself? <[Torgo]> yes <[Torgo]> never rely on js <rocki> oh yes its properly secured <rocki> so I just put a id to the input, and do a onclick="do-stuff" on the href? <rocki> its supposed to works almost as a <label for=""> <rocki> something like onclick="document.formname.inputname.focus();" ? <alexino25> hello buddys <alexino25> who knows a good tag editor for javascript <alexino25> more good than altova ? <sk8ing> tag editor? <scaver> Hi, i've got this problem triggering an event programatically with the el.click() call. <scaver> I have this DIV that i, div.innerHTML = "<a id="x" onclick="dosomething">; <scaver> Later i do a document.getElementById('x').click(); but nothing happends, checked by having an alet in the function that onclick calls. <scaver> So i wonder, is it possible to build a DOM like that and fire an event? <Demonen> Are you sure the generated <a> is working at all? <scaver> Yes, it is displayed in the page and i can manually click it (with mouse). <scaver> But, maybe i should build the <a> with document.createElement("A"); instead? <Demonen> That's what I'd do, anyway. <Demonen> Mind you, I'm no expert <Demonen> not by far :D 2 weeks into JavaScript <Demonen> Do you have an URL to the page? <Demonen> Maybe I can spot the problem. <scaver> Nope, we're behind firewall. <scaver> thanks anyway, ill just test it more. <rocki> pastebin <scaver> nah, its too complex scripts to ask for anyone help. takes to much time so get into. <scaver> hm, doesnt el.click() work in ff? get "el.click is not a function" <scaver> http://rafb.net/paste/results/RW5Xya72.html <scaver> stripped down the problem code. <scaver> See that the onclick event happend after one mousedown and one mouseup, maybe i should try to el.mousedown();el.mouseup(); ? <Demonen> Why don't you make a function out of whatever happens when you click, and call that function instead? <Demonen> onclick="callFunctionHere()" <Demonen> callFunctionHere () { /*do useful stuff*/ } <Demonen> Is there any way I can request that the browser executes an external command? This, ofcourse, is a security risk, but can I ask the client/user for permission? <scaver> I need the event object for positioning. <Demonen> scaver: P*** the event? <Demonen> calFunctionHere(event) <Demonen> ? <scaver> hm? <scaver> thinking of maybe trying to get rid of the event object, and position it relative to elements. <Demonen> I don't know, but most other objects can be p***ed as arguments. <scaver> anyway, i havent made the code and it looks like a rats***. think i'll try to do a complete rewrite of that part of the system. <Demonen> I allways end up doing that, no matter the language :) My code usually has enough occurances of "FIXME" to scare off Bill Gates <Demonen> It's usually because I code before I think. <andrewh> Hi, I have a page that has a number of select boxes on it with each box having id = selection[x] where x is a number. Is there a way to use javascript to go through and get me a reference to each of these boxes so that I can check if they are "checked" or not? <scaver> Hm, is it possible to raise the mousedown/mouseup events needed to fire the onclick handler of an element? so i can programitcally fire the event with, el.click() <scaver> The problem is that the onclick is generated with a mousedown/mouseup sequence. <scaver> What object detection can i use to determine IE 6 or less? need it to know where to apply alphaimageloader to fix PNG issue in IE. <scaver> don't want to use the navigator object. <scaver> document.all exists in Opera, but not i FF. hm. anyone? <scaver> Isnt it some properties that only IE implements? <scaver> var isIE = document.all != null && ! window.opera; <scaver> Any problems with that one? works in ie, ff and opera. <scaver> setTimeout(cancelHideQuestionHelp = false, 500); how do i set that variable 500ms later? <scaver> "myVar = value" ? <scaver> hm, are events "threaded"? <scaver> my script seems to only be working when i have some alerts to slow down the process. <sk8ing> scaver: call a function with setTimeout() <sk8ing> and then recal setTimeout() on the same function <Demonen> or setInterval? <Demonen> mind you, setInterval will fire again and again until stopped. <Demonen> hey vebbe{LA} <Demonen> bye vebbe <optocus> is there a function in JS that checks a string if it matches a regex? or searches a string for a regex? <Demonen> somestring = /regularexpression/; <Demonen> somestring.match(someothermatch) <Demonen> if (somestring.match(thisvariableneedstomatch)){ <optocus> thanks Demonen <Demonen> anytime <Tarantino> if I have a bunch of variables that consist of c#(c1, c2, c3, c4)- how do I set y = #? <Tarantino> i need y to be equal to the number afther c <Tarantino> y = x.charat(1) <Tarantino> thanks:-P <YIN-YANG> how would I grab the previous url and reload/refresh it. <[Torgo]> history.go(-1) <YIN-YANG> that simple? <[Torgo]> no <[Torgo]> requires 400 more lines <YIN-YANG> it doesn't reload the url..just back one. <YIN-YANG> is there a refresh and reload? <ht311> i don't think that is possible. security issue <LLAMAHERDER> Is there a way to have javascript dynamically highlight multiple items from a multi-enabled HTML select list? I tried googling, but maybe I'm not looking for the right thing. <LLAMAHERDER> Actually I am thinking I just don't have the right function. I've got the looping and everything else done. I just can't figure out the code to pick multiple items. <YIN-YANG> hmm...think I got a work around. <YIN-YANG> Thanks anyways torgo <ht311> LLAMAHERDER: loop the myselectElmRef.options , in each option there, set the .selected = true or false accordingly <LLAMAHERDER> So that will highlight more than one at a time then? <LLAMAHERDER> If that can indeed select more than one, then I must be doing something else wrong. :) That's what I tried right off the bat but it just does one. I'll keep plugging away. <LLAMAHERDER> Thanks for the info ht311. <ht311> you need to enable multiple selection on the select
Return to
#javascript or Go to some related
logs:
enron embezelment cockraoch and disease distcc over dsl #asm #teens ir-razzet florin salam- iar am puso otto dirlewanger #skype What is the capital of the Canadian province of Ontario ?
|
|