Stuck again --

Next
 From:  Paul (AIRGLASS)
1039.1 
Hi Michael,
Another question - I'm trying to include a block of code into the end of SidePane.htm by referencing another file, SidePaneMods.htm and having problems getting it to work. I've inserted this:

<moi:ViewlinkContainer id="ViewlinkContainer">
<script>ViewlinkContainer.load( 'moi://ui/SidePaneMods.htm' );</script>

into the end of SidePane before the </body> tag and it kind of works. The SidePaneMods file gets loaded in, and the grid size label in it works, but the Tab in it doesn't work, only the tab and command button labels show up. The code in SidePaneMods works fine if it's in the SidePane file. Is what I'm trying to do even possible?

Paul
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1039.2 In reply to 1039.1 
Hi Paul, try using this instead of the ViewlinkContainer:

<div style="behavior:url(#default#ContentLoader); content:SidePaneMods.htm;"></div>

A ContentLoader works more like an #include, it reads that content file and inserts it directly inside the <div> element.

A ViewlinkContainer is a bit different - the content that it loads actually goes into a separate child document inside the viewlink. The child document has its own <html> and <head> elements, it is a full document itself, it is more like an <iframe> in regular html.

This child document does not directly inherit some of the necessary stuff from the <head> of SidePane.htm . You could get this to work, but you would need to duplicate that <head> stuff over to your new document.

ContentLoader keeps everything inside of the same document, it is more intended for composing kind of fragmentary bits together. ViewlinkContainer is more intended for encapsulated UI that can get switched out like the command options area.

- Michael

EDITED: 18 Oct 2007 by MICHAEL GIBSON

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Paul (AIRGLASS)
1039.3 In reply to 1039.2 
Thanks for the help, Michael -
I'll give it a whirl

Paul
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Paul (AIRGLASS)
1039.4 In reply to 1039.2 
Hi Michael,
The line you posted works great with one small correction:



add url(



This will make it alot easier to keep any personal ui changes separate and organized,
Thanks --

Paul
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
1039.5 In reply to 1039.4 
Hi Paul, oops yup that was a typo I fixed it above.

That's definitely a good idea to manage the main body of your customized content in a separate file.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All