[thelist] Javascript: Preview a textarea in another window

Bill Moseley moseley at hank.org
Sat Jan 28 15:00:47 CST 2006


On Sat, Jan 28, 2006 at 03:38:05PM -0500, Brian Cummiskey wrote:
> Bill Moseley wrote:
> 
> >Window does not focus, though.  I also tried this.focus().  Seems
> >like that's what people use to bring windows back on top.
> >  
> >
> Try using the dependent=true parameter.  This should put it on top of 
> the opener.

No luck.  Odd.  Sure seems like the focus() should work.

function preview_page(textarea_id, link) {
    the_id = $(textarea_id);
    link = link + '?textarea=' + textarea_id;
    var w = window.open(link,'page_preview', 'width=800,height=600,scrollbars=yes,dependent=true');
    return false;
}


> 
> >Still, I'd like to figure out how to pass the text area through the
> >server in a POST.  I'd like to be able to process the textarea before
> >opening the preview window.
> >
> Why add a server process?  Submitting it to a database will only add 
> load, and chances are it will be edited again, so either the row will 
> need to be deleted or updated anyway.

It's already doing a request.  I'd just like to make it a POST with
just the text area included.

-- 
Bill Moseley
moseley at hank.org




More information about the thelist mailing list