File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JSP and AJAX problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP and AJAX problem" Watch "JSP and AJAX problem" New topic
Author

JSP and AJAX problem

Supratim Das
Greenhorn

Joined: Oct 28, 2012
Posts: 5
I wrote this code in jsp where in have sent the request from ajax......



in the AJAX file, I have written this to print it.......



the data is dynamically loaded perfectly into the page....but the submit buttons do not work..........when I right clicked on the browser page and clicked on "view source"......it does not show the html code of the dynamically loaded portion of the page.......

How Can I resolve this problem........?? PLEASE HELP........
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41519
    
  53
but the submit buttons do not work

Are there any error messages in the JavaScript Console?

when I right clicked on the browser page and clicked on "view source"......it does not show the html code of the dynamically loaded portion of the page

That's to be expected if you add HTML dynamically.

Post the HTML that does get created.

Also, you shouldn't have several HTML form elements with the same name.


Ping & DNS - my free Android networking tools app
Supratim Das
Greenhorn

Joined: Oct 28, 2012
Posts: 5
there is no error msg in the javascript console.......


and there is no change in the html code before and after the dynamic load.....when I see it from the "view source" option....... the dynamically loaded table is shown in the browser......but it is not reflected to the code when i see from the "view source" option....



the code stays like this even after the loading of dynamic table....
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41519
    
  53
As I said, that is to be expected.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

Ulf Dittmer wrote:
Also, you shouldn't have several HTML form elements with the same name.

It is actually perfectly ok to have multiple form element with the same name. It's the id values that need to be unique.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

If you want to see the dynamically created DOM, you'll need to use the browser's JavaScript debugger. View Source will always show you the source.

P.S. Java scriptlets in JSPs? In 2012? :shock:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP and AJAX problem