Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have an application that will display data depending on the county that a user chooses. The text "Download file for all facilities in this county in Excel file format" will not be displayed until the user makes a county selection. Once the selection is made, the page will display the data and also show a link to a downloadable file for that county.

 

Everything works really well in IE. The data are displayed on the page and there is a hyperlink on the text "Download file". When clicking on the link, the user gets a download dialog box and is able to either open or save the file.

 

However, when running in FireFox, there is no link on the text "Download file".

 

How can I make the link appear in FireFox like in IE? Any help is greatly appreciated. Thank you.

 

 

ASP Page

=======

<asp:label id="lblDownload" CssClass="DownloadLink" Visible="False" Runat=server><a id="aDownload">Download file</a> for all facilities in this county in Excel file format.</asp:label>

 

 

Code Behind

=========

Dim strStartupScript As String

strStartupScript = "<script language=JavaScript>"

strStartupScript = strStartupScript & " aDownload.href='" & Application("strFileFolder") & "/" & Session("strFIPSCountyCode") & ".xls'"

strStartupScript = strStartupScript & "<" & "/" & "script>"

Page.RegisterStartupScript("scriptSetHref", strStartupScript)

Posted
I know somethings that work in Internet Explorer, just don't work in FireFox and other browsers. This may be one of those cases, maybe somebody else knows a bit more.

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...