views:

47

answers:

2

hello

i have dialog working but it looks nothing like the demo at jquery.com i have the theme css and the js files and referenced, but it looks ugly. big text and the title and 'x' are out of position. i have placed a grab at:

http://picasaweb.google.com/100992319569544717409/DialogPics

and would be grateful if someone could explain why this is happening. many thanks

// Help function

            function help(){ 

                $(function() {

                 $('#help').dialog(
        { 
            title:"Mail Help",
            width: 416,
            height: 340,
            modal: true,
            overlay: { backgroundColor: "#000", opacity: 0.5 }


        });$("#help").dialog('open');
          });
         }

this is what i have for referencing files:

<script src="/sample/admin/js/jquery-1.3.2.min.js"></script>
<script src="/sample/admin/js/jquery-ui-1.7.3.custom.min.js"></script>
<script src="/sample/admin/js/ui.dialog.js"></script>
<script src="/sample/admin/js/ui.core.js"></script>

<link href="/sample/admin/css/smoothness/jquery-ui-1.7.3.custom.css" rel="stylesheet" type="text/css" />
<link href="/sample/admin/css/themes/base/ui.all.css" rel="stylesheet" type="text/css" />

thank you.

A: 

Have you imported jQuery-UI CSS into your project? You can utilize what they provide, or roll your own. The jQuery UI dialog relies on this to make everything look "pretty."

JasCav
updated code with information required.
Mr.Putersmit
@Putersmit - Are you sure your CSS styles are applying? Based on that screen grab you posted, it looks as though it's the default "no-style."
JasCav
@jas - the styles and js are showing in net in firebug and if i use web developer over the title area it is coming from css/smoothness/jquery-ui-1.7.3.custom.css
Mr.Putersmit
A: 

It looks like you've included too much. you should only have 2 scripts: one for jQuery, one for jQuery UI. You should only be using one CSS file for this, the jQueryUI theme CSS file.

For example, this is what I use on a real website:

<link type="text/css" href="./jQuery/jQueryUI/css/custom-theme/jquery-ui-1.8.4.custom.css" rel="stylesheet" />

<script type="text/javascript" src="./jQuery/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="./jQuery/jQueryUI/js/jquery-ui-1.8.4.custom.min.js"></script>

You should download your own version of jqueryUI if you haven't already and start from there http://jqueryui.com/download

Include only these three things for your jqueryUI. You may include your own additional css/javascript files, but you don't need more than these for jqueryUI.

i had that initially, but when i downloaded the library there was a demo folder which i used as a guide. how can i check if some other css is putting it out of place? thanks
Mr.Putersmit
You don't need to use that as a base, just use these three. You do not need anything more than these three.
if i use just those 3 then it doesn't load. i was under the impression that ui.dialog.js had to be present? thanks
Mr.Putersmit
Just build your own download. That's all you need to do. Build your own download, make sure you check off dialog. Build your download. Use the link I provided. Build your downlod. If you build your own download and use just those 3 it will work. It works on every website I've ever made, it's always worked, it has never not worked. It works for everyone. You are only having issues because you are including code a second time that is messing up how the framework works. Don't do that, just do this.
@user257493 - Your frustration is evident. Hahaha. @Putersmit - The reason you may be having problems is because you downloaded a customized jQuery UI that DID NOT include the dialog. So, if you don't include the UI Dialog separately, then it doesn't work. But, @user is right - you shouldn't have to include everything you're including.
JasCav
this now goes from bad to worse. i BUILT the library as suggested :-) and replaced the files with the download. now i am getting functions errors to do with the accordion. so i rebulit the download to include the accordion but still the same. order of events. replaced my js folder with download js folder. replaced css folder with download css folder and copied the js files in the development-bundle from the ui to my js folder. and voila, function errors.
Mr.Putersmit
ok. my bad. got it sorted. user, thanks very much for your patience :-) thanks to all that helped.
Mr.Putersmit