473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

asp.net & web services

Hi all!

Currently I have a web application that consists of a classic frameset. I
would like to rebuild the application and just use tables or layers. The
problem is, that some parts of the application need to be refreshed at a
given interval. Currently, these parts run in a separate frame and a
JavaScript function reloads the page every x seconds. In the new scenario I
could use iframes, but I would prefer another solution to avoid page
reloading. Was it possible to call a web service from a JavaScript function?
The web service would return a HTML string that the JavaScript function will
then write into a <div>-Element. This way I could avoid page reloads and the
JavaScript function could poll the web service every x seconds in order to
obtain and display the latest data.

Can this be done and if so, where can I find some sample code?

Thanks

Thomas
Nov 17 '05 #1
7 1126
What is wrong with an IFrame with src = source.aspx and in the HTML code for
the source.aspx page in the <Head> section put the code <META
http-equiv="Refresh" content="10"> to refresh the source page every 10
seconds. I don't think this reloads the entire page, does it--just what is
in the IFrame? It happens so fast I can't really tell.
"Thomas" <pi******************@web.de> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
Hi all!

Currently I have a web application that consists of a classic frameset. I
would like to rebuild the application and just use tables or layers. The
problem is, that some parts of the application need to be refreshed at a
given interval. Currently, these parts run in a separate frame and a
JavaScript function reloads the page every x seconds. In the new scenario I could use iframes, but I would prefer another solution to avoid page
reloading. Was it possible to call a web service from a JavaScript function? The web service would return a HTML string that the JavaScript function will then write into a <div>-Element. This way I could avoid page reloads and the JavaScript function could poll the web service every x seconds in order to
obtain and display the latest data.

Can this be done and if so, where can I find some sample code?

Thanks

Thomas

Nov 17 '05 #2
iframe only reloads whats in the frame from my understanding
"William LaMartin" <la******@tampabay.rr.com> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
What is wrong with an IFrame with src = source.aspx and in the HTML code for the source.aspx page in the <Head> section put the code <META
http-equiv="Refresh" content="10"> to refresh the source page every 10
seconds. I don't think this reloads the entire page, does it--just what is in the IFrame? It happens so fast I can't really tell.
"Thomas" <pi******************@web.de> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
Hi all!

Currently I have a web application that consists of a classic frameset. I would like to rebuild the application and just use tables or layers. The
problem is, that some parts of the application need to be refreshed at a
given interval. Currently, these parts run in a separate frame and a
JavaScript function reloads the page every x seconds. In the new scenario
I
could use iframes, but I would prefer another solution to avoid page
reloading. Was it possible to call a web service from a JavaScript

function?
The web service would return a HTML string that the JavaScript function

will
then write into a <div>-Element. This way I could avoid page reloads and

the
JavaScript function could poll the web service every x seconds in order

to obtain and display the latest data.

Can this be done and if so, where can I find some sample code?

Thanks

Thomas


Nov 17 '05 #3

"William LaMartin" <la******@tampabay.rr.com> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
What is wrong with an IFrame with src = source.aspx and in the HTML code for the source.aspx page in the <Head> section put the code <META
http-equiv="Refresh" content="10"> to refresh the source page every 10
seconds. I don't think this reloads the entire page, does it--just what is in the IFrame? It happens so fast I can't really tell.

Well, in principle there's nothing wrong with iframes. Indeed only the
iframe is refreshed, not the whole page. For my scenario it was possible to
use iframes, but not using them had one more two additional benefits (not in
general, just in my application) - that's why I'm looking for an alternative
solution.


"Thomas" <pi******************@web.de> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
Hi all!

Currently I have a web application that consists of a classic frameset. I would like to rebuild the application and just use tables or layers. The
problem is, that some parts of the application need to be refreshed at a
given interval. Currently, these parts run in a separate frame and a
JavaScript function reloads the page every x seconds. In the new scenario
I
could use iframes, but I would prefer another solution to avoid page
reloading. Was it possible to call a web service from a JavaScript

function?
The web service would return a HTML string that the JavaScript function

will
then write into a <div>-Element. This way I could avoid page reloads and

the
JavaScript function could poll the web service every x seconds in order

to obtain and display the latest data.

Can this be done and if so, where can I find some sample code?

Thanks

Thomas


Nov 17 '05 #4
Another way that needs a lot of javascript code is to use the MS XML
PARSER's HTTPRequest object. I've been using this method to avoid the
refresh of a page, and filling it with real time data (that changes every 1
second).

The results are impressive, since the data changes without a reload.

"Thomas" <pi******************@web.de> escribió en el mensaje
news:OH**************@TK2MSFTNGP10.phx.gbl...
Hi all!

Currently I have a web application that consists of a classic frameset. I
would like to rebuild the application and just use tables or layers. The
problem is, that some parts of the application need to be refreshed at a
given interval. Currently, these parts run in a separate frame and a
JavaScript function reloads the page every x seconds. In the new scenario I could use iframes, but I would prefer another solution to avoid page
reloading. Was it possible to call a web service from a JavaScript function? The web service would return a HTML string that the JavaScript function will then write into a <div>-Element. This way I could avoid page reloads and the JavaScript function could poll the web service every x seconds in order to
obtain and display the latest data.

Can this be done and if so, where can I find some sample code?

Thanks

Thomas

Nov 17 '05 #5


If you're targeting IE then use webservices and the behaviors file (".htc")

Here's one example...You can lookup details at MSDN, search for
webservice.htc
<!--
// This div will host the 'webservice' behavior for this page. Put this on
your page.

