Link to home
Start Free TrialLog in
Avatar of Blessed7777
Blessed7777

asked on

Opening pdf and tif using javascript function in ASP.net 3.5

Hi,

I am trying to write code that will open images with pdf and tif extensions.  The idea is for the code to look for a tif file with the name.  If it doesn't find it then it should look for a pdf.  If both are present it should open them both.  I can get the tif and pdf codes to work separately but not together.  Any assistance you all could provide would be great!

Thanks
<script type="text/javascript">
function notEmpty(){
	var myTextField = document.getElementById('TextBox1');
	if(myTextField.value != "") {
		var path = "\\\\server1.com\\users\\CkImgs\\" + myTextField.value + ".tif";
		window.open(path,'mywindow2')
//		var path = "\\\\server1.com\\users\\CkImgs\\" + myTextField.value + ".jpg";
//		window.open(path,'mywindow')
	}	
	
}
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of David H.H.Lee
David H.H.Lee
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Blessed7777
Blessed7777

ASKER

Thanks x com that did the trick :)