| |
| |
| |
|
Page: 1 2 3
Comments:
<NeoFu7ure> anyone here <NeoFu7ure> ht311 ? <NeoFu7ure> ht311 you here need your input <ht311> ? <NeoFu7ure> got a problem i need to solve <ht311> let's see <NeoFu7ure> winList['win3'] is my array yeah <NeoFu7ure> win3 win4 win73463767 win6 blah blah <NeoFu7ure> i have set winList['winID'].trackId to a incremental variable <NeoFu7ure> if i do for(var i in winList){alert(i);} <NeoFu7ure> there all in order of winList <NeoFu7ure> ie <NeoFu7ure> win3 win4 win6 win734636767 <ht311> yes ... <NeoFu7ure> i need them listed in the order of the winList[elm].trackId <NeoFu7ure> i cant for the life of me get it to work <ht311> actually, winList is no longer an array, it become a hash table <NeoFu7ure> yeah its the hash of each window see the ID is relative to the module opened in to it <NeoFu7ure> but trackId should be the order they apear on the task bar <NeoFu7ure> so ive got to some one hash sort by trackId <ht311> the quick and easy way will be an array to hold the tracker id, so that you can short that easily <NeoFu7ure> to much to change to do that :( coded into a corner <ht311> or dynamic build that array, sort and return the name array <ht311> you don't have hundreds of windows, so it will be fine <ht311> the code sound slow and stupid, but in this case, it will be very ok <ht311> jsut need to loop twice <NeoFu7ure> yah <NeoFu7ure> i think ill try that <ht311> http://abcnews.go.com/Video/playerIndex?id=1528162 <NeoFu7ure> AGAGAGHH i cant get this to work <ht311> post some code for me to see? <NeoFu7ure> http://pastebin.com/517017 <NeoFu7ure> needs to order by winList[''].trackId <NeoFu7ure> i tried to keep a running array with taskList[trackId]=winId <NeoFu7ure> but when it rebuilt the array it was all out of order <NeoFu7ure> christ knows whu <NeoFu7ure> why <ht311> http://pastebin.com/517029 <ht311> something like that.. <ht311> that in your render, you call this and loop the name to get the winList[winame] <NeoFu7ure> huh <ht311> ? <NeoFu7ure> sorry i dont understand the function so i dont understand the implemntation <ht311> http://pastebin.com/517040 <NeoFu7ure> yeah i get that bit <NeoFu7ure> oh hang on <NeoFu7ure> am i incorrect <NeoFu7ure> i should be able to do this <NeoFu7ure> http://pastebin.com/517043 <ht311> http://pastebin.com/517044 <ht311> yes <NeoFu7ure> mo dont work <NeoFu7ure> object required :( <ht311> need to replace the i with winList[namearr[i]].trackId too <ht311> try to get the 1st function work first <NeoFu7ure> :'( <ht311> sleep on it ;) <ht311> my function work or not? <NeoFu7ure> yes <ht311> good, just touch up your function then ;) <ht311> winList[namearr[i]] this one give you back the window ref? <ht311> heh <NeoFu7ure> http://pastebin.com/517055 <NeoFu7ure> so you can see what i did use <NeoFu7ure> **** in hell <NeoFu7ure> it dont work :( ffs <ht311> can put var winname = newwinList[i]; in the begining <NeoFu7ure> ffs this is pissing me off now <ht311> if you take out all the inline style, and adjust the style for ff, should kind of work <NeoFu7ure> for some reason is reusing elemnts in the array <ht311> thqat behhaviour is document some there. related the loop optimzation <NeoFu7ure> ill debug tommorrow far too tired now <ht311> nite <NeoFu7ure> im not going yet lol <ht311> ;) <ht311> just in case, i'm going to load the dishwasher <NeoFu7ure> yeah its not working <NeoFu7ure> for(var i in newwinList){ <NeoFu7ure> is not doing them in trackId order <ht311> my code use for(var i <ht311> i use that for normal array <NeoFu7ure> um its correct sort of <NeoFu7ure> 1 <NeoFu7ure> 11 <NeoFu7ure> 2 <NeoFu7ure> 3 <NeoFu7ure> 4 <NeoFu7ure> 44 <NeoFu7ure> 5 <NeoFu7ure> 6 <NeoFu7ure> 7 <ht311> crap <ht311> put parseInt in my function then <ht311> didn't know it's a string <NeoFu7ure> where <ht311> http://pastebin.com/517065 <NeoFu7ure> yeah already did that <NeoFu7ure> its the same <NeoFu7ure> 1,10,11,2,3,4,5,6,7,8,9 <NeoFu7ure> could it be my for(var i in newwinList){ <ht311> oh, i use for(var i=0 ..... for flat array <ht311> i only use for(var i in ... for object) <ht311> afk <NeoFu7ure> same <NeoFu7ure> idarr.sort(); maybe ? <ht311> could be, i suspect the array content is string if not, .sort is buggy <NeoFu7ure> nah its numeric cause its from an increment <NeoFu7ure> and ere parseInt ing it <NeoFu7ure> ill try tommmorrow <ZRated> how can i submit from a checkbox onclick? <ZRated> how can i submit form, from a checkbox onclick? <ZRated> hmm how can i submit a form from onclick? <eIf> hello <eIf> how do i reach an opened window? <Pilum> With the reference variable. <eIf> can you give me an example? <eIf> i do window.open ('file.html', 'windowName'); <eIf> how do i reach windowName ? <Pilum> You don't. <eIf> uh <Pilum> var windowreference = window.open(...) <eIf> oh i see <eIf> cool <eIf> so windowref is my window object, right? <eIf> hehe workin <eIf> thanks a lot <eIf> but i guess it won't help me that much.. <eIf> as i need to call it whenever i want, even when i browse server-side <eIf> :\ <eIf> so you say that's the only way? <Pilum> As long as you don't just want to change its url, yes. <Pilum> You could probably establishing a reference by opening the window anew though (by using the same name). <eIf> Pilum to change the url of which window? <eIf> the opener's or the opened's? <Pilum> The opened. <eIf> i'm not changin the url of the opened <eIf> i have a chance to identify'it this way or? <Pilum> As long as you know the name <eIf> i do know <eIf> i'm just opening it with window.open ('file.html', 'windowName');. how couldn't i?:) <Pilum> And you can't ***ign that to a variable? <eIf> nope, because i may somewhere else from the opener <eIf> i do window.open from this.html and by any time i may browse to that.html <eIf> and from that.html, let's say, i need to reach my opened file.html <NeoFuture> bloody JS sort <NeoFuture> its stupid if you dont set a function for it to search <NeoFuture> ie without function 1,10,12,3,4,7,76,8,9 <NeoFuture> with <NeoFuture> 1,3,4,7,8,9,10,12,76
Return to
#javascript or Go to some related
logs:
#AllNiteCafe calc.exe+asm #chatzone omg amanduh pirate draik #chatzone RD1072A bookakke
#AllNiteCafe HELO hass
|
|