R: JavaScript, PHP cooperation.

From: Date: Mon, 10 Sep 2001 14:07:21 +0000
Subject: R: JavaScript, PHP cooperation.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66747@lists.php.net to get a copy of this message
yes, you can popup a html form with target = _parent, like this: First page: <form> <select name=xxx> <option>1</option> <option>2</option> <?php session_start(); if (isset($opt)) $opts[] = $opt; session_register("opts"); foreach ($opts as $opt) print "<option>".$opt."</option>"; ?> </select> <a href=javascript:window.open....>add another opt</a> </form> Popup page: <form .... target=_parent> <input name=opt > <input type=submit value="go"> </form> this should be work, i write it very fast, i don't test it, but this is a start point :) ----------------------------- Federico flagzenNO-SPAM@libero.it ----------------------------- Alexander Deruwe <a@deruwe.be> wrote in message 20010909165839.050309BC81@pop3.telenet-ops.be... > Hewwo, > > When selecting a value from a combobox, I always have a link that allows > adding a record to the table the combobox pulls it's data from. Here is my > problem: > > Is it possible in any way to window.open() a popup window (JavaScript), fill > in a record, add it to the database (PHP) and then reload the caller page so > that the just added record appears in the combobox where the user can select > it for completing the file? Or add it to the combobox manually with > JavaScript to avoid a reload? > > Alexander Deruwe.

« previous php.general (#66747) next »