Literal strings must be on a single line. If a line break is included within a literal string, an error is received.
Well I didn't put a line break in, I just had the options of the Window object's open () method on two lines. eg:
"toolbar=no, menubar=no, location=no, scrollbars=yes, resizable=no, width=400, height=325");
I didn't put a line break in there or anything, the browser just read it that way!
__________________
Note: I do not test code. I just write it off the top of my head. There might be bugs in it! But if any thing I gave you the overall theory of what you need to accomplish. Also there are plenty of other ways to accomplish this same thing. I just gave one example of it. Other ways might be faster and more efficient.
Thanks for your reply. However I do not understand it.
I though JavaScript ignored line breaks, spaces and tabs? That's what I've read in this book that I am learning from
You can have a line break between the arguments, just not in your options string.
So this code will also work:
Code:
function showAnimals(linkTarget) {
animalWindow = window.open(linkTarget,
"animalInfo",
"toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=400,height=325"
);
}
__________________
If you need a little more help, I'm available as a Website designer in San Antonio
----------
If I've helped, please check out my friend's nature photography and let me know if you like anything.