I am trying to create a jQuery dialog. The dialog appears, but it has no border or title bar.
Here's what I did to re-create the problem:
- Created a new Windows Forms app with VS 2012 with Update 1.
- Inserted a jQuery dialog (see code below) on the default page.
- Clicked the button to open the dialog, and saw that there are no borders or title bar.
- Put the same code in a new HTML page and added jQuery references. Works fine.
Here is the code for the HTML page. The body was pasted into the default page (step 2) to demonstrate the problem.
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Dialog Test</title><link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css"><script src="http://code.jquery.com/jquery-1.8.3.js"></script><script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script></head><body><script> $(document).ready(function () { $('#FormElec').dialog({ autoOpen: false, width:700 }); });</script><button type="button" onclick="$('#FormElec').dialog('open');">Open it</button><div id="FormElec"> This is a dialog.</div></body></html>
How can I get jQuery to work correctly in my forms project?
Jim