Sephy Posted June 19, 2008 Report Share Posted June 19, 2008 Parasti man sita nevajag taisit bet nu ir radusies vajadziba ;]. Tatad ir pagaidam ir divi <div>. Pirmaja ir vienkarshi ieksha paris pogas, bet problema, ka man vajag uztaisit, lai ja uzspiezh uz kaadas no tam pogam otrajaa <div> paradas jaunas pogas: piemeram uzpiezhot zinu pogu pirmaja <div> otrajaa <div> paradas pogas:jaunkas,arhivetas,zinu tagi,pieveinot,utt. Shito vispaar iespejam bez php uztaisist? Paldies par palidzibu! Link to comment Share on other sites More sharing options...
Grey_Wolf Posted June 19, 2008 Report Share Posted June 19, 2008 Shito vispaar iespejam bez php uztaisist? a shito Vispar buus pagruti uztaisiit ar PHP (bez lapas parlades) ... Izmanto JS ... / onclick / block/ none /... Kodu nedoshu, jo sheit foruma to Esmu postejis to daudzas reizes.... (jau apniik postot vienu un to pashu) pameklee... Link to comment Share on other sites More sharing options...
Aleksejs Posted June 19, 2008 Report Share Posted June 19, 2008 Apmēram kaut kā šitā: <html> <head> < s c r i p t > function radit(el){ elem = document.getElementById(el); elem.style.display=''; } </ s c r i p t > <style> .neradit {display : none}; </head> <body> <div><input type="button" value="Poga1" onclick="radit('poga2'); radit('poga3');"></div> <div><input type="button" value="Poga2" id="poga2" class="neradit"><input type="button" value="Poga3" id="poga3" class="neradit"></div> </body> </html> Link to comment Share on other sites More sharing options...
Sephy Posted June 19, 2008 Author Report Share Posted June 19, 2008 ok paldies Link to comment Share on other sites More sharing options...
indoom Posted June 19, 2008 Report Share Posted June 19, 2008 ar elem.style.display=''; nedarbosies, jo tad style ar display netiks nemaz izmantots, un izmantosies klases display='none'. Var likt tad elem.style.display='block'; vai arī noņemt klasi šajā gadījumā, kad ir tikai viens parametrs - elem.className=''; vai uzlikt citu klasi. Link to comment Share on other sites More sharing options...
Sephy Posted June 19, 2008 Author Report Share Posted June 19, 2008 viss sanaca tagad kad uzpreizhu uz savas pogas paradas arii citas podzinas! elem.style.display='block'; ir pareizajs variants ;D Link to comment Share on other sites More sharing options...
Sephy Posted June 19, 2008 Author Report Share Posted June 19, 2008 (edited) Var velvienu jautajumu? Man augšā ir vairākas pogas. Un piemeram ja es uzpiežu pirmo pogu parādās apkašā otrā un trešā, bet kad uzpriežu otru augšējo pogu tad apakšā paliek otrā un treša poga ka arī pieveinojas pieņemsim ceturtā, bet man nevajag vairak otor un trešo pogu pec tam ;P. kaa var aizvākt tās vecās pogas? Edited June 19, 2008 by Sephy Link to comment Share on other sites More sharing options...
bubu Posted June 19, 2008 Report Share Posted June 19, 2008 Uzliec tām css atrībut display par "none", vai arī par "", ja jau sākumā tās bija slēptas. Link to comment Share on other sites More sharing options...
Sephy Posted June 19, 2008 Author Report Share Posted June 19, 2008 tad jau tas pogas nekad naparadisies ja es taa darish;P Link to comment Share on other sites More sharing options...
Aleksejs Posted June 19, 2008 Report Share Posted June 19, 2008 (edited) <div> <input name="poga1" onclick="radit('poga3'); radit('poga4'); slept('poga5');" value="poga1"> <input name="poga2" onclick="slept('poga3'); radit('poga4'); radit('poga5');" value="poga2"> </div> <div> <input name="poga3" id="poga3" value="poga3" class="neradit"> <input name="poga4" id="poga4" value="poga4" class="neradit"> <input name="poga5" id="poga5" value="poga5" class="neradit"> </div> Un attiecīgi izveido līdzīgu funkciju slept, kas uzstāda stilu display : none; Edited June 19, 2008 by Aleksejs Link to comment Share on other sites More sharing options...
Sephy Posted June 19, 2008 Author Report Share Posted June 19, 2008 (edited) paldies ;D edit: ja kadam interese slept ir sitaa te: <script> function slept(el){ elem = document.getElementById(el); elem.style.display='none'; </script> Edited June 19, 2008 by Sephy Link to comment Share on other sites More sharing options...
Recommended Posts