Solved

JavascRipt Modal Window

Posted on 2011-09-30
3
216 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 16

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 16

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

740 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