<div id="divWebService" style="display: none;
behavior:url(../WebServices/webservice.htc)"></div>
function DoWebService()
{

var objWebService;
var intListID;

// Get the ID of the list that is to be returned
//
intListID = 1;

// Get a pointer to our webservice object
//
objWebService = document.all.divWebService;

// Assign the callback function for this webservice call.
//
objWebService.onresult = divWebService_Result_DoWebService;

// Set up the call to the webservice
//
objWebService.useService("../WebServices/DataServices.asmx?wsdl","server");

// Execute the specified method
//
objWebService.server.callService("GetListInformati on", intListID);
}

Iguana


"Thomas" <pi******************@web.de> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
Hi all!

Currently I have a web application that consists of a classic frameset. I
would like to rebuild the application and just use tables or layers. The
problem is, that some parts of the application need to be refreshed at a
given interval. Currently, these parts run in a separate frame and a
JavaScript function reloads the page every x seconds. In the new scenario I could use iframes, but I would prefer another solution to avoid page
reloading. Was it possible to call a web service from a JavaScript function? The web service would return a HTML string that the JavaScript function will then write into a <div>-Element. This way I could avoid page reloads and the JavaScript function could poll the web service every x seconds in order to
obtain and display the latest data.

Can this be done and if so, where can I find some sample code?

Thanks

Thomas

Nov 17 '05 #6
Thanks, this sounds suitable for me as the application runs in the intranet
and all client browsers are IE.
"Iguana" <dm*****************@bellsouth.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...


If you're targeting IE then use webservices and the behaviors file (".htc")
Here's one example...You can lookup details at MSDN, search for
webservice.htc
<!--
// This div will host the 'webservice' behavior for this page. Put this on your page.

<div id="divWebService" style="display: none;
behavior:url(../WebServices/webservice.htc)"></div>
function DoWebService()
{

var objWebService;
var intListID;

// Get the ID of the list that is to be returned
//
intListID = 1;

// Get a pointer to our webservice object
//
objWebService = document.all.divWebService;

// Assign the callback function for this webservice call.
//
objWebService.onresult = divWebService_Result_DoWebService;

// Set up the call to the webservice
//
objWebService.useService("../WebServices/DataServices.asmx?wsdl","server");
// Execute the specified method
//
objWebService.server.callService("GetListInformati on", intListID);
}

Iguana


"Thomas" <pi******************@web.de> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
Hi all!

Currently I have a web application that consists of a classic frameset. I would like to rebuild the application and just use tables or layers. The
problem is, that some parts of the application need to be refreshed at a
given interval. Currently, these parts run in a separate frame and a
JavaScript function reloads the page every x seconds. In the new scenario
I
could use iframes, but I would prefer another solution to avoid page
reloading. Was it possible to call a web service from a JavaScript

function?
The web service would return a HTML string that the JavaScript function

will
then write into a <div>-Element. This way I could avoid page reloads and

the
JavaScript function could poll the web service every x seconds in order

to obtain and display the latest data.

Can this be done and if so, where can I find some sample code?

Thanks

Thomas


Nov 17 '05 #7
Thanks, this sounds suitable for me as the application runs in the intranet
and all client browsers are IE.
"Iguana" <dm*****************@bellsouth.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...


If you're targeting IE then use webservices and the behaviors file (".htc")
Here's one example...You can lookup details at MSDN, search for
webservice.htc
<!--
// This div will host the 'webservice' behavior for this page. Put this on your page.

<div id="divWebService" style="display: none;
behavior:url(../WebServices/webservice.htc)"></div>
function DoWebService()
{

var objWebService;
var intListID;

// Get the ID of the list that is to be returned
//
intListID = 1;

// Get a pointer to our webservice object
//
objWebService = document.all.divWebService;

// Assign the callback function for this webservice call.
//
objWebService.onresult = divWebService_Result_DoWebService;

// Set up the call to the webservice
//
objWebService.useService("../WebServices/DataServices.asmx?wsdl","server");
// Execute the specified method
//
objWebService.server.callService("GetListInformati on", intListID);
}

Iguana


"Thomas" <pi******************@web.de> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
Hi all!

Currently I have a web application that consists of a classic frameset. I would like to rebuild the application and just use tables or layers. The
problem is, that some parts of the application need to be refreshed at a
given interval. Currently, these parts run in a separate frame and a
JavaScript function reloads the page every x seconds. In the new scenario
I
could use iframes, but I would prefer another solution to avoid page
reloading. Was it possible to call a web service from a JavaScript

function?
The web service would return a HTML string that the JavaScript function

will
then write into a <div>-Element. This way I could avoid page reloads and

the
JavaScript function could poll the web service every x seconds in order

to obtain and display the latest data.

Can this be done and if so, where can I find some sample code?

Thanks

Thomas


Nov 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: db2inst2 | last post by:
Hi all, I am using win2K db2 8.1 fixpak 2. lately db2syscs.exe started using 100% CPU. This will be the load on the DB. An application will connect to the machine every 10minutes and do few...
0
by: rmk | last post by:
How can I get the 2000 and 2005 versions of SQL Server Reporting Services both working on my development laptop ????? I have ASP.NET 1.1 and 2.0 installed on my laptop. I have Visual Studio...
1
by: rmk | last post by:
How can I get the 2000 and 2005 versions of SQL Server Reporting Services both working on my development laptop ????? I have ASP.NET 1.1 and 2.0 installed on my laptop. I have Visual Studio...
0
by: Vijay | last post by:
Prep Courses for International Certifications, CSTE & CSQA & ISEB & ISTQB &Business Analyst & SOA Certifications in HYDERABAD. After receiving overwhelming response to our last 50+ batches, ...
5
by: Nike1984 | last post by:
I'm fairly new to Javascript and it's more of a guessing game for me... I'm trying to build an app for Google Maps and just had some issues recently. First off I just wanted to say that everything...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.