Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Edit Html
#1
Hi Guys,

I need to edit a webpage's html. Is it possible without opening the element inspector?

Example:

How can change the title of Quick Macros webpage to "Quick Macros: The Best Solution"?

HtmlDoc d
d.InitFromWeb("http://www.quickmacros.com/")

int w=wait(3 WV win("Quick Macros" "IEFrame"))
Htm e=htm("TD" "QUICK MACROS" "" w "0" 0 0x21 3)

like:
e.Changetotext to ("Quick Macros: The Best Solution")
#2
this will change the active ie tab title


Code:
Copy      Help
int w=win("" "IEFrame")
Htm e=htm("HTML" "" "" w "0")
str title TitleText
e.DocProp(0 0 title)
out title
e.el.document
TitleText="Quick Macros: The Best Solution"
MSHTML.IHTMLDocument2 doc=e.el.document
doc.title=TitleText
out "title changed"
e.DocProp(0 0 title)
out title
#3
Thanks, Kevin. But it didn't work. The webpage is still showing QUICK MACROS.

We need to change the html code from:

<table id="titlebar"><tbody><tr>
<td>QUICK MACROS</td>

To:
<table id="titlebar"><tbody><tr>
<td>Quick Macros: The Best Solution</td>
#4
not sure what part of the webpage your trying to change but  here is a photo of the document title changed in the tab to what you wanted

   

oic you wanted the table element  but you asked for the page title.

this is what you want changed?
   

Code:
Copy      Help
int w=win("" "IEFrame")
Htm e=htm("TD" "QUICK MACROS" "" w "0" 0 0x1)
e.SetText("Quick Macros: The Best Solution")
#5
NICE! Thank you, Kevin! Sorry my mislead.


Forum Jump:


Users browsing this thread: 2 Guest(s)