OK. I am making progress. I can now trigger the form from an onblur
event, however my XMLHttpRequest is showing up in a new browser
instance.
code extract..
------------------------------------------------------------------------------------------------------------
<form name="form2" action="/mycgilibp/AJAX43.pgm"
method="post" target="_blank" onSubmit="submitForm(this);return
false;">
<script type="text/javascript">
function submitForm(theform) {
var status = AjaxRequest.submit(theform,
//alert("hello");
{
'onSuccess':function(req){
document.forms['form2'].submitResults.value = req.responseText; }
}
);
return status;
}</script>
value1
<INPUT TYPE="text"
value="Tabbing out of this text box should trigger a submit and
display values below. "
NAME="value1" size="80"
maxlength="80"
target="_blank"
onBlur= "document.form2.submit()">
---------------------------------------------------------------------------------------------------------------------------------------
try it:
http://tinyurl.com/u3am7
itp wrote:
> Hi Matt:
>
> I would like to reproduce this page using your toolbox.
> ref: http://tinyurl.com/n4pp2
>
> I realize that the submit button only triggers a script, however the
> <form action=program_name is used to determine what program to run. I
> cannot figure out how to do this using an onchange.
>
> By the way your stuff is great!!!
>
> itp
>
> Matt Kruse wrote:
> > itp wrote:
> > > I would like to try using the onchange event ot submit a request. Has
> > > anyone tried this and could maybe provide an example?
> >
> > What kind of example would you like?
> >
> > Most of the examples aren't actually based on form submittal. They just use
> > form buttons to trigger code. You could trigger the same code via an
> > element's onchange event.
> >
> > --
> > Matt Kruse
> > http://www.JavascriptToolbox.com
> > http://www.AjaxToolbox.com