Click here to Skip to main content
16,004,906 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: debaging or some other problem Pin
Paddy Boyd12-Jan-07 3:40
Paddy Boyd12-Jan-07 3:40 
Questioni want to genrate a secured attractive and high featured website Pin
Member 365409512-Jan-07 0:41
Member 365409512-Jan-07 0:41 
AnswerRe: i want to genrate a secured attractive and high featured website Pin
Paddy Boyd12-Jan-07 4:02
Paddy Boyd12-Jan-07 4:02 
GeneralRe: i want to genrate a secured attractive and high featured website Pin
Bradml12-Jan-07 17:17
Bradml12-Jan-07 17:17 
AnswerRe: i want to genrate a secured attractive and high featured website Pin
Christian Graus13-Jan-07 12:20
protectorChristian Graus13-Jan-07 12:20 
QuestionHow to host Web applications efficiently Pin
suvarna joshi11-Jan-07 10:53
suvarna joshi11-Jan-07 10:53 
AnswerRe: How to host Web applications efficiently Pin
Sachin Pimpale11-Jan-07 18:45
Sachin Pimpale11-Jan-07 18:45 
QuestionJavascript DIV fade question Pin
ladyramses11-Jan-07 10:49
ladyramses11-Jan-07 10:49 
I have a layout here: http://www.roomofrequirement.com/js

and if you click on the nav buttons at the top a div layer fades (well the background fades in). What I want it to do is after the first fade in, the background stays in place and only the text pops up once another button is clicked. So if I click on the site button first, the background fades and it stays there when I click on books, but only the text changes.

Is that possible?

Here is my code:


var ie4 = !!document.all
var w3c_dom = !!self.HTMLElement
var nc4 = !!(!w3c_dom && window.captureEvents)

if (w3c_dom && !ie4) {
document.writeln('&lt;script language="JavaScript" src="dom.js"></sc'+'ript>')
ie4 = true
}

var dhtml = (ie4 || nc4)
var local_delay;
var opacity;

// End

var active_page = 0

var visible, hidden
if (ie4) {
visible = "inherit"
hidden = "hidden"
}
else {
visible = "show"
hidden = "hide"
}

var pages_loaded = false
var layerTimerID = null
var pages = new Array()

function layerOver(num)
{

if (!dhtml || !pages_loaded)
return

opacity = 0;
//layerTimerID = setTimeout("layerChange(" + num + ")", delay)
layerChange( num );

}

function layerOut() {
//if (layerTimerID)
// clearTimeout(layerTimerID)
}

function layerChange(num) {
layerTimerID = null

if ( opacity == 20 )
{
var p_old = pages[active_page]
p_old.visibility = hidden
if ((w3c_dom) && (active_page != num))
p_old.display = "none"

active_page = num
var p_new = pages[active_page]
p_new.visibility = visible
//if (w3c_dom)
p_new.display = "inline"

p_new.filter = "alpha( Opacity="+opacity+" );"; // IE
p_new.MozOpacity = opacity/100; // Mozilla

opacity++;
layerChange();
}
else
{
//alert( "halt" );
opacity += 5;

pages[active_page].filter = "alpha( Opacity="+opacity+" );"; // IE
pages[active_page].MozOpacity = opacity/100; // Mozilla

if ( opacity < 100 )
layerTimerID = setTimeout("layerChange(" + num + ")", 40)
}
}

function initLayers()
{

if (!dhtml)
return

//document.writeln('<DIV id=' + ("layer" + page_max) + ' class=page><h2 align=center>Place the mouse pointer over the above links.</h2></DIV>')

for (var i = 0; i <= page_max; i++)
pages[i] = (ie4) ? document.all["layer" + i] : document.layers["layer" + i]

if (nc4)
page_height = 0

if (!page_height) {
var p_height
if (ie4)
p_height = pages[0].offsetHeight
for (var i = 0; i <= page_max; i++) {
var p = pages[i]
p_height = (ie4) ? p.offsetHeight : p.clip.height
if (p_height > page_height)
page_height = p_height
}
}
else {
for (var i = 0; i <= page_max; i++) {
pages[i].style.pixelHeight = page_height
pages[i].style.overflow = "auto"
}
}
if (ie4) {
for (var i = 0; i <= page_max; i++) {
var p = pages[i]
if (w3c_dom)
p.style.display = "none"
pages[i] = p.style
}
}

//document.writeln('<TABLE border=0 height=' + page_height + '><TR><TD></TD></TR></TABLE>')
//layerChange(page_max)
pages_loaded = true

}




