Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Show add.cgi from input in detailed.html

Quote Reply
Show add.cgi from input in detailed.html
Hello,

I am wondering if this is possible or has been done - when one fills in the add listing form, I want someone to see how their detailed page looks like, before they complete the submission. In otherwords, collect the form input data and provide another button on the add form page, and when they click that button, send the data to to detailed.cgi to open a detailed.html page in a new window or something. If it looks ok then they close the detailed page window and press the add button in the main window and the listing is submitted.

Anyone done this or is it possible?

Thanks!
Quote Reply
Re: [socrates] Show add.cgi from input in detailed.html In reply to
Its definatly possible - but just not that simple to do. You would need to make a new button on the add form, which would send the values like:

Code:
<input type="button" value="Preview" onclick="new.window('/cgi-bin/page.cgi?p=detailed_preview;Title=' + $('#Title').val() + ';Description=' + $('#Description').val() + ')" />

...etc

Then make a new template called detailed_preview.html (which is just a duplicate of detailed.html). You would then just pass along all the field values you want to use, and you should have access to them

Afraid I can't do any more for this, as I don't have time (not even got time to test it =))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Show add.cgi from input in detailed.html In reply to
Andy,

I tried this but if I remove the part after the p=detailed_preview; it does open a new window properly but if I leave the rest in there, the button just does not work. When you have a couple of minutes could you please see if there is an error in the javascript somewhere.

Thanks again,
Socrates
Quote Reply
Re: [socrates] Show add.cgi from input in detailed.html In reply to
Hi,

Email/PM me a URL I can try it out (along with a sample login username and password) and I'll have a quite look. Got a ton of stuff to get on with today, due to having a bank holiday weekend - but I'll take a look when I get a chance Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!