[pmwiki-users] Preview Button

Patrick R. Michaud pmichaud at pobox.com
Fri Feb 17 13:53:49 CST 2006


On Fri, Feb 17, 2006 at 02:37:49PM -0500, Miller, Joshua wrote:
>    Is there a way to make it so the Preview Button will open in a new window
>    instead of putting the preview beneath the edit window?  My users can
>    never find their "preview" when they click the button, so if it could open
>    in a new window, they wouldn't miss it.

No, there's not really a way to do this, unless we put in place
some fancy-ish javascript to do it.   HTML and form handling just
don't have the capabilities we need.  

The hard part is getting something to appear in a different window.
Normally one gets information in a different window by using
the target= attribute of a link tag (<a target=... >).  However,
in the case of preview, we're submitting a form, and I don't know
how to get the results of a form submission to appear in a different
window, and leave the current window intact.  

Essentially we have to either open a new window, and then have that 
window submit the form data and display the results, or we have to 
submit the form data and display the results in a new window 
(presumably leaving the existing window intact).  I know this
can't be done using just plain HTML -- it'll require Javascript
support to make it work and I'm not familiar enough with form
submission via Javascript to say how it can be done.

>    Also, I installed 2.1 beta 25 and enabled Drafts but I don't have a button
>    to Save as Draft.  Do I need to add something to Site.Editform?

The default Site.EditForm page now comes with the (:input e_savedraft:)
button built-in.  If you (or the skin) has customized Site.EditForm,
then you'll have to add it to see it.  :-)

Pm





More information about the pmwiki-users mailing list