Gang,
I'm hoping someone can tell me what I'm doing wrong here. I've searched several places and everything I'm doing should be working, but it's not. I have a page on a local company intranet. When someone clicks a checkbox for a category with a related document, the page should open up a file (usually a .docx or .xlsx) from the network shared drive. I put in an alert message to make sure it was passing through that part of the function. That works, but nothing happens after that. Here's the function and here's how I'm calling it.
<script type="text/javascript">
function opensupport(chkbox, url) {
var x = document.getElementById(chkbox)
if (x.checked) {
if (confirm(x.value + " has an associated document to complete. Would you like to open that now?")) {
alert("opening " + url);
window.open(url, 'newwin');
}
}
}
Here's how I'm calling it...
<input type='checkbox' name='initiative' id='34' value='Test Link' onclick="opensupport('34', 'file:\\qdcns0001\projects\EAI Vendor Management\fact sheets\docs\AdvancedMD_Fact_Sheet.doc')"/>