boroarke
05-13-2003, 02:10 PM
Please bare with me; I am a newbie when it comes to JavaScript and Im having problem with an open new window script. On my website I am designing, I have a link that when the user clicks on it, it opens up a new small window with additional items they can choose from. This is the code I am using.
In the head of the HTML I have::
<SCRIPT language="JavaScript">
<!--hide
function newwindow1()
{
window.open(‘www.anysite.com’,'jav','width=500,height=400,resizable=no');
}
//-->
</SCRIPT>
In the body of the HTML, where the link is located, this is the code I have:
<a href="javascript:newwindow1()"><span style="font-weight: 700">
<font face="Verdana" style="font-size: 9pt" color="#223767">New 2004 models</font></span></a>
Now, this is where I am running into problems. In the head, I know I need to put the path of the file where the ‘www.anysite.com’ is but the file I want it to link to is not uploaded to my site yet so there is no URL to enter. I am still designing everything so the new page is still on my c: drive. The location of the actual file is C:\install.htm. If I replace the ‘www.anysite.com’ with ‘c:\install.htm’ and then try to open that link to test it, I get the “Page can not be viewed or missing” error. I know what I would need to enter if the page was already on my site but I do not want to upload any of the pages until I have everything completed. Could someone explain what I need to enter in replace of the ‘www.anysite.com’ so I can link to the file on my hard drive? Does that make sense? Thanks in advance everyone for your help.
:confused:
In the head of the HTML I have::
<SCRIPT language="JavaScript">
<!--hide
function newwindow1()
{
window.open(‘www.anysite.com’,'jav','width=500,height=400,resizable=no');
}
//-->
</SCRIPT>
In the body of the HTML, where the link is located, this is the code I have:
<a href="javascript:newwindow1()"><span style="font-weight: 700">
<font face="Verdana" style="font-size: 9pt" color="#223767">New 2004 models</font></span></a>
Now, this is where I am running into problems. In the head, I know I need to put the path of the file where the ‘www.anysite.com’ is but the file I want it to link to is not uploaded to my site yet so there is no URL to enter. I am still designing everything so the new page is still on my c: drive. The location of the actual file is C:\install.htm. If I replace the ‘www.anysite.com’ with ‘c:\install.htm’ and then try to open that link to test it, I get the “Page can not be viewed or missing” error. I know what I would need to enter if the page was already on my site but I do not want to upload any of the pages until I have everything completed. Could someone explain what I need to enter in replace of the ‘www.anysite.com’ so I can link to the file on my hard drive? Does that make sense? Thanks in advance everyone for your help.
:confused: