Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preview button?

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Hi,

Just wondering if anyone knows how to do this - Basically, I'm trying to make a page, which lets you open a new "window" , to preview how the details you are about to submit, will look on the live site.

ATM, I have:


<center><input type="submit" value="Update Listing" name="add" class="button" />
<input type="button" value="Preview" name="preview" class="button" onclick="window.open('/cgi-bin/page.cgi?p=preview','Preview','width=800,height=800,left=0,top=100,screenX=0,screenY=100')" />
&nbsp; <input type="reset" value="Reset" name="reset" class="button" /></center>

Now, what I need - is that when this page is clicked, the details are passed along to /cgi-bin/page.cgi?p=preview

There are a LOT of fields (about 30 of them, and a lot are long HTML strings, so I would imagine doing a list of all the values via a URL string wouldn't be very praticle/simple to do)

Obvioulsy I can't just do a normal "submit" - as this would submit the data into the script (and thus would be updated) - does anyone know of a way I can work around this?

TIA!

Andy
 
Surely instead of submitting to your update script, you just need to have a different script that you submit to that simply loads a new page with the data filled in?

A bit like TT, where you have both "Preview" and "Submit" buttons below the reply box.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hi,

Interesting - why didn't I think of that before!

Thanks :) (sometimes just takes someone to give you a nudge in the right direction :p)

Cheers

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top