| |
| |
| |
|
Page: 1 2 3
Comments:
<0> well yeah <1> There are uses for both. <0> !empty() <0> you know what I was trying to say <2> I dont <0> I'm sorry <2> You better be! <1> empty() is true for '',0,'0',null,false... :-) <0> ;) <3> and I have my own version of empty() in js <2> ooh, show me the function definition <3> return true for null, undefined, and "" <2> oh... you disappointed me, I thought it was going to be more involved than that
<0> anyways pilum what do you think about the if (obj.value != '') {} <1> Nothing wrong with that. <2> It ****ing works, leave it alone <2> You did a good job, the only thing that could make it better is if you indented the code <3> watch the language <2> and if you put the { on a new line; but that's personal preferance <3> JC^Omega , for formfieldref.value, it won't return null or underfined, so it will be fine, worst case, you may want to trim the string while you checking that. <0> I think I may adjust my regex as well.. \d also includes "-" and other things <0> so 27682-029 matches <2> you could try /[0-9]{9}/ <0> yessir that works <4> any event gurus around? <1> Depends on how you define guru hehe. <4> or even event-knowledgable people <4> yeah <4> k, i'm having trouble with some mouseover/mouseout stuff <4> care to hear me out? <1> Just state your problem. <4> k, situation is that i have a bunch of rows in a table, and when the user rolls the mouse over the row, it should swap out the value in the row, which is just a text node, with a SELECT element. <4> and then when they roll off it should swap it back to the text node <4> so i use the mouseover event on the TD tag to show the select box <4> but if i use the mouseout event to hide the select box, then it gets hidden when they move the mouse over the select box <4> since the mouseout fires on the TD tag when they move the mouse onto the SELECT box <4> so how should I go about hiding the select box? <4> if I use the mouseout on the select box, then it won't go away, cause the mouseout fires, the select box goes away, but then the mouseover fires on the TD tag and the select box gets shown again <1> Set its display to 'none' perhaps <4> well i know how to hide it, but just not when to hide it <1> Ah. <1> Sounds like a bubble problem. <4> yup <4> that's what it sounds like to me too <4> but i'm not too good with the whole bubbling thing <1> I think quirksmode had something on that. <4> i read that, but i still don't entirely get it <4> which is why i was hoping to talk to someone who understood it better... <4> hmmm, there's something about an originalTarget, that might be what i need... <1> There is target/srcElement <4> yeah, i tried playing with that, but have the same trouble <1> Haven't really entirely figured out the IE model myself though. <4> heh, i hear ya... <4> well i'll try that originalTarget thing, hope it works in IE and FF <1> http://www.quirksmode.org/js/events_order.html - seems there's something to turn off bubbling too though I never experimented with it personally <4> yeah, i'm just reading it <4> the problem is the mouseout gets fired even though it's still on the same element, it's goofy <4> so we have a select in a div <4> why would mouseout fire on the div when we move over the select <4> it makes no sense <4> i can understand why mouseover would fire on the select, then bubble up to the div
<4> but why would mouseout fire on the div <4> that's the one that gets me <3> I am sure is about target/srcElement <4> oh cool, there's a section on that page about getting the new element on a mouseout <4> using relatedTarget/toElement <4> i think that's it <3> I know why mouse out fire too, the box on the text is bit strange, when your curor leave the text, it fall in the space outside the characters, it will fire a mouseout, I think it happen on link or text with no background <4> i think you're right ht311 <4> so i need to see where it's going <4> which is what that relatedTarget/toElement thing does i think <4> brilliant, that's what i needed <4> hah, and to no one's surprise, it doesn't work in IE... <4> damnit <1> Hehe. <3> don't think you need that to solve your problem <4> but IE has mouseenter and mouseleave events that might help me <4> but damn, i thought there'd be a simpler cross browser solution <3> you have page runing somewhere? <4> nope, unfortunately not <0> arg our stupid mail servers <3> anyway, I think you just need to handle onmouseover, no need to touch onmouseout, remember which row last time you over. check if is the same as last time onmouseover fired <4> but if they move off the table <4> i need to hide the select box <4> so i need to look at onmouseout <3> handle onmouse out then, do stuff when srcElement is the table <4> but there's other columns in there too <4> nah, gotta be the mouseout way my friend <3> but it is your page, have fun ;) <4> i know <4> but the thing is, they're little widgets that appear in the table <4> so i want them to be modular <4> they're in a table with a bunch of other stuff <4> just certain cells, if you mouseover they become select boxes <4> so i don't want the table to be in control <3> is not the table in control. you can route all/most event handler to one function, let it decide on what to base on the row type, column type etc <4> still not modular enough <4> for my liking <4> i almost have it, except stupid IE doesn't set toElement if you move from the select box to one of the options... <4> anyone know how to determine if a SELECT box is "open", ie the options are displayed, through javascript? <3> that is well known too. the select is a native window control. <3> you can't <4> not through the size or anything like that? <3> you have to handle onclick and onkeypress yourself <4> geez, that's silly <3> it is not. just the way it is. <4> heh, well in my humble opinion, not being able to get the state of a form element is silly... <4> "that is well known too." <4> hah <4> condescending much? <5> greetings <0> win 6 <5> I'm looking for a way to dynamically add form inputs w/ javascript <1> document.createElement <4> _eci: http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/ has a great example of doing just that. <5> cheers
Return to
#javascript or Go to some related
logs:
invalid conversion from `void*' to `HBITMAP__*' #networking kif taqbad ma tfajla quotes quiet women strclass.cpp #linux g php editor svn debugger you must finish this sentence before you can read the next #AllNiteCafe officeopener
|
|