Solved

How to make modal popup window through flash movie and asp.net

Posted on 2009-05-16
3
1,122 Views
Last Modified: 2013-11-07
I am able to run a flash movie through asp.net, then in my flash movie I am able to popup an asp.net .aspx page. Now I am trying to make this popup be a modal window.
I am using javascript in asp.net to pop up window. thank you in advance, for your fabulous solution!



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index"  %>
<%@ Register Assembly="FlashControl" Namespace="Bewise.Web.UI.WebControls" TagPrefix="Bewise" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
<script language="javascript">    
    function myfunc(){
window.open("http://localhost/consumerpalinc/otters/contactme.aspx","popup","width=500,height=300,scrollbars,resizable;newWindow.focus(); void(0);");
}
</script>
</head>
<body >
    <form id="form1" runat="server">
    <div>
<Bewise:FlashControl ID="FlashControl1" runat="server" MovieUrl="index.swf" Height="740px" Width="775px" />    
<%--<BUTTON onclick="myfunc()" type="button" id="BUTTON1">OK</BUTTON>
--%>
    </div>
    </form>
</body>
</html>
 
 
later, in my flash file, i do
 
}
on (release) {
	getURL("javascript:myfunc()");
}

Open in new window

0
Comment
Question by:jrwj
[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
 

Author Comment

by:jrwj
ID: 24403650
I did get some clarity from article: http://javascript.about.com/library/blmodal.htm
Simply stated javascript can only do this in two browsers, internet explorer or firefox.

function modalWin() {
if (window.showModalDialog) {
window.showModalDialog("xpopupex.htm","name",
"dialogWidth:255px;dialogHeight:250px");
} else {
window.open('xpopupex.htm','name',
'height=255,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
}
}

thank you. now if someone knows how to make windows modal also in opera, safari, etc. then please share.
0
 
LVL 15

Accepted Solution

by:
fsze88 earned 500 total points
ID: 24409293
example, it works on ie6,ff3, safari. But not on opera
main.html
 
<script type="text/javascript">
function openModal(){
var returnVal = window.showModalDialog('showModalDialog.html');
alert("returnVal : " + returnVal);
window.location.href=returnVal;
}
</script>
<a href="#" onclick="openModal();">openModal()</a>
 
======================================================================================
 
showModalDialog.html
 
<html>
<head>
<title>Modal Dialog</title>
</head>
      <body >
            <a href="http://www.google.com"  onmousedown="window.returnValue = this.href;window.close();;">Click here</a>
      </body>
</html>

Open in new window

0
 

Author Comment

by:jrwj
ID: 24409449
fsze88, thank you for your answer. this solution uses href. i am not sure how to do an href reference in flash. this seems to be the main limitation that i would face with this. do you know how to do an href in flash?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Triple line in an alert message 4 22
Header Font Size in Grid View 6 25
null, truthy, falsey confusion 25 31
PowerShell: ForEach-Object Export to CSV 4 42
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

749 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