Solved

Need to open a Modal dialog in JavaScript

Posted on 2011-09-15
8
240 Views
Last Modified: 2012-06-22
From inside a JavaScript function I need to open another Modal dialog, also in JavaScript

I use Razor (cshtml)

Please provide the syntax to open the dialog as wel as the syntax to create the dialog in JavaScript.

Thanks.
0
Comment
Question by:newbieweb
  • 5
  • 2
8 Comments
 
LVL 9

Accepted Solution

by:
dexterrajesh earned 250 total points
ID: 36544311
hi,

open a window with toolbar and status bar.

window.open (url, "mywindow","status=1,toolbar=1");
0
 

Author Comment

by:newbieweb
ID: 36544382
What might the url be?

I was thining more like this:

$("message_dialog").dialog("open);

Please explain the second method.
0
 
LVL 9

Expert Comment

by:dexterrajesh
ID: 36544437
dialog("open) opens a modal pop-up with message $("message_dialog")
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:newbieweb
ID: 36544450
Yes, I want that.

What's the syntax?

Can I put that inside JavaScript?
0
 

Author Comment

by:newbieweb
ID: 36544507
How do I get text in the body of the message box?
0
 

Author Comment

by:newbieweb
ID: 36544513
I thought via a div tag, but it's not working.
0
 
LVL 8

Assisted Solution

by:cubaman_24
cubaman_24 earned 250 total points
ID: 36548567
Hello:
Take a look at attached code.
Best regards.
<script language="javascript" type="text/javascript">
function openModal()
{
var returnValue = window.showModalDialog('modal.aspx', 'win','help:no;status:no;scroll:no;resize:no;dialogHeight:198px;dialogWidth:450px');
}
</script>

Open in new window

0
 

Author Closing Comment

by:newbieweb
ID: 36554443
Thanks.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

825 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