saving content editable html for Google Earth application - html

I just started working with html, and I am creating balloon description templates for Google Earth. I am creating site logs for gps locations around the world, and these sites get updated every now and then with a new receiver or antenna.
I have a table set up with all the information about the equipment we have at these sites, and I want to be able to change values in the table when the equipment is changed.
Right now the only way to do that is to go into the html code and find the specific value you need to change and then save the new html code. This works, but it would be nice if I could edit the values without having to go into the code. I know you can do contenteditable=true and then have some text you can edit, but when you refresh the page it goes back to the orignal text.
My question is if there is a way to edit the html code permanently without actually going through all the lines of code to find the one thing you want to change. If this cannot be done, or if my question makes no sense let me know. I probably just need to work with this stuff for more than a week.

Related

How to embed a single Google Sheets cell's text content into a web page?

Background: I have a Google Sheet that automatically manages key organization event dates, but occasionally one has to be manually overridden. I have been duplicating those auto calc'd event dates using PHP on the organization's web page but that doesn't handle it when the event dates are manually changed back in the Sheets database.
Need Statement: I wish to grab the text content of the Google "DateCalc" Sheet, cell "A33" (which contains the corrected next Date) and embed it automatically in a web page sentence that states, "The next event is scheduled for ???." where "???" is whatever is needed for the HTML embed effort for the text content of cell A33.
All the embedding approaches I have tried using the publish to web feature of Sheets, just display a frame with the entire Sheets page content, and I have not been able to find a simple single text display approach, which is what I seek. All the solutions I have found so far are for much more complex situations. I believe I don't need any more code on the Sheet (source) end, just an appropriate "embed code snippet" at the destination end.
I can embed a complete sheet but haven't found a way to embed a simple text string in line with the surrounding text in the sentence.
This web script is the closest I have been able to come...
Our next meeting is on <object data="https://docs.google.com/spreadsheets/d/e/2PACX-1vQq6sXBel4SOW5U_XLnQ1xyyl4P-aK2v1R-5uofUvstMLV89_yCSqX3Lmsy4B7E21gojeG88efGFjZ0/pubhtml?gid=604484136&single=true&range=A29&chrome=false" type="text/html" width="171" height="15"></object>.
but, if the Code Snippet really ran (I changed the file ID to protect the innocent), you would see it doesn't produce an in-line text string but an isolated "block" with the text inside it, as shown below....
The text seems to be an image, not text, that is displaced above the text baseline and has a small gray blob following it that I just can't get rid of.
I'll assume that your server uses a combination of PHP and HTML, so one approach can be to use that PHP code to make a call to the Sheets API to retrieve the data. In the PHP Sheets API Quickstart you can find a example of how to set up a project to achieve a working connection between your server and the API. After you complete the tutorial, you can modify your script to include the following function so you can achieve your original request.
function getNextDate() {
$client = getClient();
$sheetsService = new Google_Service_Sheets($client);
$spreadsheetID = '{YOUR SPREADSHEET ID}';
$cellRange = 'DateCalc!A33';
$serverResponse = $sheetsService->spreadsheets_values->get($spreadsheetID, $cellRange);
$cellValue = $serverResponse->getValues();
if (empty($cellValue)) {
return "NO MEETINGS AHEAD!\n";
} else {
foreach ($cellValue as $value) {
return $value[0];
}
}
}
A totally different alternative is to use a webapp. You can use this tutorial to deploy a webapp that can be later embedded in your webpage to show the following meeting dates.
So there are two free alternatives to accomplish your objectives: using the Sheets API or a webapp; and in this anwser I provided a function for the API option. Please, don't hesitate to offer information for further clarifications or request for help.
Our next meeting is on
.
I built a free, open source, and easy to use service and badge generator called https://cellshield.info. It works out of the box for public Google spreadsheets. What you see above is a live Markdown output version of a badge that is synced from a spreadsheet with the value formatted as what was shown in your example with a formula of TODAY(). The Markdown just makes an image tag which I suppose you can do with anything else that can make an image tag as well.
If you want the yellow or any formatting to to go away, try this:
Our next meeting is on
.
This was done by adding &color=rgba%28255%2C255%2C255%2C0.0%29&style=flat-square to the arguments. The text doesn't match perfectly, it's servicable.
Anyway, I see you went with tabletop but if you or anyone else is just looking to do what you wanted to do, then my service should be sufficient.
For example, it is used for this Game Boy development contest to present the prize pool amount.
If a private spreadsheet solution is needed, one could fork my code, run it on Cloud Run in their Google Cloud Platform account and explicitly share the spreadsheet to the service account on their Google Cloud Platform instance.
Jacques-
Merci beaucoup !
It has been a challenging several days of non-stop effort but you put me on the right track.
Using less than 20 lines of JavaScript code, including one line for the free TableTop.js library call (see https://github.com/jsoma/tabletop#if-your-publish-to-web-url-doesnt-work) and inserting a string in the middle of my HTML sentence, yielded EXACTLY what I was seeking and the solution was INFINITELY SIMPLIER than virtually everything else I found that required multiple libraries, subscription fees, complex system calls, etc.
The hardest part was inserting the JavaScript code into WordPress which my web site is constructed with, as you can essentially only insert plain text into a WordPress page, but with the an added WordPress plugin (Insert Header and Footers) you can put code into a WordPress page.
Many thanks for getting me headed in the right direction, and having a great learning experience along the way. :-)

