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>