this code is what is used on the main html page (I am including only one of the divs as an example):



<div style="display: none;" class="page" id="layer7">
<center>
<table height="132">
<tbody>
<tr>
<td valign="center">
<table width="232" height="132" border="0" align="right" cellpadding="0" cellspacing="0" class="fadearea">
<tr>
<td align="center"><BR>Flash Games<BR>Triva<BR>Puzzles<BR>Fun Lists<BR>Spoofs<BR>Photoshop Fun</td>
<td align="center"><BR>Song Parodies<BR>License Plates<BR>Caption Contest<BR>Mugglenet Interactive<BR>Project Legilimensia
</table>

</td></tr></tbody></table></center></div></div><!-- End ImageReady Slices -->
&lt;script language="JavaScript">


var page_max = 7
var page_height = 0
var delay = 1000

initLayers()

//-->
</script>

<map name="Map">
<area onMouseOver="layerOut()" onClick="layerOver(0)" onMouseOut="layerOut()" shape="rect" coords="4,181,65,250" style="cursor: pointer;">
<area onMouseOver="layerOut()" onClick="layerOver(1)" onMouseOut="layerOut()" shape="rect" coords="32,84,97,142" style="cursor: pointer;">
</map>





please any help will be appreciated, I have been working on this for over 2 weeks.

thanks!
AnswerRe: Javascript DIV fade question Pin
Vasudevan Deepak Kumar14-Jan-07 17:07
Vasudevan Deepak Kumar14-Jan-07 17:07 
QuestionButton Click event inside Master Page Pin
Omkar Ghaisas11-Jan-07 5:07
Omkar Ghaisas11-Jan-07 5:07 
AnswerRe: Button Click event inside Master Page Pin
Mark J. Miller15-Jan-07 3:53
Mark J. Miller15-Jan-07 3:53 
QuestionCreating Custom site column using "Feature" feature of MOSS Pin
khaasJ11-Jan-07 0:51
khaasJ11-Jan-07 0:51 
Generalopening links in a different browser. Pin
V.11-Jan-07 0:03
professionalV.11-Jan-07 0:03 
GeneralRe: opening links in a different browser. Pin
MatrixCoder11-Jan-07 4:31
MatrixCoder11-Jan-07 4:31 
GeneralRe: opening links in a different browser. Pin
Bradml11-Jan-07 4:33
Bradml11-Jan-07 4:33 
GeneralRe: opening links in a different browser. Pin
V.11-Jan-07 4:35
professionalV.11-Jan-07 4:35 
GeneralRe: opening links in a different browser. Pin
V.11-Jan-07 4:34
professionalV.11-Jan-07 4:34 
GeneralRe: opening links in a different browser. Pin
MatrixCoder11-Jan-07 5:00
MatrixCoder11-Jan-07 5:00 
AnswerRe: opening links in a different browser. Pin
V.11-Jan-07 20:23
professionalV.11-Jan-07 20:23 
AnswerRe: opening links in a different browser. Pin
Guffa11-Jan-07 21:02
Guffa11-Jan-07 21:02 
GeneralRe: opening links in a different browser. Pin
V.11-Jan-07 21:24
professionalV.11-Jan-07 21:24 
GeneralWPF/e Guides Pin
Brady Kelly10-Jan-07 21:17
Brady Kelly10-Jan-07 21:17 
GeneralRe: WPF/e Guides Pin
RichardGrimmer16-Jan-07 4:40
RichardGrimmer16-Jan-07 4:40 
Questionselecting one row from datagrid Pin
nclauder10-Jan-07 20:01
nclauder10-Jan-07 20:01 
AnswerRe: selecting one row from datagrid Pin
Paddy Boyd10-Jan-07 23:19
Paddy Boyd10-Jan-07 23:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.