[Resolved] PDF in iFrame

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
waqas_punjabian
Forum Commoner
Posts: 67
Joined: Wed Aug 10, 2005 9:53 am

[Resolved] PDF in iFrame

Post by waqas_punjabian »

Hi guys,

I am trying to open different PDF files in iFrame on change of a select box. The code works fine in FF and chrome. But it crashes in IE when you try to change the PDF using select box.

It's been 5 hours and I am unable to figure out what I am doing wrong. Can;t mess up any more. I am sure this will be a stupid mistake. But I'd really appreciate your help.

Note: I've also tried to use <object> with type appication/pdf but it did not work either.

Thanks,
W

see it live here: http://www.footagetools.com/new/brochures

The code is as below:

Code: Select all

<script type="text/javascript">
	<!--//<![CDATA[
	$(document).ready(function() {
	 $("#select763").change(function(){
		 $("#iframe2").attr('src',$("#select763").val());
	 });
	});
	//]]>-->
</script>

	<form id="form763" name="form763">
		Select a pdf and go
		<select id="select763" name="select763" size="1"> 
			<option value="http://www.footagetools.com/new/pdf/BigShot.pdf">BigShot.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/ButtFusion.pdf">ButtFusion.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/c100.pdf">c100.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/C1200.pdf">C1200.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/C132.pdf">C132.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/C156.pdf">C156.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/C165.pdf">C165.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/C177.pdf">C177.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/C200.pdf">C200.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/c400.pdf">c400.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/c50.pdf">c50.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/C600.pdf">C600.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/C75R.pdf">C75R.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/C850.pdf">C850.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/cs.pdf">cs.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/MLT412.pdf">MLT412.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/pipebursting.pdf">pipebursting.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/Pullers.pdf">Pullers.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/T752.pdf">T752.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/TricTools.pdf">TricTools.pdf</option> 
			<option value="http://www.footagetools.com/new/pdf/Wedge.pdf">Wedge.pdf</option> 
		</select>
	</form>
	<iframe id="iframe2" name="iframe2" src="http://www.footagetools.com/new/pdf/BigShot.pdf" align="middle" width="95%" height="700"></iframe>

Last edited by waqas_punjabian on Mon Oct 29, 2012 1:21 am, edited 1 time in total.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: PDF in iFrame

Post by Weirdan »

Works for me in IE9/W7x64
waqas_punjabian
Forum Commoner
Posts: 67
Joined: Wed Aug 10, 2005 9:53 am

Re: PDF in iFrame

Post by waqas_punjabian »

Hi,

Thanks for the response. I tried it in IE9 x64. It does not crash the IE rather opens the PDF as a new instance.

However, the actual IE9 still crashes right after opening the PDF in iFrame. Here's the detail error log I got in IE:
Problem signature:
Problem Event Name: APPCRASH
Application Name: iexplore.exe
Application Version: 9.0.8112.16421
Application Timestamp: 4d76255d
Fault Module Name: FOXITR~1.OCX
Fault Module Version: 2.1.1.720
Fault Module Timestamp: 4e607dd8
Exception Code: c0000005
Exception Offset: 0002a4fb
OS Version: 6.1.7600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: e761
Additional Information 2: e7612789d6a0abcfd96748519643a547
Additional Information 3: fe3c
Additional Information 4: fe3cd1d4c9570a2ab7498c55b30cac34

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid= ... cid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Note: I have "Foxit" pdf reader installed in my system. Any idea if Foxit is causing the crash?

Can someone please help?

thanks,
W
waqas_punjabian
Forum Commoner
Posts: 67
Joined: Wed Aug 10, 2005 9:53 am

[Resolved] PDF won't open in iFrame

Post by waqas_punjabian »

Hi guys,

Thanks for your help.

Yes, it was the "Foxit" which was causing problem. I've just uninstalled it and then installed the latest Adobe Acrobat Reader. And now, everything is working perfect.

Thanks again,
W
Post Reply