473,320 Members | 1,883 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,320 software developers and data experts.

Issue with using iFrame for download in IE6

219 100+
I'm having an issue in IE6 (not an issue in IE7 or Firefox) where the file save dialog window isn't appearing. I'm using a hidden iframe to prompt for a download when a user clicks a link. Any help would be appreciated.

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. function download_req_doc(req_doc){
  3.     var answer = confirm("Would you like to download the required documents?")
  4.     if(answer){
  5.         valid_req_doc = document.getElementById(req_doc).value
  6.         oIfrm=document.getElementById('myIFrm')
  7.         oIfrm.src=valid_req_doc
  8.         alert("To complete the evaluation process please submit the completed document to Human Resources.")
  9.         alert("REMEMBER: YOU MUST SAVE THIS FILE TO YOUR COMPUTER!")
  10.     }
  11. }
  12. </script>
  13.  
  14. ...
  15.  
  16.             <cfif session.access eq 'manager' or session.access eq 'admin'>
  17.                 <li><a href="##" onclick="download_req_doc('valid_req_path');">Download Required Documents</a></li>
  18.             </cfif>
  19.  
  20. ...
  21.  
  22. <iframe id="myIFrm" src="" style="display:none"></iframe>
  23.  
Sep 5 '08 #1
10 2516
acoder
16,027 Expert Mod 8TB
I don't know if this will solve the problem, but try giving it a name and access using window.frame["frameName"].
Sep 5 '08 #2
dmorand
219 100+
I don't know if this will solve the problem, but try giving it a name and access using window.frame["frameName"].
I tried to name my iframe to myIFrm and changed my javascript to this:

window.frame["myIFrm"].src=valid_req_doc

but that gave me a javascript error
Sep 5 '08 #3
acoder
16,027 Expert Mod 8TB
Sorry, that should've been window.frames[].
Sep 5 '08 #4
dmorand
219 100+
Sorry, that should've been window.frames[].
O yeah, I should have known that. I tried it again, no error but the dialog window won't appear. Stupid IE 6, errrr
Sep 5 '08 #5
acoder
16,027 Expert Mod 8TB
OK, instead of hiding it, try making it 0 size:
Expand|Select|Wrap|Line Numbers
  1. <iframe ... style="width:0px; height:0px; border: 0px">
Sep 5 '08 #6
dmorand
219 100+
OK, instead of hiding it, try making it 0 size:
Expand|Select|Wrap|Line Numbers
  1. <iframe ... style="width:0px; height:0px; border: 0px">
Hey acoder, sorry it took me a while to respond, I was on vacation. I tried setting the height/width but it didn't work either, hmmmm.
Sep 11 '08 #7
acoder
16,027 Expert Mod 8TB
With window.frames[] syntax, use location.href. See this link.
Sep 12 '08 #8
dmorand
219 100+
With window.frames[] syntax, use location.href. See this link.
Tried a few of those methods from that page, but still nothing. I'll just tell them to download off the network for those users using IE 6.
Sep 15 '08 #9
acoder
16,027 Expert Mod 8TB
...or encourage them to upgrade. Sorry I couldn't help further.
Sep 15 '08 #10
dmorand
219 100+
...or encourage them to upgrade. Sorry I couldn't help further.
You are a huge help acoder, I appreciate your help very much!!
Sep 16 '08 #11

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

Similar topics

2
by: saayan | last post by:
Hi, I have a php generated HTML page, which has a javascript call in the body tag: <body onunload="exitPage()" onload="setWidth()" onresize="setWidth()"> In certain cases, there can be an...
3
by: GQ | last post by:
We have a Web page that at load time will execute and build: a DHTML Menu/Data Driven, an Iframe with Detail Data, an Iframe to display Progress Information and another iframe with totals...
1
by: boyscout | last post by:
On a page I'm offering file download links which are each targeted to an tiny 1-pixel X 1-pixel iframe on the same page. (If you care why, see below.) Under certain conditions, I want to popup a...
1
by: Claus Pedersen | last post by:
We are building a webapplication but keep hitting a wall: The user can download files but we need to check if they are authorized to do so. We do this with a download-page and use the following...
3
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate...
4
by: jef | last post by:
I have a page (I call FileDownload" that intitiates a download of the filename passed to it. I called it from another page via javascript: window.open("FileDownload?file=blahblh"); it works...
4
by: Brad | last post by:
I have a form where I have a treeview control in the left sidebar and then a panel next to it in the other pane. Based on user selection from the tree view, I would like the panel to display a...
2
riptide2049
by: riptide2049 | last post by:
I really have a problem here. I have a code that is suppost to take the href of a link from the right class;value of a link maked toreturn false. the value is a Media file the file is sent to...
1
by: chaitanyadotcom | last post by:
As per my application i need to create tabs using iFrame dynamically. There are totally 4 buttons in my application where for each button i provide a link. Where in it will dynamically create a tab...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.