15,127 Topics
| |
Hello Lets say in the localStorage object I have the following: Apple = red Potato = brown Gum = blue And I want to search thru it for the word Potato and then get its value (brown). How could I do this? Im thinking: for (var i=0;i<localStorage.length();i++) { if (localStorage[i]=="Potato") … | |
Hi, I know it's possible to add actions for elements that are not in DOM yet, like $(element).live('event',function() { //code here }); Is there any way to execute the code without the event, or give it an event like 'exists' ? Like, when object is added, the function executes automatically, … | |
Hi all. I need to fix a bug in a code, it is not displaying properly (it appears in the upper-left corner and when I try to click on it, the page reloads). I cannot figure it out myself. Please help. <div class="btn_center" style="padding: 0 0 10px;"> <fieldset> <div class="edit_entry … | |
I'm working on my first web app, and have a simple version of the application working. It allows the user to create and edit a fantasy map from a set of terrain tile images - but I can't figure out how to make it print. A print preview (and an … | |
Here is the code: var Circle = function( radius ) { var _radius = radius, _area = function() { return Math.PI * _radius * _radius; }, _perimeter = function() { return 2 * Math.PI * _radius; }; this.radius = _radius; this.area = "Area" + _area(); this.perimeter = "Perimeter" + _perimeter(); … | |
Any way to show "printed success" message in website after printing completed in printing machine? I need to implement this function in my client website using either .Net, jquery, java script. CONDITION: The data displayed in grid with "print" option when user click the "print" the default browser print dialog … | |
Hi folks, I am aware this is a problem that many people have, but I am yet to find an answer... I have a 10x10 grid generated using a html `<table>`, each cell has an id reffering to its location (ie. #15 - row 1, colmn 5). All I need … | |
HI! my friends, Now I am trying to make a drop down which will show image map by selecting image from drop down,please check this link http://www.siteexperts.com/dhtml/ch9/chapter/samples/map1/switch.htm it's very similar to what I want to make but it has one pic. Please help me! thanks for your time! | |
I have this chunk of jQuery that is doing strange behavior. When I load the page, my list is slided Up (completely folded) wich make sense. But I have to double click each parent to slide them down, which is not the normal behavior. I think this line is the … | |
Hi i have an issue using top to bottom plugin, while it works, the problem is that the image is visible only on top and while i scroll down the image stays top. Below is the code: <html> <head> <style> #main { float:left; width:500px; background:#c9c; } #sidebar { position: fixed; … | |
Hi all, I wonder if you can help me at all. I need to display one ul list into separate (3-4) columns one next to the other one, only if the number of items is bigger than 6. Let's look at the following code. Html is: <div class="wrapper"> <h2 id="first">First</h2> … | |
I am a big fan of the jqtransform plugin [URL="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/"]http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/[/URL] but have discovered that when you add to many select fields on a page, the bottom half of the select fields do not open the option fields. I have a form which takes an passenger's date of birth, but there … | |
My boss has several projects where i need to change out information. I did one with an included file of several divs that are hidden/shown, depending on what the user clicks on. It got tedious. But I don't have access to mysql to set anything up. Now I'm doing another … | |
Javascript string search string in array not working here is my code Mycode var array = ["foo","fool","cool","god",'searchstring']; var src_keyword=""; $("#search_str").click(function(){ src_keyword=$("#str_search").val(); find(array,src_keyword) }); function find(arr,src_keyword1) { var result = []; alert(src_keyword1); //src_keyword1="oo"; for (var i in arr) { var search = new RegExp(src_keyword1, "gi"); if (arr[i].match(search)) { alert(arr[i]) result.push(arr[i]); } … | |
What are some common uses of HTML forms that contain just one text input and a submit button? The only one use I find is to submit search queries. Is there some other reason why this is commonly used? | |
I know how to set it to auto jump to the next field in the form after a certain number of characters are entered. But that's not what I need. I need this: If number 2,3,4,5,6,7,8, or 9 is entered, I do want auto jump to the next field. However, … | |
Dear all, I can use this code to write a value in parent window control. [CODE]StrJScript = "<SCRIPT>parent.document.forms[0].TxtCustomerId.value = '" & ClearSpace(Row.Cells(1).Text.Trim) & "';</SCRIPT>" If Not ClientScript.IsClientScriptBlockRegistered("S1") Then ClientScript.RegisterClientScriptBlock(Me.GetType(), "S1", StrJScript) End If[/CODE] but, I cannot set iFrame visible to false. I use this code : [CODE]StrJScript = "<SCRIPT>parent.document.form1.iFrmCustomer.visible = … | |
hi i have a simple website that includes a WebService and a Webform page. i'm trying to call my web service from the web form using jquery. when i type the web service's url using https, i get "Access denied" error from internet explorer. the call works just fine when … | |
Hi All, How can we set a value to iframe textbox element either in JS/Jquery <head> <script type="text/javascript"> function load() { alert("Frame is loaded"); myframe.document.getElementById("user_email").value = "<?php echo $var ?>"; } </script> </head> <body> <iframe onload="load()" id="myframe" name="myframe" src="http://www.gigpayrr.com/signup" width="700px" height="600px"> <p>Your browser does not support iframes.</p> </iframe> </body> | |
I've gone through Code Academy's beginner's JS course. I would like to not only practice what I've learned more, but now move on to interdemiate lessons. Is there a site like Code Academy offering such things for free and online? | |
Hi, I have a problem.I have a third party HTML/Javascript code in which they have text area.They post the content of the text area when user press enter. there is no button to submit the form. So I wanna know how can I submit that form using javascript. Thanks. | |
Can anyone point me to the right direction with validating a input field like this "p99” (i.e. a letter followed by two digits). | |
Hello all, I am looking for a way to code up an exit popup. The problem I am having is a way around the alert box that pops first asking if the user would like to leave or stay on the page. I would like to show an small html … | |
Hi, Can anyone tell me why no 'products' are being displayed from the JSON file? This is my code: products.html: <!DOCTYPE html> <html> <head> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <meta content="utf-8" http-equiv="encoding"> <style>img{ height: 100px; float: left; }</style> <link rel="stylesheet" type="text/css" href="style.css"> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script> $.getJSON('products.json', function(data) { $.each(data.products, function(i, item) { … | |
Hi guys, I am getting very weird issue here. On my wampserver, this script works fine but not on my liver server which is linux. This is what it does. After a checkbox gets checked, the scripts identifies that and insert a row in table and that script send back … | |
Hi, so I have developed a top fixed navigation bar at the top of a webpage. How do I incorporate a fading navigation bar so that when I scroll down, the fixed bar turns from black to a certain opacity level? Is that something incorporating jquery? And if possible, if … | |
I have the following code that gets input from users on a button click and draws on a canvas but when i click the button nothing works. Here's the code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="mycss.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js.js"></script> <title>CANVAS</title> </head> <body> <canvas … | |
In order to make my AJAX functionality a little more efficient I've added a cache component; but this has given me a huge new headache. The AJAX related code is below. It listens for a click and checks if the user has already clicked that link. If not, it'll fetch … | |
****** good day im new to this forum and i hope you can help me, I'm new to javascript i need to achieve a few things. my goal is to put a running timer for each text box generated ive read tutorials online and tested some codes and so far … | |
Hi I have a datepicker: <input class="dmxCalendar2" name="dmxCalendar21" id="dmxCalendar21" /> <script type="text/javascript"> // <![CDATA[ jQuery(document).ready( function() { jQuery("#dmxCalendar21").dmxCalendar2( {"altFormat": "yy-mm-dd", "condDates": [], "firstDay": 1, "showOn": "both", "duration": "slow", "showOptions": {"direction": "up", "easing": "swing"}, "yearRange": "c-10:c+10", "onSelect": "MM_goToURL('parent','allactstest.html');"} ); } ); // ]]> </script> And also a script: <script> var chosenDate … |
The End.