I'm pulling my hair out on this one. When I get it working there will be more model numbers and more manuals added.
Right now, when I run it it pops up the alert telling me my manual doesn't exist before I even enter anything.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
</head>
<body>
<FORM NAME="askModel">
Please enter your model number : <INPUT TYPE="text" NAME="model" SIZE="40">
</INPUT>
<INPUT TYPE="button" VALUE="Submit">
</INPUT>
</FORM>
<script language=""javascript" type="text/javascript">
<!--
manual = document.askModel.model.value;
switch(manual) {
case 'gcva070bx40':
window.open('RP6612001.pdf', '_blank');
break;
case 'gcva070cx40':
window.open('RP6612001.pdf', '_blank');
break;
case 'gcva090bx50':
window.open('RP6612001.pdf', '_blank');
break;
case 'gcva090cx50':
window.open('RP6612001.pdf', '_blank');
break;
default:
alert('Your manual does not exist')
}
-->
</script>
</body>
</html>
function pdfDoc() {
manual = document.askModel.model.value;
switch(manual) {
case 'gcva070bx40':
case 'gcva070cx40':
case 'gcva090bx50':
case 'gcva090cx50':
window.open('RP6612001.pdf', '_blank');
break;
default:
alert('Your manual does not exist')
}
}
Other solutions may be possible depending the relationship between model and pdf.
At least 98% of internet users' DNA is identical to that of chimpanzees
Bookmarks