1

I have a HTML\ Javascript element im building, it searches for local files which if they exist work fine and display in the center target frame.

as it happens a file may also not exist hense i would like to in that case revert to the directory rather then the pdf its self. perhaps Im not ussing the onerror in the right contents but I cant get my code to work could anyone help?

<center><input type="text" placeholder="Project Nr." maxlength="50" id="SEARCHbox" name="Project Nr.">
<a href="#"
   onclick="this.href = ('file:///V:/' + document.getElementById('SEARCHbox').value + '/Tekeningen/Tekenwerk De Mar/Definitief/' + document.getElementById('SEARCHbox').value + '.pdf' )"
   onerror="this.href = ('file:///V:/' + document.getElementById('SEARCHbox').value')" target="CENTER" ><br><input type="image" src="../Images/Zoek.png" alt="Submit" width="155" height="21"></a></center>
Falcon
  • 575
  • 2
  • 5
  • 9

0 Answers0