Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window function question

Status
Not open for further replies.

JavaJedi

Programmer
May 24, 2002
12
US
Below is a function I am using to open "PDF" files from a folder and I want to pop up an alert window if the file does not exist, or if the new window is redirected to my server's error page. I have tried many different ideas but can't get anything to work. Can you help?!



<html>
<head>
<title>QuickSheet 1.0</title>
<script language=&quot;JavaScript&quot;>

function formHandler(datasheet){
var Spec = datasheet.modelnum.value.toUpperCase();
window.open(&quot;MYWEBSITEURL&quot;+Spec+&quot;.pdf&quot;, &quot;dataWindow&quot;, &quot;status=yes,menubar=yes,location=yes,toolbar=no,scrollbars=yes&quot;);

}

</script>

</head>

<body bgcolor=&quot;#666666&quot; text=&quot;#FFFFFF&quot; link=&quot;#EEEEEE&quot; vlink=&quot;#CCCCCC&quot; alink=&quot;#CC0033&quot;>
<center>
<form name=&quot;datasheet&quot;>

<input type=&quot;text&quot; name=&quot;modelnum&quot; size=&quot;20&quot; maxlength=&quot;20&quot; onChange=&quot;formHandler(datasheet)&quot;>
<input type=&quot;button&quot; name=&quot;GO&quot; value=&quot;GO&quot; onClick=&quot;formHandler(datasheet)&quot;>

</form>

<font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;><b>Enter model number and press &quot;GO&quot; to get data sheet</b></font>
</center>

</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top