This topic is locked

PoP Up Tool Tips /w Color and more made simple!

1/22/2010 10:16:37 PM
PHPRunner Tips and Tricks
C
chaintm author

My suggestions are simple..
On your page, goto HTML mode and place just after <Link REL=.....>
======================================= Before Style================================================
<script language=JScript>

var oPopup = window.createPopup();

function fnDef()

{if

(event.srcElement.id == "company")

oPopup.document.body.innerHTML = ocompany.innerHTML;

else if (event.srcElement.id == "add")

oPopup.document.body.innerHTML = oadd.innerHTML;

else if (event.srcElement.id == "phone")

oPopup.document.body.innerHTML = ophone.innerHTML;

else if (event.srcElement.id == "fax")

oPopup.document.body.innerHTML = ofax.innerHTML;

var popupBody = oPopup.document.body;

oPopup.show(0, 0, 300, 50);

var realHeight = popupBody.scrollHeight;

// Hides the dimension detector popup object.

oPopup.hide();

// Shows the actual popup object with correct height.

oPopup.show(0, 15 , 300, realHeight, event.srcElement);

}

</SCRIPT>
==========================================================BODY ELEMENTS============================================
<TD style="PADDING-LEFT: 15px; WIDTH: 342px" class=editshadeleft_b

width=326 mywidth="353"><FONT color=#7f7f7f><SPAN id=company

onclick=fnDef();>[?]</SPAN><!-- Nested DIVS inside this hidden DIV store the code

that populates the

popup object. --></FONT>

<DIV style="DISPLAY: none">

<DIV id=ocompany>

<DIV

style="BORDER-BOTTOM: black 1px solid; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#0099FF', EndColorStr='#00FFFF'); BORDER-LEFT: black 1px solid; PADDING-BOTTOM: 4px; PADDING-LEFT: 4px; WIDTH: 300px; PADDING-RIGHT: 4px; FONT-FAMILY: verdana; BACKGROUND: #ffffcc; FONT-SIZE: 110%; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid; PADDING-TOP: 4px"><B>Company

Name:</B><BR><FONT size=2>Enter the company name or business that

the coupon or discount is being offered

for.</FONT></DIV>

<DIV></DIV>

<DIV></DIV>

<DIV></DIV></DIV></DIV>Company Name:</TD>
===========================================================

NOTE

  • Color Customizable
  • Font Customizable
  • Layout freelance
    This is about as easy as it gets with customization and usability for popups. NOTE: these work even if pop up blockers are enabled on browsers as they are anchored attachments.
    You can name your elements anything you like, for the above excample say company and ocompany are used for simplisty, but you could use comp and company or whatever you like. Also you can add as many of these to a page you like, I usually have about 20 total. Once you put in the above code your next step is to fine the location of the icon and or font you want to attach it too. In my excample, I tied it before each row on a "?" question mark for the popup. I left it as is so you understand how it all functions in the real world.
    If you are not sure about the above, just cut and paste into your project the td to /td and same with the top code and put it in a page to test, you will see how it works. Best of luck!

woodey2002 1/22/2010

Thanks
Seems to work great in internet explorer but not at all in mozilla firefox,
Any ideas.
James

Phprunners N01 Irish fan

C
chaintm author 1/25/2010



Thanks
Seems to work great in internet explorer but not at all in mozilla firefox,
Any ideas.
James

Phprunners N01 Irish fan


Hmm I will have to look this up, it worked in an older version of firefox, seems currently no. I will see what I can find out.

woodey2002 1/25/2010

cool thanks again great feature