Need to open a Modal dialog in JavaScript

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.
newbiewebSr. Software EngineerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
dexterrajeshConnect With a Mentor Commented:
hi,

open a window with toolbar and status bar.

window.open (url, "mywindow","status=1,toolbar=1");
0
 
newbiewebSr. Software EngineerAuthor Commented:
What might the url be?

I was thining more like this:

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

Please explain the second method.
0
 
dexterrajeshCommented:
dialog("open) opens a modal pop-up with message $("message_dialog")
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
newbiewebSr. Software EngineerAuthor Commented:
Yes, I want that.

What's the syntax?

Can I put that inside JavaScript?
0
 
newbiewebSr. Software EngineerAuthor Commented:
How do I get text in the body of the message box?
0
 
newbiewebSr. Software EngineerAuthor Commented:
I thought via a div tag, but it's not working.
0
 
cubaman_24Connect With a Mentor Commented:
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
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks.
0
All Courses

From novice to tech pro — start learning today.