11
Daigoro
Re: Who Know Java Script Very Good For News Spotlight??
  • 2006/7/21 19:32

  • Daigoro

  • Quite a regular

  • Posts: 223

  • Since: 2003/7/3 2


I just saw the original question had allready been answered, nevertheless, you may enjoy to see som code that does what was asked for.
Here's an example of how the mouseover can be made - it's purely the framework, but it can easily be intergated into basically any template - should you need it.

<script type="text/javascript">
<!--
function 
showdiv(id){
 for ( 
x=1x<7x++) { 
  if (
== id){
   
document.getElementById("news" x).style.display 'block';
  }else{
   
document.getElementById("news" x).style.display 'none';
  }
 }
}
//-->
</script>

<
table align="center" border="1" width="400">
 <
tr>
  <
td width="300" rowspan="6">
   <
div id="news1" align="center" valign="middle" style="display:block;">This is News 1</div>
   <
div id="news2" align="center" valign="middle" style="display:none;">This is News 2</div>
   <
div id="news3" align="center" valign="middle" style="display:none;">This is News 3</div>
   <
div id="news4" align="center" valign="middle" style="display:none;">This is News 4</div>
   <
div id="news5" align="center" valign="middle" style="display:none;">This is News 5</div>
   <
div id="news6" align="center" valign="middle" style="display:none;">This is News 6</div>
  </
td>
     <
td onmouseover="showdiv(1);">News 1</td></tr>
 <
tr><td onmouseover="showdiv(2);">News 2</td></tr>
 <
tr><td onmouseover="showdiv(3);">News 3</td></tr>
 <
tr><td onmouseover="showdiv(4);">News 4</td></tr>
 <
tr><td onmouseover="showdiv(5);">News 5</td></tr>
 <
tr><td onmouseover="showdiv(6);">News 6</td></tr>
</
table>


Note: Some of the functions are already part of the xoops.js file - I just didn't use those functions here.
Best regards,
Daigoro

12
canbula
Re: Who Know Java Script Very Good For News Spotlight??
  • 2006/7/21 21:45

  • canbula

  • Just popping in

  • Posts: 42

  • Since: 2006/7/10


daigoro, it is not as simple as you've written..there are so many problems in php string functions and mysql..so i recommend everyone, use habertv module, it is depend on news module language..so there isn't any language problem

click here to download habertv module and news embed 1.44(turkish)
http://www.xoops-tr.com - Turkish Xoops

13
Daigoro
Re: Who Know Java Script Very Good For News Spotlight??
  • 2006/7/23 12:01

  • Daigoro

  • Quite a regular

  • Posts: 223

  • Since: 2003/7/3 2


The basic framework *is* as simple as what I wrote. I know, since I once did it for a site I made - back in 2004. A few hacks to the news module was needed, too.
Unfortuately I don't have access to that code now, and anyway, the version of the news module I hacked would be outdated by now.

But I understand you have a working version to use, and surely thats the one to use!
Best regards,
Daigoro

Login

Who's Online

201 user(s) are online (172 user(s) are browsing Support Forums)


Members: 0


Guests: 201


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits