Adding Dynamic Html/Javascript to Grid/Split App view


  • How do i view dynamic HTML in GridView or Split App. The html Button call onlick Javascript function which changes innerHTML.

    The app works fine in navigation app, but i cannot implement this is grid or Split App View.

    I also want to Display Text like "paused" when screen width is decreased like in Snap View.

    Monday, December 16, 2013 10:54 AM

All replies

  • I'm not really sure what you're asking. What part of the app are you attempting to change with innerHTML assignments? The Grid and Split app templates are more complicated in their layout and use of controls than the navigation app, so perhaps it's just a matter of how you're trying to address elements.

    I would suggest that you ask your snap view question separately, so each question is specific. But as a short answer, you typically use media queries to determine the view states and set styles accordingly. In your case you can have a top-level div with most of the app content that's normally visible (display: block style) plus an element with your "paused" text that's normally hidden (display: none). In the snap view CSS, you can then set the upper div to display: none to hide it and the paused text element to display: block or such to make it visible.

    Tuesday, December 17, 2013 3:08 AM
  • Im trying to display a simple interactive tutorial in the split view section. when i add dynamic html to data.js, the app runs fine. It crashes whenever the function is called on click!
    Tuesday, December 17, 2013 7:14 AM
  • Please show the relevant code. I don't know what you mean by "add dynamic HTML to data.js" or what your click handler looks like.
    Tuesday, December 17, 2013 5:05 PM