User Profile

Collapse

Profile Sidebar

Collapse
alejandro
alejandro
Last Activity: Nov 28 '07, 12:28 AM
Joined: Mar 10 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • alejandro
    replied to Firefox/Javascript bug?
    before this:
    FF: 4563465
    IE: 3

    after this:
    FF: 4563465
    IE: 4

    Congrats :)
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to Firefox/Javascript bug?
    Why should events work in a completely different way depending on a div's overflow property?...
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to Firefox/Javascript bug?
    Nope, not at all.


    But why does it behave differently depending on the overflow of the inner div?

    Also, I looked around mozilla's bugzilla and found this little devil: https://bugzilla.mozill a.org/show_bug.cgi?id =357679
    yup, my find was just a particular case of a bigger firefox bug, I still don't know how can it be seen as a feature by any man :P...
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to How an element got focus
    yes, you are correct.
    unfortunately working on a huge project, where I just can't change the way events are handled (1.200+ files with <input onfocus="focusE vent();" /> all everywhere), but fortunately, I was able to work around the issue I had in a completely different manner :)
    thank you very much for your help :)
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to Firefox/Javascript bug?
    Also, can anyone think of a workaround for this issue? I've tried a few things unsuccessfully.
    See more | Go to post

    Leave a comment:


  • alejandro
    started a topic Firefox/Javascript bug?

    Firefox/Javascript bug?

    I just noticed that in FireFox, onmouseover and onmouseout events do not work properly when a div's overflow is set to hidden/auto/scroll. If you click and hold inside the div with onmouseover/out listeners and move the mouse away, the events won't launch (they do launch properly in IE7, haven't tested other browsers). If the div has overfloe:visibl e, the events fire as expected.

    I'll provide a working testcase:
    Code:
    <html>
    ...
    See more | Go to post

  • alejandro
    replied to Javascript alert()
    all I can tell you is this: if there is such a maximum, it's way bigger than any PC screen.
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to How an element got focus
    wouldn't work, in the onfocus function, the event type will always be focus (already tested, just in case).
    See more | Go to post

    Leave a comment:


  • alejandro
    started a topic How an element got focus

    How an element got focus

    Is there an easy way to know exactly how an element got focus in it's onfocus function? (was the element granted focus because of a mouse click?, because the user tabbed into it?, because it's focus() function was called?).
    See more | Go to post

  • alejandro
    started a topic Text offsetWidth server-side
    in PHP

    Text offsetWidth server-side

    Hi all!
    I was just wondering if there is a way in PHP to estimate the offSetWidth a text element will have when rendered.
    Nothing too accurate, maybe a function that receives a font, font size, and some text and can estimate the size in pixels the word would have client-side.
    See more | Go to post

  • No ideas? suggestions? witty remarks about the fact that I souldn't be doing this at all?
    :(
    See more | Go to post

    Leave a comment:


  • I could do that, the problem is I can't do that (client specs :P .).

    I think the way to go is offsetWidth.
    I could set the overflow back to visible, and if the div's offsetwidth is larger than what it is supposed to be, I could eliminate letters from the text within it until the offset goes back to it's default size... seems a bit ugly tho :P
    See more | Go to post

    Leave a comment:


  • alejandro
    started a topic Truncating a string depending on it's size

    Truncating a string depending on it's size

    Ok, let's say I have a 50px div that is used to display text gathered from a db, a file, or whatever. However, if the text happens to be too big to fit in the div, I want it truncated, and I want to fit as much text as possible inside the div, but also append a (...) in the end (the div's overflow is already set to hidden).

    Example words and expected results:
    OOOOOOOOOOOOOOO OOOOOOO
    iiiiiiiiiiiiiii iiiiiiiiiiiiiii iiiiiiiiiiiii...
    See more | Go to post

  • alejandro
    replied to IE7 problem when using popups
    Thank you very much for all your help acoder.
    I worked around the issue by keeping track of the active window in IE7 and only setting focus to an element within a window if the window itself has focus.

    I've found complaints about this IE behavior as old as Feb 2006 so I don't think they'll do anything about it anytime soon (heck, I'm not sure they'd even consider it a bug, they probably love having IE7 windows jumping on top...
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to IE7 problem when using popups
    you're right, it's the same thing :P
    I just noticed that it's more annoying than I thought, as any window that finishes loading will steal the focus from any other active window (word document, google Earth, or whatever you were using while the window loads.).
    The only problem is that "Logician" won't find the post now and I won't be able to read his witty remarks :P
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to IE7 problem when using popups
    It doesn't have to be a form, calling focus() for any element inside the window will cause the window to come on top.
    In the project I'm working, if a user has focus on a certain element inside the window and then clicks a link that results in a popup (taking the focus from the original element), the popup is opened and the focus is given back to the element where the user had focus.
    So, if the user selects the window again, or closes...
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to IE7 problem when using popups
    Internet Explorer 7 handle of focus()

    Ok ok ok, I know I've bothered all of you with this same issue, but I'm still angry at IE7's handle of focus()....

    In any browser, if you call the focus() function to a given element in a given window; if the window is in the background, it will remain in the background until the user selects it. When selected (or alt+tabbed), the focus will be in the desired element. In IE7, however,...
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to IE7 problem when using popups
    thanks for the link.
    I will now join Clint by saying SCREW IE 7!!!
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to Generating a Total Price in a Form
    Code:
    <html>
      <head>
        <script type="text/javascript">
        window.onload=setTotal;
        function setTotal(){
            var price  = window.document.getElementById('price').value;
            var time   = window.document.getElementById('time').value;
            var result = window.document.getElementById('total'); 
    
            result.value = price * time;
    ...
    See more | Go to post

    Leave a comment:


  • alejandro
    replied to IE7 problem when using popups
    Coded it, looks terrible, the popup loses focus for a fraction of a second before regaining it.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...