• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

JavascRipt Modal Window

I am using Javascript Modal Window and I have a Button inside that Modal Widow. I want that when i click on that Button, it should go to other Page and Immeditely Prompt me to download the ecel file, i have written the logic for downloading the file in that page..

Please guide how can i do. if there is another Way, Let me know

Me using Coldfusion.

Currently i am trying with location.href, but it is giving me an error

like this

<input type="button" name="btn  value="Click" onclick="location.href='abc.cfm?id=#id#';">

Gurpreet Singh Randhawa
Gurpreet Singh Randhawa
  • 2
1 Solution
Michel PlungjanIT ExpertCommented:
What error in what browsr on what platform.
Is the cfm returning application/octet-stream as it is supposed to for download or something else? Please provide more detail.
Code example or URL would be useful too
Gurpreet Singh RandhawaWeb DeveloperAuthor Commented:
hi, i solved it using the <a href tag inside the modal window and setting its target to the name of the iframe inside the modal window. the height/width of modal window was set to 0 px to as to make it invisible.. and it worked


Thanks mplungjan!
Gurpreet Singh RandhawaWeb DeveloperAuthor Commented:
use an iframe inside the showmodal dialog and set the attribute of a tag tagrget to the iframe name done!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now