View Full Version : Bang Head Here!!!!!!!

01-20-2006, 02:56 PM
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
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

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/dynamicindex5/linkfloaties.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....

Now if you want all the files to take a look at them to see what i need to do... here ya go...

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

01-20-2006, 03:55 PM
This modified function from the floatie script (used with the rest of that script and its style):

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.backgroundColor=paramexists(optbgColor)? optbgColor : floatiebgcolor
floatobj.style.width=paramexists(optWidth)? optWidth+"px" : floatiewidth
floatobj.style.height=paramexists(optHeight)? optHeight+"px" : floatieheight!=""? floatieheight : ""
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

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:

submenu0.addItem("Blythes Scott Co. Museum","javascript:showfloatie(floattext[0], '#D9FFD9', 250, 100)");

Note! The event field has been eliminated.

01-20-2006, 04:09 PM
My head thanks you kindly sir.

09-03-2008, 08:45 PM
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...