Solved

JavascRipt Modal Window

Posted on 2011-09-30
3
207 Views
Last Modified: 2012-06-27
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#';">

0
Comment
  • 2
3 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 36895517
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
 
0
 
LVL 15

Accepted Solution

by:
Gurpreet Singh Randhawa earned 0 total points
ID: 36895774
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

Regards

Thanks mplungjan!
0
 
LVL 15

Author Closing Comment

by:Gurpreet Singh Randhawa
ID: 36935352
use an iframe inside the showmodal dialog and set the attribute of a tag tagrget to the iframe name done!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This article discusses how to create an extensible mechanism for linked drop downs.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now