Hi all, I'm playing around with functions, trying to learn a bit. I've got a function, below:
Code:
function BigPhoto(source,width,height){
var source
var width
var height
var newWindow = window.open("", "Bob",
"location=no, directories=no, fullscreen=no, menubar=no, status=no, toolbar=no, width=" + width + ", height=" + height + ", scrollbars=no");
newWindow.document.writeln("<html>");
newWindow.document.writeln("<img src='" + source + "'/>");
newWindow.document.writeln("</body></html>");
newWindow.document.close();
}
and am trying to pass parameters to it through this line of code for the "onClick" behaviour:
Code:
onClick="MM_callJS('BigPhoto('Images/People/Large/Bob.jpg',800,533)')"
If I take the variable "source" out, and put the img src as the string Images/People/Large/Bob.jpg then there is no problemj, which tells me that the problem lies with the quote marks (type of, number of etc) in the onClick code.
Can anyone point me in the right direction please? I've tried just about every permutation I can think of!
Cheers, Lol
|