I have been making a javascript program thing and now I am at the stage where I need to make it visual. I have an idea of what It should look like but Dont know the best way to go about it. I could just put images and change them when needed, but I am wondering do I have to refresh the page everytime I want to change something?
Here is what I want it to look like, whats the best way to go about this. Just javascript no jquery etc.
http://postimg.org/image/p4nnnmqap/
You may use SetInterval() to refresh, if you want to...
Your program is running in what plataform and what language?
Long time ago i made one HTML WYSIWYG editor in Delphi7, and using the TWebBrowser as a viewer, and with the save button, had a function to also refresh the TWebBrowser, worked fine.
But if your workspace runs directly to a HTML page you can just set an interval of 60000ms to refresh the viewr every 1 minute.t
The simplest way is to build the structure in HTML and let Javascript fill in the dynamic parts on the fly.
It could be as simple as having simple <span> placeholders.
<span id="count">0</span> <!-- initial value = 0 -->
And update it with
document.getElementById('count').innHTML = '987';
P.s. Always make sure the DOM element exists before the code executes.
Related
The printer: TM-T88V
The Manual: https://files.support.epson.com/pdf/pos/bulk/tmt88v_swum_reve.pdf
A receipt-marker Web template for the printer: http://www.i-pos.nl/epson/
(Provided by Epson)
I'm a noob that doesn't know any computer languages. I've dug all I can but I still can't make sense of it all. I still don't know what I need to learn to print the receipts I want to print.
There's mention of XML, HTML, CSS, and Javascript. But I don't know which one I need to learn. And I don't want to waste time learning one I don't need for this specific purpose.
What I want is to make a receipt that looks very similar to that of another business who makes wonderful receipts, and who uses this printer.
Ideally this is just a txt document or something very simple that I can manually change the lines of and click print. I do not need any sort of POS program with text boxes, buttons, or anything on a website for now. I just need a simple, off-line, on-my-desktop type solution. I want to plug the printer into my computer, change a few lines of text or code, and print it and have it look like their receipt, except with my logo and address.
Even if I can figure out how to print a receipt I manually made in Illustrator. I'm content doing that as well.
Please help me figure this out.
Edit: Would it at all be possible to pay someone to make some sort of noob-friendly setup where I just change lines of text and click print and get the result I want?
Would this be costly?
Would I be better off learning how to do this myself?
According to this manual, page 64, it'll be Javascript. But this document talks about the TMT88V-i, and you have a TMT88V. I'd suggest you to try this out in order to be fixed.
I'm looking to build a website with a story based flow using Javascript and jQuery to manage the 'flow' of the story. The best way to describe what I'm looking to do is with an example.
In this example they use an Ajax loader plugin called Lazyload to load assets from another JS file (Looks like underscore.js formatted, maybe?). It looks like a very complicated way of achieving something that should be easier, though, IMO.
As a starting point, all elements could be on the page and hidden with .(hide), the click of each button would reveal and scroll to the relevant item, a class would then be added to that button to make them greyed out and unclickable. Or maybe use Ajax to call in story components as they are needed? What do you think is the simplest and best way of doing this?
According you want to use the long-story-version:
Well my very first idea of how this could work was to store each StoryPart (lets call it Item) in a special File which you can load with ajax later.
Then it would be possible to define a possible storyPath where you can use itemId's.
Does this help you?
Depending on the amount of data you need to load, I would do this:
Load the page normally (without the story)
Display some kind of loading/waiting interface to the user while requesting the whole story by ajax call
Show only the first item after ajax completes
Hide the "wait" interface from the page
Hope this helps
I am wanting to find a way I can have others edit a html webpage (found locally) and allow them to save the changes they have made.
I know this is an odd request, I have a very specific idea in mind, which I will include below as an optional read for those interested.
I found that this code in the address bar works for the editing: document.body.contentEditable='true'; document.designMode='on'; void 0
Then I found that just adding:
<div id="columns" contentEditable="true">
gets the job done since I can edit the html.
The problem is that I cannot save the changes. I have tried saving the page in several different formats, including webpage/complete, HTML only, TXT file.
Is there anyway to save these edits whether by saving the HTML or using some other kind of simple storage?
Reasoning:
I have a simple local html page I will be using with other co-workers. These co-workers are not very tech-savvy (even less than me). The very mention of trying to explain how to edit the html and make changes to the text created blank stares, and an unwillingness to work on the project. I would very much prefer for them to be able to edit the text of this HTML page from the front end and not mess up any of the coding.
Also, I have installed a Xampp server, and wordpress - this has become a bit overkill for the purpose and again, has confused the others.
Thanks,
Go into JavaScript. Select and right-click on . Click copy as html. Then save into a .txt file somewhere. If you want to restore the website, right-click on and select Edit as html. Copy/paste the code in. Then it's back to normal.
You can use localStorage to save the data in the user's browser.
I know this is a problem I could solve with a huge list in "innerHTML", but there's got to be a better way.
I'm making a webpage with a "search" and "browse" section, both are big buttons at the top of the index page. I have search.html and browse.html, but I want their contents to load in my "main" div on the index page rather than open their own pages. I should be able to quickly click between "search" and "browse" and have their different pages load back and forth inside the index page. Hopefully that makes sense. I was trying a solution with frames before, but it wasn't working for me.
Any advice would be greatly appreciated.
Thanks!
You can use tabs or something like that: http://jqueryui.com/demos/tabs/
Most JavaScript AJAX libraries such as jQuery have this built-in - in case of jQuery the load method.
However keep in mind, "tricks" like this destroys the browser usability for your users (broken back button, not possible to set bookmarks, etc.). It's possible to work around, but that makes extra work.
Is there is any way to hide asp.net page view source?
If you mean, can you hide your ASP.NET code: it's not visible in View Source.
If you mean can you hide your HTML: you can discourage casual peeking by creating your HTML on the fly via Javascript or AJAX, but a developer will always be able to see what you are doing, using simple tools like Firebug and Fiddler.
Edited to add:
I wasn't thinking of obfuscation (though that also discourages casual peeking), I was thinking of using javascript to pull down HTML. Doing a View Source will only show a bunch of <SCRIPT> tags.
But it appears his question has been revised to go in a different direction anyway, to can I keep people from downloading my images, and the answer to that is a simple no. Making money from small numbers of images is not a viable business model. (If you have thousands of images, that's another story.)
Edited to add:
The conventional way of making a catalog of photographs is to [a] show low-resolution previews, [b] put a watermark on each image (here's an example), or both.
Are you talking about ASP.NET or the result? Since ASP.NET is server-sided, it simply returns HTML. Basically, your ASP.NET file is processed by the server and variables and functions are converted into HTML. Your users can view the HTML but not the ASP.NET as it resides on server.
No, there is no way to hide the html source of a page. It's just not possible. There are tools that will promise the ability to do this, but don't believe them. Consider that it might not even be a traditional web browser that downloads the html.
What you can do is obfuscate it a bit, but even that is trivial to reverse.
No, you can't hide HTML, and there's no point either. There's nothing of value in the HTML. It would take maybe a couple hours for a skilled developer to replicate the look and feel of a website without even glancing at the HTML. In fact, it would probably be easier for him to do it his way.
The ASP/code-behind, however, already isn't visible. It's processed on the server and outputs HTML. Only the HTML (and CSS etc.) makes it to the client.
Reading the comments, it appears you want to prevent users from downloading your images. You can't really do that either. You can make it a lot more difficult for users to download them by embedding the images in Flash, or a Java applet, or something like that, but a determined thief could still decompile it and nab your image. Easier yet, he could just take a screenshot and save it out.
The best you can do is restrict access to the image to only certain users by making the image source point to a script instead that runs some validation before outputting the image.
This is not true you can hide source code. One way would be to write a loop that puts a 100k /n in the source code at the top. So it will push it so far down with white space that you can see it :-)
Where there is a problem there is a way.
And for all those who dont like this. Amazon used to hide there code somehow until sometime back.