Include fixed IDs for <div> in emhttp html code


bubbaQ

Recommended Posts

I'm working on an upgrade to my OpenFiles plugin that puts an alert in the GUI when there are open files that might prevent a clean shutdown.  I do this by doing some JavaScript modification of the objects in the html produced by emhttp.  One natural place to display this is on the "Array Operation" tab.

 

One thing I would like to do it throw some text/image in the div on the "Array Operation" tab warning not to stop the array until closing open files (if files are in fact open) but the divs and tables have no fixed ID, so it is very cumbersome to walk the DOM to find them to inject the text/image.  If the content div for each of the tabs had the tab name as the ID, that should make it much easier to extend the UI.

Link to comment

I'm working on an upgrade to my OpenFiles plugin that puts an alert in the GUI when there are open files that might prevent a clean shutdown.  I do this by doing some JavaScript modification of the objects in the html produced by emhttp.  One natural place to display this is on the "Array Operation" tab.

 

One thing I would like to do it throw some text/image in the div on the "Array Operation" tab warning not to stop the array until closing open files (if files are in fact open) but the divs and tables have no fixed ID, so it is very cumbersome to walk the DOM to find them to inject the text/image.  If the content div for each of the tabs had the tab name as the ID, that should make it much easier to extend the UI.

There is a #countdown in the middle of the footer. You could throw some red text down there.

$('#countdown').html('<font class='red'>message</font>');});

Link to comment

I actually have a separate tab added to the GUI with a nasty icon for a notice of open files, but even that is not enough to stop me from clicking the "stop" button when I shouldn't.  What I really want to do it put a popup on the checkbox if files are open, requiring confirmation and a warning when files are open.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.