how to do mouseover to view a page in the portion

How to do mouseover to view a page in a portion of the same page ?

I think you can set onmouseover attribute of a CHtml::link (for example) and then use jquery to load the page in a div.

I found this code

http://houstoniantech.com/howto/OnmouseOverShowDIV.aspx




put in heading


	<script language="Javascript">

<!--

function toggleDiv(id,flagit) {

if (flagit=="1"){

if (document.layers) document.layers[''+id+''].visibility = "show"

else if (document.all) document.all[''+id+''].style.visibility = "visible"

else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"

}

else

if (flagit=="0"){

if (document.layers) document.layers[''+id+''].visibility = "hide"

else if (document.all) document.all[''+id+''].style.visibility = "hidden"

else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"

}

}

//-->

</script>

 

 <style type="text/css">#div1, #div2, #div3 {position:absolute; top: 100; left: 200; width:200; visibility:hidden}</style>


then




<?php echo CHtml::link('Your Text',array('site/index'),

	array(

		'onMouseOver'=>"toggleDiv('div1',1)",

		'onMouseOut'=>"toggleDiv('div1',0)",

	)); ?>

<div id="div1">Link 1 text! I've restrained the div size to 200px wide in the style declaration. Modify this to suit yourself.</div>



/* moved - not a tip, snippet or tutorial */

Just follow froccos way. This is very simple but one nice solution about tool tip issue in Yii.

With Thanks,

mrs

Hey buddy, Thanks for this piece of code. It has helped me out of a situation. I got a slight problem. I added LINK2 with a different text but it showed texts of LINK1. I did it like this


<?php echo CHtml::link('Your Text',array('site/index'),

									array(

											'onMouseOver'=>"toggleDiv('div1',1)",

											'onMouseOut'=>"toggleDiv('div1',0)",

									)); 

								?>

								<div id="div1">Welcome to csoftware , a trusted global software development company with more than 2 years of professional experience. We deliver a full spectrum of software consulting and development services to clients 


.</div>

						<br>

								<?php echo CHtml::link('another',array('company/others'),

									array(

											'onMouseOver'=>"toggleDiv('div1',1)",

											'onMouseOut'=>"toggleDiv('div1',0)",

									)); 

								?>

								<div id="div2">To non-software companies We offer enterprise application development services, systems integration, web and mobile application  development, and many other custom software development services to help you accelerate your business. </div> 






Is there something am not doing right?

I got it buddy thanks