Hi,
I use CGI::Application::Dispatch to avoid hidden runmodes.
CGI::Ajax (at least the way I use it) requires that you tell the form
which inputs to submit. So you could do something like this w/ Javascript:
(for the button):
onclick = "return doGetDoctors()";
And, assuming you've registered "getDoctors" with CGi::Ajax
function doGetDoctors(){
document.getElementById('rm').value = "getDoctors";
//I'm not 100% sure you need the above, but it can't hurt :-)
getDoctors(['rm', 'formInputID1', 'formInputID2' ], ['aDiv'], 'POST');
// again, you might want to try this without the 'rm'
return false;
}
HTH,
Bruce
Jonathan Mangin wrote:
Hi,
I found Bruce McKenzie's small Ajax/C::A demo
and modified it successfully. I only wanted to
populate a <select> construct based on the current
value of another <select> on the same page.
The problem: And then submit the page values normally.
I have two run modes:
pageRegister
authRegister
pageRegister has defined:
<INPUT type=hidden name=rm value=authRegister>
authRegister does typical stuff and redirects to
an application.
It looks like the Ajax function should be its
own subroutine. If that's true I would need
something like
<INPUT type=hidden id=rm value=getDoctors>
and then the original rm later in the form?? I
pictured having two submit buttons, one for Ajax
and one to submit to authRegister. (I haven't
tried nested <form>s yet. ;) Or, should the
Ajax stuff be incorporated into authRegister
somehow?
Hoping someone can help me,
Jon
--
Bruce McKenzie
Business Information Graphics, Inc.
242 W. 36th Street
10th Floor
New York, NY 10018
v. 212-477-4288
http://www.2MinuteExplainer.com
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]