I am looking for a way to either remove whole page using one note macro, or clear content of a specific page.
This is for a macro that will create summary page. Right now my macro creates new summary page every time. I would like to keep one page and keep "rebuilding" it with that macro, so I need to either remove or wipe old one.
Thanks!
I don't know what macro language you are using. If you are willing to dig into C# code, you can code up using the OneNote REST API. http://dev.onenote.com. Those operations you are talking about (updating/patching an existing page, or deleting/creating a new page) are possible.
Related
I'm wanting to create a HTML page to be accessed via the kindle browser. I'm wanting to create a puzzle using a form and, when the user solves the puzzle, it will just create a new puzzle. I'm aiming to use cookies to hold the users progress. It can cope with HTML and CSS 3. Can I get a normal web page to redraw itself after the user submits without going back to the server?
Before I get started on the project I just wanted to see whether it was possible doing it this way. Ideally I'd like to put the HTML, CSS and any data into a mobi format but I'm not sure if this is the right place to ask that.
Anyway, thanks for reading.
Mike
I have got a desktop application which logs into a file, opening a file called application.log each time it wants to log something, appending text and then closing it again.
I would like to create a html page showing the content of the file and automatically showing the changes.
How can I achieve this? I think that refreshing the page is not a good idea because this is not instantaneous. Maybe I need something always going in the background, constantly monitoring the file.
Or maybe when my program changes the file it should somehow notify the webpage that the file had changed, making it update the content?
You can’t do dynamic things in HTML. HTML is just a mark up language.
I haven’t done that before, but I would try to achieve it with Java Script and the reload() function every time you logged sth.
I cloned this https://github.com/Chainfrog-dev/async_flask_2, it is a Python module which communicates with a web page using sockets.
I made the obvious modifications to the code and I ended up with a terminal-style logger which automatically updates its content without the need to refresh the page.
I am trying to have a single GAS project that changes its UI by serving up different HTML pages based on what the user clicks. I cannot figure out how to serve up different HTML from the script, replace the current browser page and retain state. Any help appreciated. Thank you.
I use two options:
Have a main page which has buttons or text areas with onchange set to a function which calls back to the server side and gets new page data, then replace the current page or a portion of the page, with the new page.
Pass parameters in the URL and have the server side doGet() parse the parameters and branch to load a given page based on these values.
I have used a combination of both of these effectively. Basically I have a div which has my "menu" and a div which is the section to be replaced. My menu changes and then data is sent back to the server to get the dynamic body. The HTML is returned and then I replace using innerHTML.
In the same code I offer the ability to pass menu values via the published URL. This allows me to go directly to some values if I so choose as I have a Google Site where we embed the script into pages and the menu selections may be specific to that page. It allows us to use an iFrame to show the web app and go directly to the pertinent interface.
With google.script.run you can run any script on the server from the html page. By communicating with the server you have access to PropertiesService which gives you the capability to store information between pages. Personally I like the HTML Service createHtmlOutput(html) because I can edit the html without having to edit a separate page.
I decided to answer your question here so that I could use the code section.
Question:
I am actually looking to avoid manipulating the HTML and serve up a
completely different HTML file stored in the project. How do I make
the page call the script again and replace itself with the new
content?
We I'm guessing that completely replacing the page is not really what you want because the user will suffer a page refresh. But you could create divs like this:
<style>#R01{display:none;}</style>
<div class="replaceable" id="R01"></div>
If you put all your replaceable content in divs like that then you can request content from the server via calls like this:
google.script.run
.withSuccessHandler(updateConversation)
.withFailureHandler(showStatus)
.getConversation();
and put the new content into the appropriate divs and then change the css with another pair and turn the old content off and the new content on. Thereby avoiding a page refresh. Don't forget to save the old data into the PropertiesService first. So I don't think changing the entire page is the way to go but I could be wrong. I think just changing some of the internal content will avoid the need for a total page refresh. If you want to change images you can avoid another download by using CSS Sprites
Im quite new to HTML. What I am trying to do, is create a table in HTML (Which I have done with the standard table tags (table)(/table) etc...
The table has a number of headings, such as Name, Number, 10/10, Percentage, Option
(those aren't the exact titles but you get the idea)
The Name and Number heading is just text that won't change (the same for the text beneath these columns) Which is all fine and dandy, very easy to do.
The part I am struggling with, is part of the table that needs to be able to be edited and saved. In a nutshell, what I want 2 of the columns to do:
When the webpage is loaded up, display information that is stored in MS-Access or MS-Excel (So Automatically READ from file on page loadup)
When the user changes information on the webpage I want it to amend the data in the correct cells on the Access page, so overwrite it, As if you were typing something into Access yourself and clicking the save button.
Is this possible using HTML, Javascript and or PHP? Everything needs to be Clientside. The webpage is built, i'm Using Input type="text" for the text boxes in the table, and I was wondering if using (form) (/form) and some (Script) I could do this. I have searched on the internet and have found some examples where you can read and write to Excel but need ActiveX enabled on IE. It's a work computer and a task I have been asked to complete. There are no administrator privaliges on the system, and I can't enable ActiveX controls in IE so the other method did not work for me. Is there any other way?
You can't archive things like file access, reading and writing to databases's client side. You need to use a server side technology, incidentally, PHP is a server side technology and not client side.
Client side is everything that is run on the users browser, I.E. Chrome, etc. Server side is everything that is run within the web server, before the HTML is sent to the client.
I get the feeling your trying to run before you can walk here. You need to research how web sites work more.
I happen to have inherited a drupal project where a common html validation error seems to occur on nearly every page. The validation error is so minor and easy, I actually only have to open any page up in the editor and the tinymce wysiwig editor will fix the problem automatically and I only need to save the page. Considering I will be needing to do this 30k+ times to apply it to the entire site, is there any way to have it either applied automatically to all pages or automated? Any and all suggestions welcome to help me speed up the process.
EDIT : Used solution
Since I'm not the most adept at finding a programming solution, I did find an addon for firefox letting me record et loop a series of actions called iMacros. Started it up in 5 different instances of FF and let it running all night and it's half done already. Certainly not the most efficient way of doing things, but may be a solution for those who, like me, aren't as advanced in programming.
Assuming you can loop through the pages somehow i would suggest to build a page where you include the code source into the editor root html element (textarea or whatever). Then after onInit (see the tinymce configuration options for this (setup parameter and onInit) ) you trigger the submit or save button which delivers the page to the server where it gets saved.
The pages textarea might then get filled with the code of the next page and so on...
The important part here is that your serverbackend is able to loop through the different pages and knows which page comes next when receiving the modified/corrected page code.