[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Azrasound or You, Will you help me on this issue

Posted on 2002-07-14
12
Medium Priority
?
177 Views
Last Modified: 2010-05-02
Hello Experts,

I have the following code in VB application. Now, it scans each currently open IE and get the url out of it but is it possibvle to add some javascript code to the end of each IE.Document's </body> tag

Dim SHIE As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer

Private Sub Form_Load()
   Set SHIE = New SHDocVw.ShellWindows
End Sub
 
Private Sub Command1_Click()
   Dim I As Integer
   For Each IE In SHIE
   i = i + 1
   ListURL.AddItem IE.LocationURL
   Next
   Set SHIE = Nothing
   Set IE = Nothing
End Sub

Did you get it..? I would like to have the code to add ceretian HTML to the end of each IE's </body> tag

Thanks in advance
0
Comment
Question by:g_handa
[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
12 Comments
 

Author Comment

by:g_handa
ID: 7153274
I have tried to find out somethign with IE.Document.Body.InnerHTML

But no luck so far.. :(

Come on man, i know you can do it
0
 
LVL 22

Expert Comment

by:cookre
ID: 7153317
By the time you get to it, has not IE already parsed and executed the HTML?

What you really want to do is intercept outbound requests, fetch the HTML yourself, then feed the modified HTML to the browser.

See if you some of these hits may be of value:
http://google.yahoo.com/bin/query?p=intercept+browser+url&hc=0&hs=0
0
 

Author Comment

by:g_handa
ID: 7156992
Well, cookre

I don't know what r u saying. Can you post an example..?
0
Technology Partners: 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!

 

Author Comment

by:g_handa
ID: 7157913
I tried to do

IE.Document.Body.InnerHTML=IE.Document.Body.InnerHTML & text1.text

text1 has the HTML code to do that but it doesn't work.

can you make it happen..?
0
 
LVL 20

Expert Comment

by:hes
ID: 7158233
Have you tried doing something like this

Dim ff As Integer
Dim sHtml As String
strHtml = IE.Document.documentElement.outerHTML

strHtml = strHtml & text1.text
ff = FreeFile()
Open "C:\temp\temp.html" For Output As #ff
Print #ff, strHtml
Close #ff

IE.Navigate2 "C:\temp\temp.html"
0
 

Author Comment

by:g_handa
ID: 7158641
Hello hes,

Is there any way to do this without using any external file..?
0
 

Author Comment

by:g_handa
ID: 7158649
because by using an exerbnal file, the user will come to know that my ocde has altered his webpage. There should be some way to do it by not using any external file.
0
 
LVL 20

Expert Comment

by:hes
ID: 7166956
g_handa,
Without access to the web server you cannot change the source html. What you are getting with the "IE.Document"
is the IE's interpatation of the source html.
0
 

Author Comment

by:g_handa
ID: 7168004
I know but I can show you some programs those do the same thing without altering the HTML. I think this is something related to IHTMLObject. I know this is possible without altering the HTML code, but just don't know how to do it.

0
 

Author Comment

by:g_handa
ID: 7168006
I know but I can show you some programs those do the same thing without altering the HTML. I think this is something related to IHTMLObject. I know this is possible without altering the HTML code, but just don't know how to do it.

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8012151
Hi g_handa,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.
    *** one possible solution, put the page in a frame.

g_handa, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 8095583
Question placed in PAQ

Computer101
E-E Admin
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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

650 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