Thanks Rob, thnx everyone..... i ended up implementing wht Rob suggested.... this looks more user friendly... so will stick to it.... thnx everyone for ur response... best _sabs > What you need to do is pass all of the information collected on the form > to > the new window. You can use that by using lines like > windowname.write(form.field.value), but it's going to be very time > consuming. > > If I were you, I'd do it all in PHP. > > The first time you run the page, there is no POSTed data, so the form is > shown empty. > > The data is them POSTed back to the same page, but this time it contains > data > and the action indicator is set to PREVIEW, so you display the data as it > would look if saved, and then the form again, with the data posted back > into > it. > > The user can then either edit the data, and preview it again, or simply > choose to SAVE it. > > I know this isn't really previewing in a new window, but you really will > have > to do a lot of work to make that happen. Let me know if you'd like a code > example. > > Rob. > > -----Original Message----- > From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On > Behalf Of Sabs > Sent: 22 September 2008 14:03 > To: php-objects@xxxxxxxxxxxxxxx > Subject: Preview in a new window > > Hi guys, > I have a small question... I have a simple form where user can enter data. > I have two button. One to submit and add the data and the other one to > preview the data...is there a simple way to do it... > > ===================================================== > i tried smthing like this... but doesnt seem to work: > > <?php > function newWindow() { > window.open("bbbb.php, "", "width=400,height=500,top=50,left=280, > resizable,toolbar,scrollbars,menubar,"); > } > ?> > > <form action="aaa.php" method="post" > > .... > <input type="submit" name="Preview" value="Preview" onclick="newWindow();" > /> > <input type="submit" name="Add" value="Add" /> > </form> > ====================================================== > any suggestion will be appreciated > > best > _sabs > > > ------------------------------------ > > Are you looking for a PHP job? Join the PHP Professionals directory Now! > http://www.phpclasses.org/professionals/Yahoo! Groups Links > > > > > *********************************************************************************** > Any opinions expressed in email are those of the individual and not > necessarily those of the company. This email and any files transmitted > with it are confidential and solely for the use of the intended recipient > or entity to whom they are addressed. It may contain material protected by > attorney-client privilege. If you are not the intended recipient, or a > person responsible for delivering to the intended recipient, be advised > that you have received this email in error and that any use is strictly > prohibited. > > Random House Group + 44 (0) 20 7840 8400 > http://www.randomhouse.co.uk > http://www.booksattransworld.co.uk > http://www.kidsatrandomhouse.co.uk > Generic email address - enquiries@xxxxxxxxxxxxxxxxx > > Name & Registered Office: > THE RANDOM HOUSE GROUP LIMITED > 20 VAUXHALL BRIDGE ROAD > LONDON > SW1V 2SA > Random House Group Ltd is registered in the United Kingdom with company > No. 00954009, VAT number 102838980 > *********************************************************************************** > >