Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need to open a Modal dialog in JavaScript

Posted on 2011-09-15
8
Medium Priority
?
246 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 750 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 750 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

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
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…
Suggested Courses

926 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