ITCOOKBOOK.com

 Options

Current Time:
Mon Sep 06, 2010 9:52 pm
View unanswered posts

Log in

Username:
Password:
Log me on automatically each visit

Topic Information

Images in the browser without refreshing

 
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> AJAX Programming
View previous topic :: View next topic  
Author Message
bknowles
Fresher


Joined: 30 Nov 2006
Posts: 10

PostPosted: Thu Nov 30, 2006 11:46 pm    Post subject: Images in the browser without refreshing Reply with quote

I want to see images in my browser every 5 seconds, for example, and I think AJAX is a pretty good idea to avoid refreshing page.

I'm using VS2005 (programming in C#) and I've executed an example that works fine: push a button and upload a new image to the browser without refreshing.

The script code is as follows:

<script>
function SumaValores_CallBack(response){
if (response.error != null){
alert("Los valores introducidos no son válidos.");
return;
}
target="contenido";

document.getElementById(target).innerHTML = response.value;

}

</script>
</head>
<body>
<form>
<div>
</div>

<input>
<div></div>

</form>
</body>
</html>

The code in the server is the following:

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AJAX.Utility.RegisterTypeForAJAX(typeof(_Default));
}

[AJAX.AJAXMethod()]
public string SumaValores()
{

return ("");

}
}

But I'd like to "refresh" the image every 5 seconds. I've tried to write in the HTML the following tag:

<body>

It didn’t work. How can I make it work?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> AJAX Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Help US Help YOU

 

 

Please complete our short survey and save $17.50 on ITCOOKBOOK.COM.

 

 

Take a look at SAPTrends.com, a new blog dedicated to discussion of SAP Training trends in SAP ERP.

 

 

C# Interview Questions

 

.NET Interview Questions

 

Java Interview Questions

 

Python Interview Questions

 

ColdFusion Interview Questions

 

Linux Interview Questions

 

Linux LPIC 1 Certification Questions

 

Perl Programming Interview Questions