ViszinisA Posted March 8, 2007 Report Posted March 8, 2007 <input type="hidden"> vienā scriptā pēc submit rāda, a otrā pēc submit nerāda man tos laukus kuri ir hidden... kapē nerāda?
ViszinisA Posted March 8, 2007 Author Report Posted March 8, 2007 Te rāda... <script> function submit_form(form) { var html = document.getElementById('html'); form['msg'].value = html.innerHTML; var html = document.getElementById('html_pro'); form['msg_pro'].value = html.innerHTML; return true; } </script> <form method="POST" action="?id=news&act2=<? echo ($_GET['act']); ?>&rec=<? echo ($_POST['opt']); ?>"" onsubmit="submit_form(this);"> <input type="hidden" name="msg"> <input type="hidden" name="msg_pro"> Te nerāda... } else { ?><input type="hidden" value="0" name="stunda<? echo ($stunda); ?>" id="stunda<? echo ($stunda); ?>"><? } ?> </fieldset> <br> <? pats jautaajums ir vnk stulbs...bet nu man nedabrauc -_-
andrisp Posted March 8, 2007 Report Posted March 8, 2007 Parādi jau nopārsētu html (to, ko saņem browseris). Moška tev nemaz nosacījums neizpildas un browseris nesaņem to html ?
ViszinisA Posted March 8, 2007 Author Report Posted March 8, 2007 (edited) strada <script> function submit_form(form) { var html = document.getElementById('html'); form['msg'].value = html.innerHTML; var html = document.getElementById('html_pro'); form['msg_pro'].value = html.innerHTML; return true; } </script> <form method="POST" action="?id=news&act2=edit&rec=24"" onsubmit="submit_form(this);"> <input type="hidden" name="msg"> <input type="hidden" name="msg_pro"> <table border="1" width="300"> <tr> <td width=1%>Datums</td> nestrada <fieldset id=cen0> <legend>0. stunda <a href="#" onclick="java script:addHTML(0);return false;">[++++]</a></legend> <table border="1" width="100%"> <tr> <td width=224 valign="top">Klase</td> <td width=224 valign="top">Macibu prieksmets</td> <td width=224 valign="top">Telpa</td> </tr> </table> <input type="hidden" value="0" id="stunda0"> </fieldset> <br> es tos hidden laukus izmantoju javascriptaa lai taisiitu jaunus <input> un rakstiiitu nosaukumus stunda_1_1 stunda_1_2 tad nu vinji tur ir un es vinju lietoju bet vinji beigaas nesubmitojas Edited March 8, 2007 by ViszinisA
ViszinisA Posted March 8, 2007 Author Report Posted March 8, 2007 tas nau jauki -_- es to nezinaaju tas tipa lai submitotos vaig obligaati name? kam ID slikt grrr lab tagad visu raada un viss iet paldies
v3rb0 Posted March 8, 2007 Report Posted March 8, 2007 vajag Bībeli palasīt, it sevišķi tos 3, kas aiz 10mit defaultajiem baušļiem rakstīts. 11. bauslis. tev būs atribūtu id izmantot tikai kliena puses scriptos. 12. bauslis. tev būs atribūtu name izmantot, tikai lai sūtītu kontroles vērtību uz uz serveri. 13. bauslis. tev nebūs pārkāpt 11. un 12. bausli.
Recommended Posts