Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

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.
0
newbieweb
Asked:
newbieweb
  • 5
  • 2
2 Solutions
 
dexterrajeshCommented:
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
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_24Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now