Hi!
I have some questions regarding the way javascript and css is handled in jquery ui dialog and how pages should be loaded in dialogs.
Right now im loading a partial page with ajax into dialog using only the code i need, no html,head, body tags etc.CSS in this dialog do not inherit at all from my css file referenced in the head of the originating page so i use a dialog.css that i link in the partial page. Though it seems like jquery ui buttons are formatted correctly without duplicating script tag to the dialog page.
The prerequisite for the buttons to work is that i have dialog.js scriptlinked to the dialog page and it contains the $().button() part. If i mov this to the site.js in the originating page it doesnt work. jQuery unobtrusive clientside validation will only work if i duplicate the script links for validate and unobtrusive to the dialog page.
This leads me to the conclusion that jquery itself and jquery ui will work inside dialog as long as activating javascript code is inside dialog page. No other scripts or css 'inherits' from the originating page. Is this an optional setting if i would for example like the originating scripts from parent site to be inherited in dialog?
Or is this just bad practise?
The reason im trying to get to the bottom of this is that i have som problems using some scripts like google maps. If code is placed in originating page and for example i put the map div in originating page everything works. If i place the div, or the div and script reference and the js code, in dialog page it will not work.
Anyone can give me som general insite to the logic behind the jquery ui dialog?