Solved

HTMLDocument problem

Posted on 2016-08-15
6
51 Views
Last Modified: 2016-08-16
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
Comment
Question by:PhilippeRenaud
6 Comments
 
LVL 20

Expert Comment

by:Russ Suter
ID: 41756526
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
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 41756585
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
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 41756746
No ok but im myself im a user accessing the Web site... isnt there a way to get to that detail ?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 41756765
Not without a browser that runs the JavaScript.  I don't know of anything else that will do that.
0
 
LVL 19

Assisted Solution

by:darbid73
darbid73 earned 250 total points
ID: 41757898
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
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 41758546
thanks guys
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now