g_handa
asked on
Azrasound or You, Will you help me on this issue
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
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
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
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
ASKER
Well, cookre
I don't know what r u saying. Can you post an example..?
I don't know what r u saying. Can you post an example..?
ASKER
I tried to do
IE.Document.Body.InnerHTML =IE.Docume nt.Body.In nerHTML & text1.text
text1 has the HTML code to do that but it doesn't work.
can you make it happen..?
IE.Document.Body.InnerHTML
text1 has the HTML code to do that but it doesn't work.
can you make it happen..?
Have you tried doing something like this
Dim ff As Integer
Dim sHtml As String
strHtml = IE.Document.documentElemen t.outerHTM L
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"
Dim ff As Integer
Dim sHtml As String
strHtml = IE.Document.documentElemen
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"
ASKER
Hello hes,
Is there any way to do this without using any external file..?
Is there any way to do this without using any external file..?
ASKER
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.
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.
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.
ASKER
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.
ASKER
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.
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
But no luck so far.. :(
Come on man, i know you can do it