Results 1 to 3 of 3

Thread: Positioning Woes for Show Hint Script

  1. #1
    Join Date
    Apr 2008
    Posts
    32
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Positioning Woes for Show Hint Script

    1) Script Title: Show Hint Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/showhint.htm

    3) Describe problem: I can't for the life of me figure out why the horizontal and vertical offsets of the hint box from their anchor do nothing when I change them. Can someone please have a look at my page/script and see if something is conflicting with this variable? Roll over the plate of pasta for the Hint... I am trying to position the Tip to upper left of the image. The link to the page is:

    http://www.stonehouseproductions.com/cheryl_test.html

    Thanks in advance,
    Mike

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There are two major issues here. One is that another script linked later on to your page has a function with the same name as a function in the tip script, but that works a little differently. So, in the tip script, change all three instances of the word:

    clearbrowseredge

    to:

    tipClearbrowseredge

    The other is that usually the tip keys off of an anchor, but when that anchor is for an image, some browsers see the layout differently for the anchor. All browsers agree upon where the image is though. So move your onmouseover event to the image:

    Code:
    <a class="hintanchor"><img onmouseover="showhint('Please choose a username. Should consist of alphanumeric characters only.', this, event, '150px')" src="images/clear_pasta.gif" border="none"></a>
    Once these two things are taken care of, positioning the tip in any browser will be much more intuitive. But, to get things within range of what you say you want to start, use the highlighted values as shown:

    Code:
    <script type="text/javascript">
    
    /***********************************************
    * Show Hint script- © Dynamic Drive (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/
    		
    var horizontal_offset="-350px" //horizontal offset of hint box from anchor link
    
    /////No further editting needed
    
    var vertical_offset="0" //horizontal offset of hint box from anchor link. No need to change.
    var ie=document.all
    var ns6=document.getElement . . .
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Mng026 (05-09-2008)

  4. #3
    Join Date
    Apr 2008
    Posts
    32
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    You really rock. Works great..makes a lot of sense too I'm learning so much, thanks for everything.

    Mike

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
  •