Solved

JavascRipt Modal Window

Posted on 2011-09-30
3
213 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

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