[jQuery] Re: jQuery UI dialog not behaving
your dialog options need tuning $("#dialogue").dialog( { AutoOpen: false, /// should be autoOpen bgiframe: true, height: 400, width: 300, maxHeight: 10, /// 10?? maxWidth: 10, // 10? modal: true, resizable: true, buttons: { "Ok": function() { $(this).dialog("close"); } } }); fredriley wrote: Thanks for the reply, Charlie. Sorry I've not got back on it until now. On Jun 11, 10:32 pm, Charlie wrote: try taking the dialog constructor out of the click functions maybe load is firing before the dialog call is complete this seems to be the norm, not trying to build it inside a click Good thought, doesn't seem to make much difference, though. I've changed the script in http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/jqueryui_dialogue_test1.html so that the constructor goes in the 'document ready' block. Now the dialogue appears on page load, despite the AutoOpen option being set to false, and the weirdness described in my initial message continues. also first link doesn't validate on w3 validator, always worth checking validation when DOM weirdness occurs I hadn't thought of that. You're right, it didn't validate, but that was down to me using the string "" in the text and comments. Removing the <> chars and rerunning the validator gave a clean bill of health. That's a useful tip, though, which I'll remember to try in future. Ok, no big, it's not that important and I can't spend any more time on this issue - I'll just have to continue using spawned popup windows. jQuery's a funny thing - the simplest things, like this, can take hours to implement, whereas tough things, like the UI tabbed interface, are wash 'n' go in a few tens of minutes. Ah well, I'll get my head around it one day ;) Cheers Fred
[jQuery] Re: jQuery UI dialog not behaving
Thanks for the reply, Charlie. Sorry I've not got back on it until now. On Jun 11, 10:32 pm, Charlie wrote: > try taking the dialog constructor out of the click functions maybe load is > firing before the dialog call is complete > this seems to be the norm, not trying to build it inside a click Good thought, doesn't seem to make much difference, though. I've changed the script in http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/jqueryui_dialogue_test1.html so that the constructor goes in the 'document ready' block. Now the dialogue appears on page load, despite the AutoOpen option being set to false, and the weirdness described in my initial message continues. > also first link doesn't validate on w3 validator, always worth checking > validation when DOM weirdness occurs I hadn't thought of that. You're right, it didn't validate, but that was down to me using the string "" in the text and comments. Removing the <> chars and rerunning the validator gave a clean bill of health. That's a useful tip, though, which I'll remember to try in future. Ok, no big, it's not that important and I can't spend any more time on this issue - I'll just have to continue using spawned popup windows. jQuery's a funny thing - the simplest things, like this, can take hours to implement, whereas tough things, like the UI tabbed interface, are wash 'n' go in a few tens of minutes. Ah well, I'll get my head around it one day ;) Cheers Fred
[jQuery] Re: jQuery UI dialog not behaving
Thanks for the reply, Charlie. Sorry I've not got back on it until now. On Jun 11, 10:32 pm, Charlie wrote: > try taking the dialog constructor out of the click functions maybe load is > firing before the dialog call is complete > this seems to be the norm, not trying to build it inside a click Good thought, doesn't seem to make much difference, though. I've changed the script in http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/jqueryui_dialogue_test1.html so that the constructor goes in the 'document ready' block. Now the dialogue appears on page load, despite the AutoOpen option being set to false, and the weirdness described in my initial message continues. > also first link doesn't validate on w3 validator, always worth checking > validation when DOM weirdness occurs I hadn't thought of that. You're right, it didn't validate, but that was down to me using the string "" in the text and comments. Removing the <> chars and rerunning the validator gave a clean bill of health. That's a useful tip, though, which I'll remember to try in future. Ok, no big, it's not that important and I can't spend any more time on this issue - I'll just have to continue using spawned popup windows. jQuery's a funny thing - the simplest things, like this, can take hours to implement, whereas tough things, like the UI tabbed interface, are wash 'n' go in a few tens of minutes. Ah well, I'll get my head around it one day ;) Cheers Fred
[jQuery] Re: jQuery UI dialog not behaving
try taking the dialog constructor out of the click functions maybe load is firing before the dialog call is complete this seems to be the norm, not trying to build it inside a click also first link doesn't validate on w3 validator, always worth checking validation when DOM weirdness occurs fredriley wrote: Sorry to post again, but again jQuery has me defeated completely despite using simple code. This time I'm trying to use the excellent UI library, and in particular dialogue windows. All I want to do is open an external file in a dialogue, to save using standard popup windows. I've got a test up at http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/jqueryui_dialogue_test1.html and there are quite a few things wrong: 1. Sometimes the Ok button just doesn't close the window. 2. I can't get the maxHeight and maxWidth options to kick in. 3. I can't get any resizability or draggability. 4. On external links I can't stop the link working despite the standard "return false" in the click function. 5. Firefox and Safari behave differently. I've downloaded a custom UI 1.7.1 library, with all widgets but no interactions or effects, so I suspect that 2 and 3 are down to not having interactions - would this be right? The other problems have me stumped after 3 hours of testing. A weird thing is that the dialogues behave sort of ok in another test form, for instance: http://www.nottingham.ac.uk/~ntzrlo/rlos/database/test/edit_rlo_tabs.php?rlo_num=18 Click on "View all keywords in the database". Yet I'm using exactly the same code in both docs, calling exactly the same core and UI libraries. My head hurts, and it's 9pm on a Friday evening. Maybe it'll be clearer on Monday, but in the meantime if anyone's got suggestions as to: a) why is code working on one doc and not the other b) what's the best way of opening up another doc in a dialogue Thanks. Oh, and does anyone know how I can subscribe to a thread on this board to get notifications of new posts? Cheers Fred