Results 1 to 4 of 4

Thread: Bang Head Here!!!!!!!

  1. #1
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Question Bang Head Here!!!!!!!

    Ok, here's what i can figure... I just need to repeatedly pound my head against a wall until the answer comes to me... I am using a menu that I like, but the code is somewhat trivial all around... but I am using an "AlertBox" to display contact info of members on the site I am building, good idea 2 save space, but not so good an idea to save my poor head. The problem I keep running into is that inside of this submenu0.addItem("This is a members name","javascript:alert('and this is thier contact info')"); now something that small works just fine... but when you get into

    This is a members name
    Mailing Address:
    HC 67 Box 63
    SomeTown, BS 42069
    Directions:
    3 miles south on Highway 69B
    then 8 miles east on Highway 420
    Telephone: 555.420.6969


    putting all of that inside of the alertbox and getting it to align like that is a diff story... I can't use any </br><p><ul><li><ol> NOTHIN... so i have been using the good old fashioned & n b s p just without spaces between each character.and I have been using them in exponential amounts.... to created the formatting effect I needed... now the problem is I use IE6 and it all looks fine on my end... i had someone look at it in firefox and she saw every single one of those & n b s p on the site... it read them as text instead of as a stroke of the spacebar.... and she also viewed it in IE6 and said on her end it looked more like this.....

    This is a members name
    Mailing Address:
    HC 67 Box 63
    SomeTown, BS 42069
    Directions:
    3 miles south on Highway 69B
    then 8 miles east on Highway 420
    Telephone: 555.420.6969

    So what i'm gettin at is I was goin to try to use one of the DHTML tooltips on this site instead of an alertbox... but i can't figure out how to get the script to call the function to use the tooltip.... here is the tooltip i would like to use.... http://www.dynamicdrive.com/dynamici...nkfloaties.htm

    showfloatie('<b>I\'m the king of the world!</b>', event)


    and here is an example of the attempt i had made... *note this was after already pasting the script in that page into the head of my page....


    submenu0.addItem("This is a members name","javascript:showfloatie('and this is thier contact info', event)");
    along with many other variations of the same.... or difff i can't seem to figure it out... here is the addy so you can see what i am talkin about....
    http://www.waldronar.com/Test/index.html

    Now if you want all the files to take a look at them to see what i need to do... here ya go...
    http://www.waldronar.com/Test/transmenu.js
    http://www.waldronar.com/Test/transmenu.css
    http://www.waldronar.com/Test/styles.css

    that plus the index.html are all the files that the menu needs to function... NE Ideas?

  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

    This modified function from the floatie script (used with the rest of that script and its style):

    Code:
    function showfloatie(thetext, optbgColor, optWidth, optHeight){
    var dsocx=(window.pageXOffset)? pageXOffset: ietruebody().scrollLeft;
    var dsocy=(window.pageYOffset)? pageYOffset : ietruebody().scrollTop;
    var floatobj=document.getElementById("dhtmlfloatie")
    floatobj.style.left="-900px"
    floatobj.style.display="block"
    floatobj.style.backgroundColor=paramexists(optbgColor)? optbgColor : floatiebgcolor
    floatobj.style.width=paramexists(optWidth)? optWidth+"px" : floatiewidth
    floatobj.style.height=paramexists(optHeight)? optHeight+"px" : floatieheight!=""? floatieheight : ""
    floatobj.innerHTML=thetext
    var floatWidth=floatobj.offsetWidth>0? floatobj.offsetWidth : floatobj.style.width
    var floatHeight=floatobj.offsetHeight>0? floatobj.offsetHeight : floatobj.style.width
    var winWidth=document.all&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
    var winHeight=document.all&&!window.opera? ietruebody().clientHeight : window.innerHeight
    floatobj.style.left=dsocx+winWidth/2-(floatWidth-5)/2+"px"
    floatobj.style.top=dsocy+winHeight/2-(floatHeight+5)/2+"px"
    slowhigh(floatobj)
    }
    Will work. The script's style should be edited to suit (for appearance) and the z-index value change to 300.

    With all that, this type of syntax may be used in the menu code:

    Code:
    submenu0.addItem("Blythes Scott Co. Museum","javascript:showfloatie(floattext[0], '#D9FFD9', 250, 100)");
    Note! The event field has been eliminated.
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    My head thanks you kindly sir.

  4. #4
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    Wow, Google Analytics found this post for me. LOL

    I was browsing through all the "in" links to my site, and happened to stumble upon this post. Kind of funny to look back on the questions you asked a long time ago and they seem so stupid now.

    What I've learned in two years' time...
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

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
  •