15,116 Topics
| |
The code below ensures that my entry is only numeric with 2 decimal. <input type="text" maxlength="10" name="numPrice" value="1.00"> $("input[name='numPrice']").keyup(function(){ if(!(/^\d+(\.{0,1}\d{0,2})?$/.test(this.value)) ){ this.value = this.value.substring(0, this.value.length - 1); } return this; }); However values such as 1&.0 is not rejected by the code above. Did I miss something? | |
Hello, I'm seeking an onmouseover event to detect when the mouse hovers the top of the webpage. I'm only able to find onmouseover events for the whole page. How to restrict to just the very top of the page? Need only support modern browsers, simplest method possible. Thx! (also asked … | |
All, I'm trying to call in my first dyanmic JavaScript function OpenDynamicPic the BreedVideoOpen(videopath) function so that the dynakic image appears on the left and a video appear on the right - however I seem to be getting the BreedVideoOpen functions output keeps appearing in the top left of my … | |
I need to know if its possible to show a window.open pop-up while navigating away from the current page; currently based on event.returnvalue for any change in data we IE shows a confirm popup "Are you sure you want to navigate away?". On clicking 'OK' to the above question, i … | |
What is the use of tiny mce javascript library ? I m working on jsp project were it uses tinymce.js . i actullay dont know what it does . | |
any ideas on how to deploy a node.js app on vps with flight plan? using a windows operating system | |
How can you pass command line arguments to the Node.js? | |
We can all agree that [CSS Modules](https://github.com/css-modules/css-modules) are awesome. However, their integration to React does not feel natural: import React from 'react'; import styles from './car.css'; export default class Car extends React.Component { render () { return <div className={styles.car}> <div className={styles.frontDoor}></div> <div className={styles.backDoor}></div> </div>; } } What if we could … | |
Hello Guys, How can i check if it happend new events in server in real time without refreshing the page with js? I dont want to use node.js or ajax or html5 SSEs. | |
hi I am new with ajax and i want to multiple image upload in a ads post site. please help me | |
I am trying to integrate elFinder and TinyMCE using the advanced method found here: https://github.com/Studio-42/elFinder/wiki/Integration-with-TinyMCE-4.x When I click the image icon in TinyMCE, elFinder will appear in a popup window, and when I double click on a file in elFinder, it should include it in the editor. However, the following … | |
Hello, Thank you for your time. I know it is possible to create an exit button using javascript but this only work in ie browsers and not what i want(i found a fix for it but isnt very good), can somebody please show me a better way of closing all … | |
Hi i am looking for a script to put on my website that will have the following Number of Pallet Spaces (customer to enter 1 2 or 3 ) 1 0.95p per mile 2 1.10 per mile 3 1.25 per mile Price per mile not to be shown on the … | |
Hi everyone, Im looking for a simple function to add / remove a table row for my website. I have searched high and low for a script that does it... but no dice... can anyone shoot me a link or post a snippet of code that would enable me to … | |
I have a form where a listbox will load a list of names (lastname, firstname) and when the user select a name and click " >> " button it will display into a textbox, but as the names display into the textbox, it will just display the lastname instead of … | |
Hello, I own five groups on facebook and use my groups to promote my own services. I was thinking about coming up with a script (or is there a truly free, unlimited service?) that will "bump" posts by commenting on them. Or even post a brand new post using a … | |
Hi all, I have an issue where I can console log the url when it in a var but the moment that I add it back to the page within html it strips the forward slashes. does anyone know why this would happen. I have tried to change this in … | |
Hello, I have a website that uses the user timeline widget from Twitter. A couple of days ago, it stopped displaying the widget and instead just shows "tweets from @username". I haven't changed and javascripts or anything, so I'm not sure whats changed. The error console says [code]TypeError: t is … | |
Hello, I would like to ask you that which is good library(angularjs jquery react blabla or simple js)/method/technique to get safe input value from users(to prevent csrf and xss or any other malicious) ? which is more safe `document.getElementById();`or` $('#id/.class');` and what is bind data? explain me this in poor … | |
I attempted to access the code below using safari browser but the input mask accepts any value which is wrong. <html> <head></head> <script src="C:/Users/marieeugene/Desktop/inputmask/jquery-1.11.1.min.js" type="text/javascript"></script> <script src="C:/Users/marieeugene/Desktop/inputmask/jquery.inputmask.bundle.js" type="text/javascript"></script> <script> $(document).ready(function(){ $(":input").inputmask(); }); </script> <body> <input data-inputmask="'alias': 'numeric', 'groupSeparator': ',', 'autoGroup': true, 'digits': 4, 'digitsOptional': false, 'prefix': '$ ', 'placeholder': '0'" … | |
I have started learning javascript and am currently at an entry level. I have tried other languages like C++, C#, maybe python a little. all at a beginners level. point is - I guess I get the basic handle of things. question is - where can I write code that … | |
Hi friends i am trying to display dynamic dropdown using php. but it is not fetching the second dropdown value. I collected the below code from internet. please help me to fix it. <?php $dbc = mysqli_connect("localhost","root","escape123","tsheet"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " … | |
Hello, Please cek this website: http://www.innovation.web.id/One/portfolio-filter.php This is the code: portfolio-filter.php <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Portfolio</title> <link rel="stylesheet" type="text/css" href="css/style.css"> <link rel="stylesheet" type="text/css" href="css/carouselstyles.css"> <link href="http://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="bootstrap-3.3.5/css/bootstrap.min.css"> <link rel="stylesheet" href="bootstrap-3.3.5/css/custom.css"> <script src="bootstrap-3.3.5/js/jquery.min.js"></script> <script src="bootstrap-3.3.5/js/bootstrap.min.js"></script> </head> <body> <?php include('nav.php'); ?> <br><br><br> <div style="text-align:center;"><h2><b>Our Portfolio</b></h2></div> <p> … | |
Hi, does anyone know how I could search for the protocol used in CSS? I did try use "document.querySelectorAll" but failed to get it working. So basically I am trying to find out via Javascript if CSS is calling the http protocol for example: <style> body { background-image: url("http://mysite.com/images/logo.jpg"); } … | |
I have two date fields. One field is from date and second one is to date. While the cursor moving from second date field to submit button, I have to compare the two dates. if from date greater than to date it has to display error and has to empty … | |
Hey, I'm trying to (using bootstrap btw), have a page with a header and an iframe. I want the iframe to take up the remainder of the page's height and 100% width. This is my code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> … | |
To begin with, I'm a noob to JavaScript. How do I add functionality to the main loop, or something similar? | |
What are the differences between **htmlspecialchars()**and **htmlentities()**. When should I use one or the other?Explain me in poor words | |
How to flip multiple div when clicked on menus? Current code is working for only last two div's. [code in work on jsfiddle](http://jsfiddle.net/Lucdd/) **HTML** <ul class="nav"> <li><a href="#home">home</a></li> <li><a href="#about">about</a></li> <li><a href="#work">work</a></li> <li><a href="#contact">contact</a></li> </ul> <section class="container"> <div id="card"> <div class="front flipper" id="home">home</div> <div class="back flipper" id="about">about</div> <div class="front flipper" … | |
I am using jQuery and prototype libarary fro this project. I have this code so far: HTML: <div id="cnt"></div> <input type ="text" id="bla" name="tct"/> Javascript: if(e.keycode == 13){ var text = document.getElementById('#bla'); text= $('#bla').val(); //text.evaljson(); //I put a comment because it gives me error "badly formed json string" $('#cnt').append(text); } … |
The End.