473,378 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Java - Error trap if file does not exist

Hello,
1st of all, I'm not a developer; so, I'll need things spelled out pretty clearly.

I have a working javascript and form (see below).
1. We will have documents scanned to PDF on the server.
2. All documents will have a numerical filename that corresponds to a manifest (tracking) number. EX: 11111.pdf
3. The user will type their maifest/tracking number into a box, click a button, then the PDF document will pop up in a new window.

All of the stuff described above works. What I need is a way to test if the file exists, and display a "Come back later" message if it does not. The "come back later" message could be a static page sitting on the server if that is the easiest way?

(begin currently working code)
<html>
<head>
<script type='text/javascript'>

function doit() {
var x = document.getElementById('symtb').value
window.open('http://Neo/'+x+'.pdf')
}

</script>

<body>

<TABLE SUMMARY="enter manifest number" BORDER="1" BGCOLOR="#336699">
<TR>
<TD>
<center>
<font color=white>
<u>DESTRUCTION NOTICES</u><br>

<input type='text' id='symtb' value='enter manifest #' size='15'>
<br>
<button onclick='doit()'>Get Destruction Notice</button>

</center>
</TD>
</TR>
</TABLE>
</body>
</head>
</html>

Thank you for your help,
Tom Albert
Oct 27 '11 #1
1 3003
I'm happy to see a non-developer trying to learn something about coding :). 2 things though, you should probably use the code tags (denoted by the # symbol) to help display the code properly, and you should probably post this topic within the javascript forums. Take a look at this web site, it may help you out

http://www.daniweb.com/web-developme...threads/272293

best of luck
Oct 28 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
2
by: aj | last post by:
DB2 WSE LUW 8.1 Fixpak 5 Red Hat AS 2.1 Has anyone ever seen a db2diag.log indicate that a trap file was written, but it is *not* written? For the 3rd time in 18 months, I had a production...
2
by: Iker Arizmendi | last post by:
Using psql and running as the owner of the table "app" I try to access the columns of the table like so: SELECT * FROM app; which returns all the columns in the table including the one I'm...
6
by: anuragsaxenajpr | last post by:
I am using IIS 6.0 under windows 2003 server and unable to run the .ASP page, when I try to run ASP page the error comes on IE is HTTP Error 404 - File or directory not found. Internet...
1
by: TrailBlazer | last post by:
Hi - Been struggling over this issue for a long while. We store PDF's in our SQL Server database. And I do a BinaryWrite to display the PDF. It works for me without issue, on FireFox, IE, and...
1
by: Atia Amin | last post by:
Hi, I am a new member. Hello to every one. I am new in ASP.NET area. I wrote an ASP.NET web application which was running ok with my old laptop. Currently I have given a new laptop. Now I copied...
1
by: prabhunew2005 | last post by:
Hi I am doing web portal design using PHP. The system has linux os. When i am moving to any of screens, the following error message is written into error log file. File does not exist:...
6
by: Manikrag | last post by:
Hi Team, I am trying to access a user control on a aspx page but I am getting error: "The file '/ajax/include/aspnet/Web.TopBanner4.ascx' does not exist" Let me explain the situation - I have...
11
by: Abhilash Etikala | last post by:
File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico why i am getting this error??
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.