Currently I have a javascript:window.open onClick handler on a webpage, which brings up a popup of another webpage when clicked. This will cause problems when links in that window are clicked on. Is there anyway of making the onClick add the file to the existing webpage, rather than bringing up a popup?
I think iframes might work, there are two other pages already included using that method; however, they are active all the time, and I am after something that will open only when a button is clicked.
I was thinking, maybe I'm going about this the wrong way. Instead of trying to change the result from the onClick, maybe I should be asking how it is possible to do this, rather than is it possible a specific way.
try experimenting with DOM ... var o = createElement("iframe"); o.src = "http://whatever"; then append that to whicever object should have it
Hi! Google is a wonderful tool. http://w3.org/DOM/ In short, the DOM provides a means for manipulating the page structure through scripting. Also, don't use the javascript: pseudo-protocol; use a click handler instead as it provides graceful degradation in JS-incapable environments. See this post too. Regards - P