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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross browser probs setting iframe source 3

Status
Not open for further replies.

hererxnl

Technical User
Jul 8, 2003
239
US

I'm using ASPUpload, per our host, which has a pure html progress bar solution for uploading. The example uses window.open which is not really what I want to ask of a modern browser. FF & IE handle it but its blocked by Opera.

I've gone to a popup div with an iframe instead.

The problem:

When I set the source during the load of the page the auto refresh of the script is terribly annoying and will stop functioning while the user selects a file.

Attempted solution:
Set the src of the iframe in a javascript function then submit the upload form. This works in IE but not FF or Opera.

Here's my current javascript code:
Code:
function ShowProgress()
{
  if (document.upload.image.value != "")
  {
	document.upload.action="upload.asp?<%=PID%>&caption="+document.getElementById('caption').value
	document.getElementById('progress').style.display="block";
    document.getElementById('progressframe').src="<%=barref%>";
	document.upload.submit();
  }
}

The form is submitted and the file is uploaded, but the iframe doesn't seem to receive the src update, as none of the progress HTML is displayed.

Hopefully I've explained this in enough detail.

Thanks in advance for any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top