This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to refresh a div on a click on a button Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "How to refresh a div on a click on a button" Watch "How to refresh a div on a click on a button" New topic
Author

How to refresh a div on a click on a button

Omar Ali
Greenhorn

Joined: Dec 23, 2008
Posts: 15
Hello All,

I need your help in doing the ajax parto to refresh the div on the click on the "Refresh" button. I need an example.

I have tried to do it to be refreshed evey 15 seconds as per an example I found it in the internet.

Below is my code:



it is giving me an error which is unknown runtime error in the line


How should I modify the code, I tried to change the naming and do some modifications, but it did not work. I tried to put / before the url



But it did not work

Can anyone help
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15362
    
    6
browser?
Omar Ali
Greenhorn

Joined: Dec 23, 2008
Posts: 15
IE 7
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15362
    
    6
What is ReloadThis?
What is the responseText?

Eric
Omar Ali
Greenhorn

Joined: Dec 23, 2008
Posts: 15
Reload is the name of the DIV

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15362
    
    6
And what is the responseText?

Have you used Fiddler to see if the Ajax call is being made?

Eric
Omar Ali
Greenhorn

Joined: Dec 23, 2008
Posts: 15
No I did not use.

Is there is a way to check? or an example?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15362
    
    6
Install fiddler, it will capture the traffic.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56529
    
  14

Most built-in debuggers in modern browsers will show the network traffic. You really need to learn to use the tools at your disposal.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to refresh a div on a click on a button
 
Similar Threads
Regading getElementById
How to find whether URL is active or not using javascript?
refresh an HTML table using AJAX and JSP
How to display value in combo box using AJAX
JSF1.2 Core+AJAX+Portlets getting problematic while constructing the url