Val Posted September 6, 2009 Report Share Posted September 6, 2009 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> Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted September 6, 2009 Author Report Share Posted September 6, 2009 nu ok, tagad strādā, bet tam tā ir jābūt,ka ja man senāk 2vi div kur jāielādē lapā pirmais ielādējas bet otro rāda visu laiku, ka lādē?? Quote Link to comment Share on other sites More sharing options...
Val Posted September 6, 2009 Report Share Posted September 6, 2009 nesapratu jautājumu... hz, kas tev bija senāk un kas tagad. Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted September 14, 2009 Author Report Share Posted September 14, 2009 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? Quote Link to comment Share on other sites More sharing options...
mefisto Posted September 14, 2009 Report Share Posted September 14, 2009 A tu zini ka vienā HTML dokentā nevar būt divi elementi ar vienu un to pašu ID ? Quote Link to comment Share on other sites More sharing options...
krikulis Posted September 14, 2009 Report Share Posted September 14, 2009 Var, bet nedrīkst :) //Arī vārdiem, ne tikai HTML elementiem ir sava semantika :> Quote Link to comment Share on other sites More sharing options...
mefisto Posted September 14, 2009 Report Share Posted September 14, 2009 krikulis, varbūt es kļudos, bet IMO ne-valids HTML dokuments nav HTML bet gan ienkārši tagu zupa. Tātad divi vienādi ID nevar būt HTML dokumentā. Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted September 17, 2009 Report Share Posted September 17, 2009 A ar šo skript var uztaisīt kad uzspiež refreš kamēr lādē viņš uzmet loading_bar.gif un rāda kā lādē un pec tam ieiet. Tad der šis skripts tādai lietai? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.