A couple of things. First and foremost, this forum isn't really for general AJAX questions. It focuses on the various Google APIs. Second, reading through what you're trying to do, I'm afraid I'm really not sure what you're trying to do. I'm not sure what you're trying to accomplish by loading a form via AJAX and then immediately submitting it. That said, if that's what you really want to do, then putting the submit call in the second page's onload listener won't do you any good because the page's onload event has already fired. You would want to add the submit call at the end of your $.ajax's success callback. You'll also want to note that it's document.getElementById(...) (note the capitalization).
If none of this helps, you're going to need to at least post a clearer description of what you're trying to do and a link to the page (rather than just code snippets), regardless of whether it's working or not. Jeremy R. Geerdes Generally Cool Guy Des Moines, IA For more information or a project quote: [email protected] If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church! On Sep 28, 2012, at 11:44 PM, prabha wrote: > Hi All, > > i need a help, i need to submit a form through ajax call.When i click the > submit button in one page means, with out reloading that page i need to > submit a form, but that form is in next page... i.e please see the scenario > to understand my requirment. > > 1) i have a submit button in page1.jsp, if i click the submit button in > page1.jsp, i need to submit the form in page2.jsp, im submitting the form in > page2.jsp body onload. > > i tried this code but it not working > > page 1: > > <script> > $.ajax({ > type: 'POST', > url: page2.jsp, > data: "passing parameter", > success: success, > dataType: dataType > }); > </script> > button onclick am calling tht ajax script. > > page2.jsp > <body onload="document.getelementbyid(id).onclick"> > issue: but form is not getting submit. > > > -- > You received this message because you are subscribed to the Google > Groups "Google AJAX APIs" group. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > To view this message on the web, visit > https://groups.google.com/d/msg/google-ajax-search-api/-/RYeEaO606dcJ > For more options, visit this group at > http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] To view this message on the web, visit http://groups.google.com/group/google-ajax-search-api?hl=en_US For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
