There is no new URL. When the link ...
<a href="javascript:ask('txt-john.html')">John</a>
... is clicked, neither IE nor FireFox go anywhere. However, IE displays the message on the bottom toolbar, "Error on page."
There are no <script></script> tags in the script. It's exactly as shown...
Fendal:
This actually works!
Now, for the sake of organization on a messy page, if I want to create the script as a standalone .js file, would it not look like this?
// JavaScript
function ask(person){
window.open(+person, "askwin","scrollbars=no, height=250, width=250");
}
You see, this is...
I've now tried this with the same non-result. I note that your syntax, Fendal, sets the path (and the other elements) in double quotes, whereas the original script had single quotes. Is that significant?
I have removed the line and reloaded all files. The result is the same:
In IE there's simply an error message on the bottom toolbar that says "Error on page". In FireFox, with scripts enabled globally, nothing happens whatsoever.
I note that the html does not specify a path. Wouldn't it be...
Dan:
Thank you, but this doesn't work. Once again, here's the full schmoo:
In the html head:
<script type="text/javascript" language="JavaScript" src="/scripts/project.js"></script>
The script named project.js is in the /scripts folder, and based on the suggestions above, it consists only of...
Yes, but I also want to call the script from any number of links, whether it's for Jack, John, or Mary. The idea is to get the JS off of my html page since it really just repeats the task and lends unwieldiness.
So I tried keeping the html and eliminating the lines in the script that specify...
Actually it doesn't work.
In the head of my html I've set the script and its location:
<script type="text/javascript" language="JavaScript" src="/scripts/project.js"></script>
The JS itself has been modifed as both Robert and Dan suggested:
function ask(person){
var...
Thanks, Robert:
Yes, the script is meant to open a separate window for any of the html links.
I've tried your version, but without knowledge of the correct syntax in html to call the script at each link. For the "John" link, for example, I tried <a href="javascript:ask(john)">John</a>, but...
First, I’m COMPLETELY a javascript novice, so please endure. Here’s my dilemma:
I’m creating a single javascript called “project.js” in its own directory that I’d like to call from my html for any number of links:
var name="john";
var name="joe";
var name="jack";
function askjohn(){var...
Has anyone ever tried to move Netscape mail folders around with Windows Explorer? I recently had a crash and was forced to reinstall Netscape on a new hard drive. Try merging original mail files with new ones. NOT! Unless I find a remedy, my precious files will be unaccessible forevermore...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.