future_funk Posted November 16, 2004 Report Share Posted November 16, 2004 //index.php// function load(url){window.open(url);} <form method=post action="java script:load('register.php')"> <input name="lsubid" type=text> <input type="image" src="button.gif" name="submit" width="38" height="15"> </form> //dati.php// <?php echo $_POST[lsubid]; ?php> Probleema: netiek nosuutiiti dati no textboxa "lsubid" uz dati.php. Iespeejams, ka javascript kaut ko maisa.. ja jaa, tad kaadaa veidaa vareetu panaakt, lai tomeer nostraadaa ar visu javascriptu ? Link to comment Share on other sites More sharing options...
bubu Posted November 16, 2004 Report Share Posted November 16, 2004 easy: <script> function submitForm(form, url) { form.action = url; form.submit(); } </script> ... <form method=post onsubmit="submitForm(this, 'register.php')"> <input name="lsubid" type="text" /> <input type="image" src="button.gif" name="submit" width="38" height="15" /> </form> Link to comment Share on other sites More sharing options...
bubu Posted November 16, 2004 Report Share Posted November 16, 2004 vai arī, ja tiešām vajag jaunā logā (kautgan tas bišķi tizli ir), tad: <script> function submitForm(url) { var lsubid = document.getElementById('lsubid').value; window.open(url+'?lsubid='+lsubid); return false; } </script> ... <form onsubmit="return submitForm('register.php')"> <input id="lsubid" type="text" /> <input type="image" src="button.gif" name="submit" width="38" height="15" /> </form> Link to comment Share on other sites More sharing options...
Venom Posted November 17, 2004 Report Share Posted November 17, 2004 es gan nezinu kā tur ar validāti, bet <form target="register.php" ... Link to comment Share on other sites More sharing options...
bubu Posted November 17, 2004 Report Share Posted November 17, 2004 no w3.org: <!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form --> <!ATTLIST FORM %attrs; -- %coreattrs, %i18n, %events -- action %URI; #REQUIRED -- server-side form handler -- method (GET|POST) GET -- HTTP method used to submit the form-- enctype %ContentType; "application/x-www-form-urlencoded" accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- name CDATA #IMPLIED -- name of form for scripting -- onsubmit %Script; #IMPLIED -- the form was submitted -- onreset %Script; #IMPLIED -- the form was reset -- accept-charset %Charsets; #IMPLIED -- list of supported charsets -- > Link to comment Share on other sites More sharing options...
Venom Posted November 17, 2004 Report Share Posted November 17, 2004 bet strādā taču ;) w3c.org jau vispār target ignorē Link to comment Share on other sites More sharing options...
bubu Posted November 20, 2004 Report Share Posted November 20, 2004 Nja, tiešām: By assigning a name to a frame via the name attribute, authors can refer to it as the "target" of links defined by other elements. The target attribute may be set for elements that create links (A, LINK), image maps (AREA), and forms (FORM). Link to comment Share on other sites More sharing options...
Venom Posted November 20, 2004 Report Share Posted November 20, 2004 veselais saprāts 1:0 Link to comment Share on other sites More sharing options...
Recommended Posts