Embedding an IFrame
|
|
Alright so I am trying to embed an IFrame into an area of a webpage.
var helpPanel = document.createElement("iframe");
Now the problem I am having is that I get the alert telling me the image source, meaning everything should be a go. However no page appears. I went over to the error console and I got this message "Node was not found" for the last line. Im quite puzzled because if its displaying that alert, as it is, then the node Should be found, right? |
|
|
helpPanel has been added to the document, where!!? |
|
|
Why do you use xpath and cycle? var img = document.getElementById('imgBot');
img.parentNode.insertBefore(helpPanel, img);
|
|
|
Try the last line with
|
|
|
Just like gollum said,you have to insert,not only create,helpPanel befor you inert allimgs. |
