Jump to content
php.lv forumi

loading div content


ziedinjsh

Recommended Posts

neko no jauna nedomāju.

<style>
#content {
display: none;
}
#loading{
display: block;
}
</style>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
<script>
$ = function(id) { return document.getElementById(id); } 
function showContent() {
$('loading').style.display = 'none';
$('content').style.display = 'block';
}
</script>
<body onload="javascript:showContent()">
 <div id="loading"><img src='http://www.ajaxload.info/cache/FF/FF/FF/00/00/00/1-0.gif'></div>
 <div id="content">lapas saturs vai sadaļas saturs<br />
 <img src="http://www.wyn1370.com/paintball%20folder%20from%20work/paintball/technical/cocker%20xray%20big.bmp" />
 </div>
</body>

Link to comment
Share on other sites

Nu kā, man ir lapa piemēwrām šāda:

echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n";
echo "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='LV' lang='lv'>\n";
echo "<head>";
echo "<link rel='stylesheet' type='text/css' href='".THEME."styles.css' media='screen' />\n";
echo "<link rel='stylesheet' type='text/css' href='".THEME."producers.css' media='screen' />\n";
echo "<link rel='stylesheet' type='text/css' href='".THEME."user.css' media='screen' />\n";
echo '<link rel="stylesheet" type="text/css" href="'.INCLUDES.'rating/css/rating.css" media='screen'/>';
echo '<link rel="stylesheet" type="text/css" href="'.THEME.'forum.css" media='screen'/>';
echo '<link rel="stylesheet" type="text/css" href="'.THEME.'load.css" media='screen'/>';
echo '<link rel="stylesheet" type="text/css" href="'.THEME.'blog.css" media='screen'/>';
echo '<link rel="stylesheet" type="text/css" href="'.THEME.'front.css" media='screen'/>';
echo "<link rel='shortcut icon' href='".IMAGES."favicon.ico' type='image/x-icon' />\n";
echo "<script type='text/javascript' language='javascript' src='".INCLUDES."jscript.js'></script>\n";
echo "<script type='text/javascript' language='javascript' src='".INCLUDES."jquery.js'></script>\n"; 
echo '<script type="text/javascript" language="javascript" src="'.INCLUDES.'rating/js/behavior.js"></script>';
echo '<script type="text/javascript" language="javascript" src="'.INCLUDES.'rating/js/rating.js"></script>';
echo '<script type="text/javascript" language="javascript" src="'.INCLUDES.'load.js"></script>';
echo "</head>";

echo "<body onload=\"javascript:showContent()\">";

echo "<div id='table_loading' class='table_loading'><img src='".IMAGES."load.gif'></div>";
echo "<div id='table_content' class='table_content'>";

echo "Šis ir DIV 1";

echo "</div>";

echo "<div id='table_loading' class='table_loading'><img src='".IMAGES."load.gif'></div>";
echo "<div id='table_content' class='table_content'>";

echo "Šis ir DIV 2";

echo "</div>";


echo "</body>";
?>

 

Lieta tāda, ka DIV viens ielādējas, bet DIV 2 rāda visulaiku, ka lādējas.. Kur varētu būt problēma?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...