aengblom
12-03-2002, 04:52 PM
I'm having some trouble with my web page ( http://www.aengblom.com )
I have a javascript function that a friend helped me with, but who is
now unavailable. I wanted to make some alterations as an afterthought,
but I'm only at the beginning level and I can't seem to figure out how
to alter it to my exact specifications.
I would appreciate any help!
Here's my script:
<script type="text/javascript" language="javascript">
for( var i in aMaininfo )
{
if( aMaininfo[i][cID] == "" ) //skip the one that is
blank
continue;
document.writeln( "<p><a href='" + aMaininfo[i][cHREF]
+ "' onClick='window.open(\""
+ aMaininfo[i][cHREF] + "\");return false;'
id='" + aMaininfo[i][cID]
+ "' onMouseOver='setInfo( " + i + " );'>"
+ aMaininfo[i][cTEXT] + "</a></p>" );
}
</script>
aMaininfo, id, cHREF, cID, cText and setInfo are variables that are
defined in an earlier script that you can see at my site. (Some line
breaks added for clarity)
I want the window.open line to open a window (which it does
successfully), but set the height, width and remove all the menu's etc
except the title bar and scroll bars if needed.
For example I have tried this:
document.writeln( "<p><a href='"
+ aMaininfo[i][cHREF]
+ "' onClick='window.open(\""
+ aMaininfo[i][cHREF] + "\", "
+ "name," + "width=200,height=200");return false;'
id='" + aMaininfo[i][cID]
+ "' onMouseOver='setInfo( " + i + " );'>"
+ aMaininfo[i][cTEXT] + "</a></p>" );
...and a number of other variations, but it doesn't work.
If anyone would be so kind I'd love to know WHY it would work as well.
It seems I can't figure out home many quotes, single-quotes, plus signs and backslashes and where they should go.
Thanks you for any help
-Drew
feel free to e-mail me at javascript @ aengblom . com
I have a javascript function that a friend helped me with, but who is
now unavailable. I wanted to make some alterations as an afterthought,
but I'm only at the beginning level and I can't seem to figure out how
to alter it to my exact specifications.
I would appreciate any help!
Here's my script:
<script type="text/javascript" language="javascript">
for( var i in aMaininfo )
{
if( aMaininfo[i][cID] == "" ) //skip the one that is
blank
continue;
document.writeln( "<p><a href='" + aMaininfo[i][cHREF]
+ "' onClick='window.open(\""
+ aMaininfo[i][cHREF] + "\");return false;'
id='" + aMaininfo[i][cID]
+ "' onMouseOver='setInfo( " + i + " );'>"
+ aMaininfo[i][cTEXT] + "</a></p>" );
}
</script>
aMaininfo, id, cHREF, cID, cText and setInfo are variables that are
defined in an earlier script that you can see at my site. (Some line
breaks added for clarity)
I want the window.open line to open a window (which it does
successfully), but set the height, width and remove all the menu's etc
except the title bar and scroll bars if needed.
For example I have tried this:
document.writeln( "<p><a href='"
+ aMaininfo[i][cHREF]
+ "' onClick='window.open(\""
+ aMaininfo[i][cHREF] + "\", "
+ "name," + "width=200,height=200");return false;'
id='" + aMaininfo[i][cID]
+ "' onMouseOver='setInfo( " + i + " );'>"
+ aMaininfo[i][cTEXT] + "</a></p>" );
...and a number of other variations, but it doesn't work.
If anyone would be so kind I'd love to know WHY it would work as well.
It seems I can't figure out home many quotes, single-quotes, plus signs and backslashes and where they should go.
Thanks you for any help
-Drew
feel free to e-mail me at javascript @ aengblom . com