Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need to open a Modal dialog in JavaScript

Posted on 2011-09-15
8
Medium Priority
?
245 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
[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
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…

715 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