I’m trying to do some experiment with HTML5, WebSocket and File API. I’m using the Tomcat7 WebSocket implementation. I’m able to send and received text messages from the servlet. What I want to do now is to send from the servlet to the client JSON objects, but I want to avoid text message in order to skip the JSON.parse (or
Tag: html
How to show setCustomValidity message/tooltip without submit event
I’m using forms basic validation to check if email is correct format, then the data is sent by Ajax where it checks if email address is already in use and did the user select country/state or left default values in select boxes. But for HTML5 form validation to be done submit event is needed, upon clicking submit if it passes
Using AppMobi and Events
I am new to the new AppMobi world, so can you please help me. I have created an image object and have drawn it to the stage. My problem is that I want to add an event to object. I have set the image using: And I have drawn it to stage: Now I want to add an event to
How to capture browser close event and make a request to web service method on that event through JavaScript
I have a application where I am doing recording through a third party device using it’s API on my page. Recording is started and stopped through a asp.net web service.. I am able to start and stop the recording through JavaScript in normal cases and the functionality works fine in all browsers. But, once accidentally one user without stopping the
Three.js WebGL texture shows up black on plane
So basically, I have a scene in WebGL with 2 planes. One of them has a transparent texture on it and it shows up fine. The other is supposed to have a high res, non-transparent texture loaded up on it and it is used as a background. I can’t figure out why the background plane isn’t working, since I directly
Limit min/max integer on javascript variable
Im trying to make a talent calculator of sorts, clicking the ‘skill’ will decrease this variable and right-clicking will increase the variable. The problem i have is i want the variable to be limited from going over 50 or below 0. Now ive googled and searched here for variable limits and max integers but nothing gives me an idea how
Focus an enter key to a specific button
I am currently facing a problem. I need have a form to be fill by a user ie: So now I need the way to focus on the ‘Save’ button when a user has filled the last text box in a form, so that even when the user clicks on the ‘Enter’ button the save event get run. This usually
jQuery toggle function disorts text
I have some functions to toggle 2 parts of an HTML if I click the ‘rejt’ button. Normally it looks like this: But after using the button to toggle it back again, it gets disorted like this: Please help me fix this. Code sample: Answer First of all, what’s with the font and id tags? Not sure what jQuery is
Making line numbers uncopyable
I’m working on adding line number support to Rainbow, a syntax highlighter, but I can’t figure out how to make the line numbers uncopyable. Disabling selection via user-select: none; makes an element unhighlightable, but you can still copy its text by highlighting around it and then copying, which ends up copying the line numbers along with code. Here is a