I am writing documentation, and want to create popup windows that will provide the reader with more information if they wish. However, I'm getting uncertain results with window.open(). I'm in Firefox. Sometimes it works, sometimes it doesn't work, sometimes it opens the window as a popup, other times it opens it as another tab. Trying to put in parameters such as height and width make it less likely to work, although sometimes it does. Am I doing something wrong here? The following works and opens a tab, but it isn't really what I want.
<script type="text/javascript">
function windoc(theurl) {
alert("got to windoc");
doc02 = window.open(theurl);
doc02.moveTo(0,0);
}
</script>
The window opens in a tab whether I use the "moveTo" or not.
The HTML in the calling program is all text - here is the call:
there is a bunch of text here <a style = "color:800517;
width:300px" onclick = "windoc('doc02.cfm#personid')">What does this mean? </a>
more text here
Here is the target:
<div class = "tipdoc">
<a name = "personid"></a>
there is text here blah, blah, blah...