Advertisement

[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

07/05/2003 at 02:40PM PDT, ID: 20669465
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Text pop up on MouseOver along with fitting background image to window

Asked by rsalunkhe in Web Images

Tags: text, popup, mouseover, image

HI,

I am trying to get the effect of a text pop up on MouseOver event. I have the code for this from some website, used it in some of my pages and it works.

But now what i am trying to do is incorporate that effect in a page which has another effect--- that of making the background image resize as per the window size. The solution to this later part can be found at -

http://www.experts-exchange.com/Web/Graphics/Web_Images/Q_20526046.html

I have implemented that at http://web.njit.edu/~ras5/trial4.html

Now the problem is when i try to comdine both the effects i do not get the MouseOver text box. When i remove the code of background effect the text box does come. So i guess the text box hides behind the background when both effects are present. I do not know how to solve this problem.

The page containing the code for both the effects i am trying to achieve is at http://web.njit.edu/~ras5/trial.html

You can see the implementation of the code and the manner in which i am trying to achieve it by right clicking and viewing the source. Though the stretching of background is achieved.....the text pop up on mouseover does not appear when the mouse is over the first image.

Below i have given the individual codes for each effect-

-------------------------------------------------------------------
For stretching background to window size--

<style type="text/css">
#backPic {
z-Index:0;
display:block;
position:absolute;
display:block;
left:0%;
top:0%;
width:100%;
height:100%;
}
/* make it sticky in non MSIE 5/6 */
html>body #backPic {
   position:fixed;
}
#tbl {
border:2px solid red;
display:block;
z-index:2;
position:absolute;
left:0%;
top:0%;
width:100%;
/* for CSS2 browsers */
min-height:100%;
}
h1 {color:red;}
</style>
<script language="JScript">
<!-- /* MSIE only JScript !! */
function fixBgImage() {
if (document.all.backPic.style.setExpression) {
 document.all.backPic.style.setExpression("height","document.all.tbl.offsetHeight");
 document.recalc();
}
}
ie5 = (document.all && document.getElementById && !document.fireEvent)?true:false;
ie55= (document.all && document.fireEvent && !document.createComment)?true:false;
ie6 = (document.all && document.fireEvent && document.createComment)?true:false;
if (!window.opera && (ie5 || ie55 || ie6)) onload=fixBgImage;
// -->
</script>
<body topmargin="0" leftmargin="0">
<img src="images/castlecopy.jpg" id="backPic" width="640" height="480"  >


-------------------------------------------------------------------


-------------------------------------------------------------------
For getting pop up text box on MouseOver--
<DIV ID="dek"></DIV>

<SCRIPT TYPE="text/javascript">
<!--

//Pop up information box II (Mike McGrath (mike_mcgrath@lineone.net,  http://website.lineone.net/~mike_mcgrath))
//Permission granted to Dynamicdrive.com to include script in archive
//For this and 100's more DHTML scripts, visit http://dynamicdrive.com

Xoffset=-60;    // modify these values to ...
Yoffset= 20;    // change the popup position.

var old,skn,iex=(document.all),yyy=-1000;

var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all

if (ns4)
skn=document.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;

function popup(msg,bak){
var content="<TABLE  WIDTH=150 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>";
yyy=Yoffset;
 if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
 if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
 if(ie4){document.all("dek").innerHTML=content;skn.display=''}
}

function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
skn.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
skn.top=y+yyy;
}

function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}

//-->
</SCRIPT>

Usage example-
<td width="33%" align="center">
      <a href="../../images/pics/misc/assorted/frisbeechamps.jpg"
      ONMOUSEOVER="popup('Playing frisbee','lime')"; ONMOUSEOUT="kill()">
      <img border="2" src="../../images/pics/misc/assorted/frisbeechamps_small.jpg" xthumbnail-orig-image="../../images/pics/misc/assorted/frisbeechamps.jpg" width="100" height="117"></a></td>
 

-------------------------------------------------------------------

View the Solution FREE for 7 Days
 
Keywords: Text pop up on MouseOver along with …
Title
1 fatal error
 
Loading Advertisement...
 
[+][-]07/05/03 05:40 PM, ID: 8862367

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/05/03 07:26 PM, ID: 8862615

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/07/03 07:29 AM, ID: 8869631

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/14/03 06:50 PM, ID: 8921994

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/19/03 10:00 PM, ID: 8960728

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/23/03 07:20 AM, ID: 8986429

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/23/03 09:16 AM, ID: 8987628

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Web Images
Tags: text, popup, mouseover, image
Sign Up Now!
Solution Provided By: r_linux
Participating Experts: 4
Solution Grade: A
 
 
 
Loading Advertisement...
20090617-EE-VQP-62