|
From: Noah R. <nr...@wa...> - 2006-06-20 17:50:33
|
What does it take to make the output of file_chooser_button() actually popup a
window? Calls to file_chooser_button work fine in existing modules (such as
apache/htaccess.cgi). In code that I'm writing, file_chooser_button appears
to output the correct html/js, but clicking on the resulting button does
nothing.
The code pulls in web-lib.pl, web-lib-funcs.pl, ui-lib.pl and
javascript-lib.pl. The first form on the page uses the date_chooser_button()
function, and that works fine.
The relevant HTML (rather ugly) looks like:
<form METHOD="POST" ACTION="defbb.cgi" ENCTYPE="multipart/form-data"
NAME="restoreform">
<table width="100%" id="restore-form"><input type="hidden"
name="restoreinited" value="true">
<tobdy>
<tr><br><br></tr>
<tr><input type="radio" name="fm" value="1" title="Restore only if entire
bundle validates." checked="on">Failure Mode 1</tr>
<tr><input type="radio" name="fm" value="2" title="Parse message bundle and
restore individual messages that validate.">Failure Mode 2</tr>
<tr><input type="radio" name="fm" value="3" title="Restore even messages that
don't validate if there's no valid copy on disk.">Failure Mode 3</tr>
<tr><td width="70%"><table width="100%"><tr><td width="70%"><table
width="100%"><tr><input name="bfilename"><input type=button onClick='ifield =
form.file; chooser =
window.open("/chooser.cgi?add=0&type=1&chroot=/&file="+escape(ifield.value),
"chooser", "toolbar=no,menubar=no,scrollbar=no,width=400,height=300");
chooser.ifield = ifield; window.ifield = ifield' value="...">
</tr>
<td valign=top colspan="2"><input type="submit" value="Restore
Bundle"></td></tobdy></table></form>
Thanks,
Noah
--
Noah Romer <nr...@wa...>
GPG Key Fingerprint: 944E C2F8 EBEC BCC7 EEA9 9381 1B21 0098 CC8D 45BA
---------------------------------------------------------------
The information transmitted may contain confidential material and
is intended only for the person or entity to which it is
addressed. Any review, retransmission, dissemination or other use
of or taking of any action by persons or entities other than the
intended recipient is prohibited. If you are not the intended
recipient, please delete the information from your system and
contact the sender.
Scanned for compliance violations by Defender email appliance.
|