p2bc
08-06-2003, 09:09 AM
I been tinkering with javascripts, and html for about 2 weeks now. (Oh yes, a real fresh one here, greener than green.)
Anyways, I have a question about calling a script.
<script language="javascript">
function openwindow()
{
window.open('index.html','newWin','width=400,height=300,left=20,top=20,toolbar=No,location=No,scroll bars=Yes
,status=No,resizable=Yes,fullscreen=No'); NewWindow.focus(); void(0);
}
</script>
This is the code I have in my header. I want to call it from the body of my page, but I do not want to use a form button application.
Example:
<form>
<input type=button value="Open Window" onclick="openwindow()">
</form>
Which would creat a big grey button on my page. I would rather it look as though action command
Example:
<a href="index.html">Open Window</a>
How can I do that. Also how can I do it so that I can call the javascript command for several site. As it is right now it is set for index.html, but lets say I call it for index1, index2, index3, and so on, on the same page without rewriting the script.
If anyone could help me out I would appreciate it.
Thanks.
Anyways, I have a question about calling a script.
<script language="javascript">
function openwindow()
{
window.open('index.html','newWin','width=400,height=300,left=20,top=20,toolbar=No,location=No,scroll bars=Yes
,status=No,resizable=Yes,fullscreen=No'); NewWindow.focus(); void(0);
}
</script>
This is the code I have in my header. I want to call it from the body of my page, but I do not want to use a form button application.
Example:
<form>
<input type=button value="Open Window" onclick="openwindow()">
</form>
Which would creat a big grey button on my page. I would rather it look as though action command
Example:
<a href="index.html">Open Window</a>
How can I do that. Also how can I do it so that I can call the javascript command for several site. As it is right now it is set for index.html, but lets say I call it for index1, index2, index3, and so on, on the same page without rewriting the script.
If anyone could help me out I would appreciate it.
Thanks.