i have a quicklaunch dropdown menu containing links to different pdf documents.
when a user selects one of the documents in the dropdown, the documents opens up instantly in a new window.
this works fine, but the problem is, one of the options is not to launch a document. instead, it is to show a message on the current page saying we do not have documents for that area.
I can't figure out a way to conditionally open in a new window. I only need to open in a new window if there is a document being launched. if there is not, I need it to stay on the same page and show the message.
here's what I have but I get a syntax error:
<script language="JavaScript">
<!--
function jumpTo(form) {
var myindex=form.quicklaunch.selectedIndex;
if(myindex)==6
{
window.open(form.quicklaunch.options[myindex].value);
}
else
{
window.open(form.quicklaunch.options[myindex].value, target="_blank");
}
} // -->
</script>
when a user selects one of the documents in the dropdown, the documents opens up instantly in a new window.
this works fine, but the problem is, one of the options is not to launch a document. instead, it is to show a message on the current page saying we do not have documents for that area.
I can't figure out a way to conditionally open in a new window. I only need to open in a new window if there is a document being launched. if there is not, I need it to stay on the same page and show the message.
here's what I have but I get a syntax error:
<script language="JavaScript">
<!--
function jumpTo(form) {
var myindex=form.quicklaunch.selectedIndex;
if(myindex)==6
{
window.open(form.quicklaunch.options[myindex].value);
}
else
{
window.open(form.quicklaunch.options[myindex].value, target="_blank");
}
} // -->
</script>