Hi,
I am writing some JavaScript to write out some HTML, and have come unstuck when trying to do a link. In the line below, the element that is in majors needs to be enclosed with quotes when passed as a parameter to the function 'explain', but I can't see any way to do it cos document.write takes " as a special character.
Any ideas????
document.write ('<a href="javascript:explain(' + majors[f] + ');">');
I am writing some JavaScript to write out some HTML, and have come unstuck when trying to do a link. In the line below, the element that is in majors needs to be enclosed with quotes when passed as a parameter to the function 'explain', but I can't see any way to do it cos document.write takes " as a special character.
Any ideas????
document.write ('<a href="javascript:explain(' + majors[f] + ');">');