Did you try to use the submit event ?

For example:

Javascript:
$(document).ready(function(){
        $('#formLoad').submit(function(){
                $('#south').html("Loading ...").load("test.html");
                return false;
        });

});

HTML:
<form id="formLoad" name="form" method="get" action="">
   <input type="text" name="q" value=""/><br />
   <input type="submit" name="submit" value="submit"/>
</form>
<div id="south"> Load content into this div</div>

On Nov 19, 3:44 am, Shannon <[EMAIL PROTECTED]> wrote:
> No one has had to do this?
>
> On Nov 18, 9:26 am, Shannon <[EMAIL PROTECTED]> wrote:
>
> > I take it back, the value comes back as UNDEFINED...
>
> > Any advice?
>
> > On Nov 18, 9:17 am, Shannon <[EMAIL PROTECTED]> wrote:
>
> > > Nevermind, I got it.
>
> > > On Nov 18, 9:14 am, Shannon <[EMAIL PROTECTED]> wrote:
>
> > > > Hi everyone,
>
> > > > I am attempting to fetch a page via ajax when a person submits a form
> > > > button.
>
> > > > JAVASCRIPT:
> > > > function sEngFam(str)
> > > > {
> > > >   $('#south').html('Loading data, please wait...').load("select3.php?
> > > > q="+str);
>
> > > > }
>
> > > > HTML:
> > > > <form name="form" method="get" action="">
> > > >    <input type="text" name="q" value=""/><br />
> > > >    <input type="button" onClick="sEngFam(this.form)" name="submit"
> > > > value="submit"/>
> > > > </form>
>
> > > > When I click the button I see the "Loading data, please wait..." but
> > > > the page then goes white. There is even static content from the
> > > > select3.php page that isn't showing up.
>
> > > > Any suggestions?

Reply via email to