I need to build in offline HTML form for completion with a button the print the data in a table

I am looking to build an 'easy on the eye' offline form which will be saved locally on users machines.
The purpose of the form is to record information and minutes taken in a meeting.
The form will include a logo, a header, hopefully some a dividing strip (preferably blue) and fields to complete in a table
Date
Time
Location
Attendees
An expanding (Downwards) text box with gets bigger when you type enough to fill it.
A print button which gives you the option of saving as a PDF or actually print it.
I have trawled the internet and even tried to adapt source codes on forms I like the look of but I'm not confident that even when I have adapted the code that those forms still don't have have some kind of connection to the internet as the information recorded in the forms will be highly confidential.
Can you point me in the direction or give me some pointers?
I have seen tutorials but the forms look very basic.
Many Thanks

Hold data for list to add later?

So no SQL tables or anything here. Basically, I have 3 pages that have 6 items each. Each item consists of an image and then some text and also a smaller image than changes from a check to an "x" depending on if user selects or not. So if the image is checked, the user is adding that to a list which would display on a fourth page. This data needs to persist through just a session and if the session times out, then it resets. If the list is complete and on that fourth page the user choices to email or share list via social sharing, then the data would be gone after that action. What I am trying to figure out is the best way to approach and implement this with minimal time and effort as it has to go out quickly. Can any of you explain and maybe point to some links with info on the best way to achieve?
This is being done in asp.net web forms with html, css, and javascript.
Much appreciated!
You can use ViewBag() (for view in razor) or ViewData[] (for page in .net) to hold data for one web page.when you want it to other page. You can pass it to other page.
check this out
ViewBag, ViewData and TempData

How to parse html for a specific <div>?

I'm trying to write a very simple client application for iOS to go to a website with three buttons. Each of these buttons load a different webpage and run a command in an application on the server, takes the results from that command and displays them on a map on the very same page that the button loaded.
What I'm trying to achieve is to be able to do the following:
Click on one of the three buttons.
Have it then run the query.
JUST PULL THE DIV WITH THE MAP TO SHOW THE DATA instead of the entire page, which is what I currently have happening.
I was going to go about this by parsing the html with "libxml2" and "hpple" but I thought that I would ask here before I got started instead of spending a few days on this to realise that I am going about it the wrong way.
So with all of that said I guess my main questions are:
Is this possible?
Is the way I'm going about it correct?
2a. If the way I am going about it is wrong, how best should I go about it?
Normally on the webpage the map, that I am trying to pull, updates dynamically every second or so. In order to make the map dynamic in my application will I have to poll the site every time I want the map to update? or will it automatically update?

hyperlink field in table doesnt work

I have an Access table that has a hyperlink field, with the records being a website link, to look up the UPS Worldship shipment tracking#. My problem is that even though the text has blue colored font, the link doesn’t launch and open the web browser when I click on the field.
originally the hyperlink did work, when I created the table and changed the field properties from “text” to “hyperlink”, but once I ran a delete query and an append query (in order to refresh the data), the link no longer functioned, even though the field has hyperlink properties.
Here is an example of my hyperlink record that I want the browser to launch: http://wwwapps.ups.com/WebTracking/processInputRequest?sort_by=status&tracknums_displayed=1&TypeOfInquiryNumber=T&loc=en_us&InquiryNumber1=1Z1467826772975386&track.x=0&track.y=0
Please advise what I need to do in order to make the hyperlink work, so the user doesn’t have to manually copy and paste the link into a web browser.
Thank you very much in advance
Nathaniel, Access 2003
I don't understand what you mean. I need to create an Access app that would be used throughout the day in order to track UPS packages. Ideally the table would provide a link, so that the user doesnt have to manually copy and paste the tracking number into the UPS website. Please advise if this is feasible without VBA.
I do not like hyperlink fields, they are difficult to edit and somewhat confusing for the user. I prefer to use a click event with FollowHyperlink. However, if you must use hyperlink fields, they have to have this format to work:
Descriptive text#link#
So
Stackoverflow#http://stackoverflow.com#
http://stackoverflow.com#http://stackoverflow.com#
Email#mailto:mail#example.com#
I imagine you have lost the link - that is, the bit between the hash signs.
Try going back to the table with the record and change the data type to short text. Close and reopen the table and switch the data type back to hyperlink. If the text is a valid webpage link it should work without any extra coding.
Good luck!