[pmwiki-users] Preview Button
Patrick R. Michaud
pmichaud at pobox.com
Fri Feb 17 18:37:50 CST 2006
On Sat, Feb 18, 2006 at 01:20:00AM +0100, Anno wrote:
> > 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.
>
> The script:
>
> <script language="javascript" type="text/javascript">
> function preview() {
> wikitext = escape(document.formID.textareaID.value);
> window.open('http://www.site.com/wiki/preview.php?wikitext=
> '+wikitext+'','_blank','width=600,height=400,top=25,left=25,screenX=1,
> screenY=1,scrollbars=yes,resizable=yes');
> }
HTTP GET requests are generally limited in length, so this would
work only for very short markup texts. According to RFC 2616:
Note: Servers ought to be cautious about depending on URI lengths
above 255 bytes, because some older client or proxy
implementations might not properly support these lengths.
Also, many browsers place limits on the maximum url they can handle.
The above would likely run into those limits.
Pm
More information about the pmwiki-users
mailing list