Solved

How do I dynamically rewrite a vbs ASP page without reloading the whole thing?

Posted on 2009-03-30
5
243 Views
Last Modified: 2012-05-06
Hi Experts

I have a quick and dirty vbs asp page which creates my grid layout to display some dynamic data

I expect to use js GetElementByID to set the value of each element from the variables I will receive from the server at regular intervals

The thing that's making my hair itch is I have no clue how to implement the calls to the server to get the data WITHOUT reloading the whole page. I want this layout to appear static and not have to reload itself (otherwise I could just have the vbs create the html on the fly from the source data serverside)

The reason for this is that it's some pretty hefty WMI data, and takes a couple of seconds to poll for it, yet I want my page to look smooth, and only the displayed data within it to change

All I want the periodic script to do using a setTimeout timer is get a bunch of data from the server(this data changes all the time), and write the values in the corresponding element

The vbs to get/create the data is already done
The js to write a variable to an html element is straightforward

I just need the bit in the middle...  :P
0
Comment
Question by:FireW0lf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 4

Author Comment

by:FireW0lf
ID: 24017700
I had an idea to use a "hidden" iframe which would regularly refresh itself, grab the new data, and then use javascript parent methods to write the data to the relevant elements, but this feels a bit kludgy

Is there a cleaner method?
0
 
LVL 19

Accepted Solution

by:
daveamour earned 250 total points
ID: 24017708
0
 
LVL 19

Expert Comment

by:daveamour
ID: 24017713
Interestingly your first idea was used by Microsoft but has since been dropped!
0
 
LVL 4

Author Comment

by:FireW0lf
ID: 24018008
Thanks daveamour

Haven't tried it yet, but the code looks very straightforward so I dont envision any issues implementing this. You saved me potentially a wasted day or two

Yep - much better than my (and Mses apparently :P ) messy idea

Points awarded!
0
 
LVL 19

Expert Comment

by:daveamour
ID: 24018052
Thanks for the points
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question