Re: Problem while inserting new element in webpage
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Tue, 14 Jun 2005 09:18:11 -0400
"Vishal More" <vishalmore@xxxxxxxxxxxxxx> wrote in message
news:1118748979.920429.218030@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I am developing a ToolBand from few days, using this toolband the user
> can insert the elements into the webpages. The only thing user has to
> do is make a selection of element and place it on webpage.
>
> for inserting the element I have written code like :
> spElt = spDoc.elementfrompoint(x,y)
> spElt.insertAdjacentHTML("beforeEnd", "Element tag")
>
> This code works fine...But it fails when I click on some image in
> webpage, its giving error "Invalid target element for this operation".
You are trying to insert something here:
<img src="..."> <newElement> </img>
This would not be a valid HTML. Perhaps you want "afterEnd" ?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- References:
- Problem while inserting new element in webpage
- From: Vishal More
- Problem while inserting new element in webpage
- Prev by Date: Problem while inserting new element in webpage
- Next by Date: IOleCommandTarget of IWebBrowser2
- Previous by thread: Problem while inserting new element in webpage
- Next by thread: IOleCommandTarget of IWebBrowser2
- Index(es):
Relevant Pages
|