Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    Default Sticky popups to show a specific default cursor?

    I tried it this way in the URL field:
    Code:
    javascript:my_close('KTEdit1');object.style.cursor = default;
    but that doesn't seem to work.

    How must it be written?

  2. #2
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Sticky popups to show a specific default cursor?

    Depends on what you are trying to achieve.
    I think you have to replace "object" with actual reference to the object that is supposed to have pointer changed.
    John.

  3. #3

    Default Re: Sticky popups to show a specific default cursor?

    I'm basically faking the bahaviour of normal popups; when you click outside of the opaque area in the popup then the popup closes automatically.

    In this case I'm using sticky popups and I have a transparent rectangle that represent the "outside" area; that has the my_close link, which I don't want to show a hand cursor.

    Currently my URL is like here:
    Code:
    javascript:my_close('KTEdit1');this.style.cursor('pointer');
    It doesn't show the correct cursor, but it doesn't wreck the link either (link works).

  4. #4
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Sticky popups to show a specific default cursor?

    I see .
    Think about it - your code sets cursor only when user clicks on it. Untill then, you still have the default one.
    John.

  5. #5

    Default Re: Sticky popups to show a specific default cursor?

    are you saying there is no way to do it (or easy way) or are you playing riddles with me in order to teach me some javascript?

  6. #6
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Sticky popups to show a specific default cursor?

    You've got it.

    I would suggest using a placeholder instead.
    Code:
    <img src="index_htm_files/blank.png" onclick="my_close('KTEdit1')" style="width:100%; height:100%;"></img>
    where:
    index_htm_files/blank.png - a link to the 1x1px 99% transparent image;
    my_close('KTEdit1') - your code.
    John.

  7. #7

    Default Re: Sticky popups to show a specific default cursor?

    Thanks, looks like something even I can understand.

    Could the same idea work if img was replaced with div and there would be no source?

  8. #8
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Sticky popups to show a specific default cursor?

    No. The empty div is transparent to clicks, so you woun't be able to click on it.
    John.

  9. #9

    Default Re: Sticky popups to show a specific default cursor?

    Code:
    <div onclick="my_close('password1')" style="width:100%; height:100%; cursor:default;"></div>
    I will do it as you say, however the above code worked with Chrome, Firefox and Safari. IE refused to handle the div that had no content.

  10. #10
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Sticky popups to show a specific default cursor?

    Quote Originally Posted by Markku View Post
    Code:
    <div onclick="my_close('password1')" style="width:100%; height:100%; cursor:default;"></div>
    I will do it as you say, however the above code worked with Chrome, Firefox and Safari. IE refused to handle the div that had no content.
    Yes. You don't need to specify the cursor in this case, it's default anyway .
    Also make sure that image you use is not 100% transparent if it is PNG. Or use transparent GIF instead. 100% transparent PNG will also click through in IE6.
    John.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •