Hi All,

Thank you for you help.
The display: none did wonders for my first problem, I'm very new to DIVs :)

Christian, thanks for the example, it works now :)
May be some one can update the examples for the UI just to include this,
then noods like me don't have to bother you :)

One more question pls:

Why must I declare the dialog in the the document.ready, why can't I just
declare the dialog on its own?
Is it because the code that declares the dialog does not run after the page
was loaded?
Must I declare any object like this at document ready time or in a function?
eg:

$("#dialog").dialog({
   autoOpen: false,
   modal: true,
   buttons: {
    "Ok": function() { alert("Ok"); },
    "Cancel": function() { $(this).dialog("close"); }
   },
   overlay: {
    opacity: 0.5,
    background: "black"
   }
});

 function nodeAction() {
  $("#dialog").dialog("open");
 }

Kind regards
Andries Snyman

On Fri, Nov 28, 2008 at 3:41 PM, Christian Sonne <[EMAIL PROTECTED]>wrote:

> Here's a quick example of what I think you're looking for:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
> http://www.w3.org/TR/html4/loose.dtd";>
> <html>
>     <head>
>         <script src="http://code.jquery.com/jquery-latest.js";></script>
>         <link rel="stylesheet" href="
> http://dev.jquery.com/view/tags/ui/latest/themes/flora/flora.all.css";
> type="text/css" media="screen" title="Flora (Default)">
>         <script type="text/javascript" src="
> http://dev.jquery.com/view/tags/ui/latest/ui/ui.core.js";></script>
>         <script type="text/javascript" src="
> http://dev.jquery.com/view/tags/ui/latest/ui/ui.dialog.js";></script>
>         <script type="text/javascript" src="
> http://dev.jquery.com/view/tags/ui/latest/ui/ui.resizable.js";></script>
>         <script type="text/javascript" src="
> http://dev.jquery.com/view/tags/ui/latest/ui/ui.draggable.js";></script>
>         <title>Dialog test</title>
>         <script>
>             $(document).ready(function(){
>                 $("#example").dialog({autoOpen: false});
>                 $("#trigger").click(function(){
>                     $("#example").dialog("open");
>                 });
>             });
>         </script>
>         <style type="text/css">
>             #example {display: none;}
>         </style>
>     </head>
>     <body>
>         <p>click <a href="#" id="trigger">here</a> to open the dialog</p>
>         <div id="example" class="flora" title="This is my title">I'm in a
> dialog!</div>
>     </body>
> </html>
>
> in action here: http://users.skumleren.net/cers/test/dialog.html
>
>
> On Fri, Nov 28, 2008 at 2:25 PM, Richard D. Worth <[EMAIL PROTECTED]>wrote:
>
>> Can you share some code so we can see what might be the problem? The most
>> common thing it sounds like is when people have a function that initializes
>> the dialog
>>
>> function openDialog() {
>>   $("#myDiv").dialog({ ... });
>> }
>>
>> and they call that function again to try and reopen the dialog after it
>> has been closed, where instead you just want to call
>>
>> $("#myDiv").dialog("open");
>>
>> - Richard
>>
>>
>> On Thu, Nov 27, 2008 at 11:24 AM, Alter <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> Hi all,
>>>
>>> I hope you can help me.
>>> 1st problem: When my page load, it displays the DIV that must be used
>>> for the dialog.
>>> 2nd problem: When I open the dialog, it displays correctly, but when I
>>> close it, it also does not want to open again.
>>>
>>> I'm still very new to jquery and do not mind reading. Pls point me in
>>> the right direction.
>>>
>>> Kind regards
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to