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
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

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) mean to do that to anybody!!!

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
Posted (edited)
$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

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) mean to do that to anybody!!!

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

×