Solved

Need to open a Modal dialog in JavaScript

Posted on 2011-09-15
8
242 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 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

739 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