Form cu trimitere date in pagina popup la submit

Discutii si intrebari legate de scripturi si functii JavaScript, jQuery si Ajax, cod JavaScript in general.
Avatar utilizator
razvik
Mesaje:9

Form cu trimitere date in pagina popup la submit

Salutare.
Am si eu un formular si cand dau verificare doresc sa se deschida un popup cu pagina respectiva unde se verifica datele din formular.

Formularul meu este urmatorul:

Cod: Selectaţi tot

<form method="post" action="domaincheck.php">
    <input type="text" name="domain" size="20">
    <select size="1" name="ext">
    <option selected value="com">.com</option>
    <option value="net">.net</option>
    <option value="org">.org</option>
    <option value="co.ug">.co.ug</option>
    <option value="ac.ug">.ac.ug</option>
    <option value="or.ug">.or.ug</option>
    <option value="sc.ug">.sc.ug</option>
    <option value="ne.ug">.ne.ug</option>
    <option value="co.za">.co.za</option>
    <option value="co.uk">.co.uk</option>
    <option value="info">.info</option>
    <option value="biz">.biz</option>
    <option value="ro">.ro</option>
    <option value="de">.de</option>
    <option value="in">.in</option>

    </select>
    <input type="hidden" name="option" value="check">
    <input type="submit" value="Verifica">
    </form>
Repet. Cand dau verifica sa mi se deschida un popup (dimensiunile sa mi le setez eu, gen 600x500) cu rezultatul dp pagina specificata in formular.

Multumesc mult pt timpul acordat. Mii de scuze daca am postat gresit.
Totul ti se pare mare atunci cand esti mic :)

MarPlo Mesaje:4343
Salut
Incearca formularul asa (vezi ce e adaugat la "onsubmit")

Cod: Selectaţi tot

<form method="post" action="domaincheck.php" target="popp" onsubmit="window.open('domaincheck.php', 'popp', 'menubar=no,width=600,height=500,toolbar=no,top=20,left=80');this.form.submit();return false;">
  <input type="text" name="domain" size="20">
  <select size="1" name="ext">
  <option selected value="com">.com</option>
  <option value="net">.net</option>
  <option value="org">.org</option>
  <option value="co.ug">.co.ug</option>
  <option value="ac.ug">.ac.ug</option>
  <option value="or.ug">.or.ug</option>
  <option value="sc.ug">.sc.ug</option>
  <option value="ne.ug">.ne.ug</option>
  <option value="co.za">.co.za</option>
  <option value="co.uk">.co.uk</option>
  <option value="info">.info</option>
  <option value="biz">.biz</option>
  <option value="ro">.ro</option>
  <option value="de">.de</option>
  <option value="in">.in</option>
  </select>
  <input type="hidden" name="option" value="check">
  <input type="submit" value="Verifica">
</form>

razvik Mesaje:9
Merge struna :) Mersi mult de tot pentru ajutor.
Totul ti se pare mare atunci cand esti mic :)

Subiecte similare