• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 78
  • Last Modified:

HTMLDocument problem

Hello EE,

I need to read a page in our Website at work, this page needs to be red from a VB.NET Windows Form software.
The question is not how to read the source file, I know how. but, in the web site page, there is some ajax/javascript. actually we do .removeClassName and .addClassName on a css element and it shows a little JPG or changes it to another JPG (green check mark or a red line)

the source code never shows which image it renders at the end because of those "removeClassName, addClassName"
How can my vb.NET can detect "oh it is the Greenflag right now" or "oh it is the Red right now"

I appreciate the help

Thanks.
0
PhilippeRenaud
Asked:
PhilippeRenaud
2 Solutions
 
Russ SuterCommented:
Not 100% certain I understand where you're going with this but here are 2 things that come to mind.

1. If you have access to the page source then you should also be able to find any javascript references and follow those links also if necessary.

2. If you're using this .removeClassName and .addClassName method then can you not identify whether the element has a specific class or not to determine if it's green or red?

A link to a sample page might be very helpful here.
0
 
Dave BaldwinFixer of ProblemsCommented:
You can only read the original content from the source.  The changes with ajax/javascript are done in the user's browser which you will never have access to.
0
 
PhilippeRenaudAuthor Commented:
No ok but im myself im a user accessing the Web site... isnt there a way to get to that detail ?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Dave BaldwinFixer of ProblemsCommented:
Not without a browser that runs the JavaScript.  I don't know of anything else that will do that.
0
 
darbid73Commented:
I am not a javascript/ajax expert.  

If my understanding is correct you have a HTMLDocument which has a HTMLElement on it which has its classname being changed.  This change causes a change in a JPG image.

Thus once the HTMLDocument is ready set up a timer in the VB.NET form to check the class name of the element.  If it changes then you know the image too has changed.
0
 
PhilippeRenaudAuthor Commented:
thanks guys
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now