Wuu Posted February 9, 2008 Report Share Posted February 9, 2008 <img id='loader' style='visibility:hidden;' src="loader.gif" /> hidden ,bet aizņem vietu! Ko darīt? Link to comment Share on other sites More sharing options...
Kristabs Posted February 9, 2008 Report Share Posted February 9, 2008 Ja piesienas, tad atbilde vienkārša - "neko nedariit". Bet, ja gribi, lai neaizņem vietu - <img id='loader' style='display:none;' src="loader.gif" /> Link to comment Share on other sites More sharing options...
Wuu Posted February 9, 2008 Author Report Share Posted February 9, 2008 document.getElementById('loader').style.display = 'inline'; <img id='loader' style='display:none;' src="loader.gif" /> Spiežu linku un nekas nenotiek ,man vajag lai loder pie lapas ielādes nebūtu redzams. Un kad spiežu pogu viņš parādās :) Link to comment Share on other sites More sharing options...
black Posted February 9, 2008 Report Share Posted February 9, 2008 (edited) 1) Uztaisi elementam CSS klasi hidden (hidden: {display: none;}) 2) <img id='loader' class='hidden' src="loader.gif" /> 3) document.getElementById('loader').className = ''; Edited February 9, 2008 by black Link to comment Share on other sites More sharing options...
mefisto Posted February 9, 2008 Report Share Posted February 9, 2008 Un ja tiešām gribi dabūt atbildi, ta varbūt padalies ar kodu. Nevis tikai kaut kādiem gļukainiem snipetiem. Link to comment Share on other sites More sharing options...
Wuu Posted February 9, 2008 Author Report Share Posted February 9, 2008 (edited) 1) Uztaisi elementam CSS klasi hidden (hidden: {display: none;})2) <img id='loader' class='hidden' src="loader.gif" /> 3) document.getElementById('loader').className = ''; Nestrādā :( ... <script language="javascript" type="text/javascript"> <!-- function startUpload(){ document.getElementById('upload_form').style.visibility = 'hidden'; document.getElementById('loader').className = ''; return true; } //--> </script> ... <form id='upload_form' enctype='multipart/form-data' action='index.php' method='POST' onsubmit='startUpload();'> <img id='loader' class='hidden' src="loader.gif" /> ... Edited February 9, 2008 by Wuu Link to comment Share on other sites More sharing options...
mefisto Posted February 9, 2008 Report Share Posted February 9, 2008 Jā nestrādā, jo forma tiek nosubmitota. Link to comment Share on other sites More sharing options...
black Posted February 9, 2008 Report Share Posted February 9, 2008 (edited) Man viss strādā ar šādu kodu. Ņem vērā, ka Tavā kodā tiek paslēpta visa forma, un pēc tam tiek parādīts formā esošais attēls (kas arī paliks paslēpts, jo forma nav redzama). Un, kā jau mefisto pareizi teica, forma tiek veiksmīgi nosubmitota, tāpēc vispār nekas var nerādīties. <head> <style> .hidden {display: none;} </style> </head> <body> <script language="javascript" type="text/javascript"> <!-- function startUpload(){ document.getElementById('loader').className = ''; return false; } //--> </script> <form id='upload_form' enctype='multipart/form-data' action='#' method='POST' onsubmit='return startUpload();'> <img id='loader' class='hidden' src="http://www.google.lv/intl/en_com/images/logo_plain.png" /> <input type="submit" value="Submit"/> </form> </body> Edited February 9, 2008 by black Link to comment Share on other sites More sharing options...
Wuu Posted February 9, 2008 Author Report Share Posted February 9, 2008 Paldies sapratu viss ok! Link to comment Share on other sites More sharing options...
Recommended Posts