Jump to content
Nareshm

How to remove HTML from internet explorer ?

Recommended Posts

Nareshm

its possible to remove html element's line from internet explorer ?

I want to remove these HTML Lines :

<div id="imagedetail">...</div>
<div id="productdetail">...</div>

 

Share this post


Link to post
Share on other sites
alienclone

if @error Then
	MsgBox(262192,"",@ComputerName&" slaps "&@UserName&" around a bit with a large trout!")
	EndIf

>Exit code: 0

REAL search results

"Yeah yeah yeah, patience. How long will that take?"  -Ed Gruberman

Share this post


Link to post
Share on other sites
TheDcoder
; Maybe try this:
_IEAction($oHtmlElement, "delete")

 


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites
Nareshm
1 hour ago, TheDcoder said:
; Maybe try this:
_IEAction($oHtmlElement, "delete")

 

@TheDcoder

$oHtmlElement = ?

Share this post


Link to post
Share on other sites
TheDcoder
$oHtmlElement = _IEGetObjById($oIE, "Element's ID Here")

; Not all HTML Elements have IDs, so you will have to find another way to target your desired elements

 

Edited by TheDcoder

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites
Nareshm
2 hours ago, TheDcoder said:
$oHtmlElement = _IEGetObjById($oIE, "Element's ID Here")

; Not all HTML Elements have IDs, so you will have to find another way to target your desired elements

 

@TheDcoder it was not working

Share this post


Link to post
Share on other sites
Nareshm
1 hour ago, Danp2 said:

_IEAction won't help in this scenario. You could try something like this (untested) --

$oElement = _IEGetObjById($oIE, "imagedetail")
$oElement.RemoveNode(True)

 

Thanks @Danp2

But, i want to remove second line, i have two same line with 'imagedetail' id and i want to remove second line, not first.

its Possible?

Share this post


Link to post
Share on other sites
Danp2
19 minutes ago, Nareshm said:

But, i want to remove second line

Would have been nice if you gave this information in your initial post. :'(

Use _IETagNameGetCollection to get a collection containing the desired elements. Then loop through this collection until you locate the desired element. Then attempt to remove that node. Give it a try and let us know how it goes.

Share this post


Link to post
Share on other sites
Nareshm
36 minutes ago, Danp2 said:

Would have been nice if you gave this information in your initial post. :'(

Use _IETagNameGetCollection to get a collection containing the desired elements. Then loop through this collection until you locate the desired element. Then attempt to remove that node. Give it a try and let us know how it goes.

@Danp2

But, How it will delete only second line?

Share this post


Link to post
Share on other sites
Danp2

@Nareshm This isn't a forum where you can show up, make a request, and then expect someone to regurgitate some code for you. I gave you some hints in an attempt to point you in the right direction. There's lots of code posted on this forum that deals with _IETagNameGetCollection and traversing the collection of elements. There's also the help file examples.

You need to make some effort to solve your own problem. Where is your code? Post it here even if it doesn't work. At least show us that you are making an attempt to implement a solution. :thumbsup:

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×