Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-03-30
5
Medium Priority
?
248 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 1000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

722 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