I have a basic editor based on execCommand following the sample introduced here. There are three ways to paste text within the execCommand area: Ctrl+V Right Click -> Paste Right Click -> Paste As Plain Text I want to allow pasting only plain text without any HTML markup. How can I force the first two actions to paste Plain Text?
Tag: html
Put javascript and css inline in a single minified html file to improve performance?
A typical website consists of one index.html file and a bunch of javascript and css files. To improve the performance of the website, one can: Minify the javascript and css files, to reduce the file sizes. Concatenate the javascript files into one file and similar for the css files, to reduce the number of requests to the server. For commonly
How to create a login page for a user that checks their password on the client side
How do I create a login page that checks for a correct password on the client side and goes to the next screen if the password is correct? Here is my attempt: Answer
Javascript disabling Div element on submit
The code below just hides the movie that I am playing behind. Remove element (if possible) or disable it, specially movie playing in background. I tried using document.video.disabled=true; but its not working. Any idea how to go around this problem please? Answer Try
Alternative to Javascript prompt box for younger users [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 7 months ago. Improve this question Can anyone can suggest an alternative to Javascript prompt box that
HTML button to submit a form elsewhere on the page
I want to have a form on the main section of my webpage with buttons along the bottom of this section to submit it. I also want to have a side bar with links to other pages, but make it so that whenever a link is clicked it acts as a button to submit the form too. (ie in the
Basic example of initKeyboardEvent
I’m trying to find a basic example of the use of initKeyboardEvent(). Ideally, I want to create a keyboard event where when the enter button is pressed when a user is typing in one input field, another input field will be shown using jQuery. Does anyone know where I can find a basic understandable example of using initKeyboardEvent()? Answer initKeyboardEvent
Submit a form with mouse middleclick button
I’m working on a system and I want to make the system easier to use. I have few forms on a page and huge tables in each. I’m not good at JS so any advice would be appreciated. Answer Use a click event listener: EDIT: As per the new jQuery tag, it’s slightly faster:
Logic for multiple and single select/combo boxes
Below is my code: When select-box or combo-box is looped for ten times then I am getting form[“city”] length as 10 properly and behaviour of alerts within combox-box is appropriate, but if I have a single-select-box, then instead of giving form[“city”] length as 1 it gives it as 4 which is the number of option elements in my dropdown-box. So
Use document.write() to write the result in a separate page
I am writing an html code into javascript using document.write(). But the result came in the same page, I want to display the result in a separate page. So this table is being displayed in the webpage, I want this result to be displayed in another webpage. Answer Try this