15,116 Topics

Member Avatar for
Member Avatar for furlanut

When the page opens all 12 popupDiv (large) images are centered in a stack. Why ? Having closed them all, the page then behaves the way I want i.e. onclick the popupDiv appears and one can go to the next or preceding large image. Can someone explain what is making …

Member Avatar for LastMitch
0
125
Member Avatar for NewHeart42108

I have a javascript function that works fine when it is included in a <script></script> statement in the header of my php file, but when I move it to a separate .js file, it throws two errors. The function is function calculate() { var i var optCount = <?php echo …

Member Avatar for pritaeas
0
255
Member Avatar for accra

i have this ajax script <script type="text/javascript"> var url = "GetAutoData.php?svreg="; // The server-side script function handleHttpResponse() { if (http.readyState == 4) { if(http.status==200) { var results=http.responseText; document.getElementById('divAutoInfo').innerHTML = results; } } } function requestAutoInfo() { var svreg = document.getElementById("getautomobile").value; http.open("GET", url + escape(svreg), true); http.onreadystatechange = handleHttpResponse; http.send(null); } …

Member Avatar for gabrielcastillo
0
223
Member Avatar for kanoy83

hi guys, i just want to create a javascript confirm script if the file will overwrite the current file with the same filename or with a file already existing. if yes: ask to overwrite if no: back to edit file page function overwrite() { var r=confirm("The same file name existing. …

Member Avatar for kanoy83
0
2K
Member Avatar for Aleshanee

I try to create with jquery a simple hover-sliding. [Here is my example](http://jsfiddle.net/Aleshanee/BgdMY/12/embedded/result/) My first problem ist the mouseenter is, when a users the duck and while the duck slides up the user is going to mouseenter the cow, the sliding want to show both slides and do ugly stuff …

Member Avatar for LastMitch
0
177
Member Avatar for furlanut

I think this is a javascript query rather than css. The script opens and resizes images centering div on the screen. I have inserted function opendiv(id) so that one can go forward and back through the images on the webpage. This part works except that the images no longer center …

Member Avatar for LastMitch
0
137
Member Avatar for rhodoscoder

var 1 = document.getElementById("1").click(); var 2 = document.getElementById("2").click(); var 3 = document.getElementById("3").click(); if(1){ userChoice =="1"; }else if (2){ userChoice == "2"; }else if (3){ userChoice == "3"; } I'm working on code that gets user choice when the user clicks on a div.I'm attempting to 'get' the element and assign …

Member Avatar for JorgeM
0
101
Member Avatar for mattster

Hi again, We all know jQuery can really spice up a website, so what would plugins could I try to make my pages even more exiting? (ie. typeahead.js) Thanks!

Member Avatar for rhodoscoder
0
118
Member Avatar for arctushar

Hello everyone I have a web form. This form has 5 fields. I want that if someone fill up the form and submit, this form data will be save to a form. Also want this after submitting this form it will do some php process. How can I do that …

Member Avatar for LastMitch
0
78
Member Avatar for WoW Me Web Girl

here are the questions i was asked.. Please help Im a little confussed. 6.Describe (3-4 sentences) what this statement does: ("this is foo bar".match(/o/g)||[]).length 7.Write a JavaScript function that takes in a DOM element and returns a count of the number of <a> tags contained within that element (first level …

Member Avatar for WoW Me Web Girl
0
170
Member Avatar for Master Mascus

I need jquery code for DOB range validation(age should be at least 15) using the .validate() jquery function. I am not able to create the function in the rule, help anyone ?

Member Avatar for stbuchok
0
184
Member Avatar for Indians

this is my html and javascript coding. how to do contenteditable div onkeyup calculation. i tried it but i doesn't work... <td><div class="inputclass" id="quantity1" contenteditable> </div></td> <td><div class="inputclass" id="unitprice1" onkeyup="maths();" contenteditable> </div></td> <td><div class="inputclass" id="total1" contenteditable> </div></td> function maths() { var qt = document.getElementById("quantity1").value; var up = document.getElementById("unitprice1").value; qtup = …

Member Avatar for minitauros
0
1K
Member Avatar for f.atencia

I'm having trouble with the following code in IE 11 (Windows 8.1) var oAddressEditorController = angular.element(oModal[0]).controller(); // Initialise the controller with the passed options oAddressEditorController.init(poParams); // Show the address editor modal oModal.modal('show'); Error says 'Unable to get property 'init' of undefined or null reference. Works fine in other browsers and …

Member Avatar for f.atencia
0
134
Member Avatar for f.atencia

Can anyone explain why the following angular.js code gives me an error in Internet Explorer 11 (Windows 8.1): 'Object doesn't support property or method 'hasOwnProperty'' if (key != 'prototype' && key != 'length' && key != 'name' && obj.hasOwnProperty(key)) { iterator.call(context, obj[key], key); } The code belongs inside the forEach …

Member Avatar for f.atencia
0
153
Member Avatar for tqmd1

Sir, I have following codes <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="language" content="english"> <meta http-equiv="Content-Style-Type" content="text/css"> <title>Numeric Textbox</title> <style type="text/css"> body { margin-top:220px; } #bc { background-color:#FFE4B5; } #ft { font-family: "verdana"; font-size:14; font-weight: bolder; color: green; } .bt { width:100px; …

Member Avatar for JorgeM
0
267
Member Avatar for tqmd1

Dear Sir, I have following codes <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>Numeric Textbox</title> <SCRIPT LANGUAGE="JAVASCRIPT"> //------------------------------------------------------------------ function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57 || charCode == 110)) { alert("Enter …

Member Avatar for JorgeM
0
442
Member Avatar for jonsan32

My button uses the following. It produces a random post within my blog whenever a user clicks it. <div id="myLuckyPost" class="random button"></div><script type="text/javascript"> function showLucky(root){ var feed = root.feed; var entries = feed.entry || []; var entry = feed.entry[0]; for (var j = 0; j < entry.link.length; ++j){if (entry.link[j].rel == …

Member Avatar for jonsan32
0
6K
Member Avatar for Indians

This is my php & html code for show numbers in words. this works correctly `<input type="text" value="<?php include("number_words.php"); echo convert_number_to_words(123); ?>" size="70" readonly="readonly" />` this is my final total amount html code `<input type="text" name="totalamount" id="totalamount" size="8" readonly="readonly" />`. here i am doing convert numbers into words. but i …

Member Avatar for broj1
0
516
Member Avatar for SaroGFX

Hi guys, I am trying to create a fast and smooth flickering / blinking logo. With my limited knowledge on javascript i've come up with the following script that basically does the job, but the 'animation' isn't smooth at all. Does anyone have an idea how I could go at …

Member Avatar for SaroGFX
0
150
Member Avatar for narasimha9

Script i am using shown below.Date picker is showing on screen but it is applying to all input fields.( WHat should i change to get only for a particular input field. I tried with id rangeA but still it is applying to all fields. <script type="text/javascript"> $(function() { $('input').daterangepicker({arrows:true}); }); …

Member Avatar for narasimha9
0
237
Member Avatar for GeekPlease

Good day folks, I am working on a project now and I'm wondering how to detect if a div is visible in the screen while the user is scrolling on the page. Hope someone will be able to shed some light. Thanks :D

Member Avatar for minitauros
0
214
Member Avatar for kavitha N

Hi, I am looking for when you select a value from dropdown and submit. The results has to show in the same page with percentage. It is like voting. Thanks in advance.

Member Avatar for JorgeM
0
406
Member Avatar for Indians

This is my javascript code. here i am trying to multiple two values in each row (totally 7 rows) and then doing addition operation at end of the table. its worked but problem is NaN. when i entered all fields then only it shows the final value. if user entered …

Member Avatar for Indians
0
198
Member Avatar for designershiv

Hi, I like to scroll all the scroll bar at the time.first scroll is working fine.but other scroll not working anyone have idea <html> <title></title> <head> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script> $(document).ready(function(){ $('.box').each(function(){ $(this).bind('scroll',function(){ var leftPos = $('.box').scrollLeft(); var leftPos = $('.box').scrollLeft(leftPos); }); }); }); </script> <style> .box{ width:500px; overflow-x:scroll; } .clear …

Member Avatar for designershiv
0
277
Member Avatar for riahc3

Hello, We uploaded some videos in the back to YouTube and they reproduce perfectly on our webpage. The thing is, with mobile becoming more and more intresting, playing them in a HTML5 video player would be more universal. How can we make this change?

Member Avatar for riahc3
0
200
Member Avatar for piyalthunder

i want to keep the previous contents of a particular textbox in a array and want to match the current input of the textbox with the elements in the array.Please help me out with the code.I want to keep the code in a .js file.

Member Avatar for EvolutionFallen
0
59
Member Avatar for Burhan_1

There is a form that i want to submit and url rewrite at the same time. I can change url by adding onsubmit="rewrite_form(event);" option in form : function rewrite_form(e) { var form = document.forms[0]; // .getElementById("form1"); window.location = '/search/' + form.f.value + '_' + form.t.value + '.htm/' + form.amt_from.value; if …

Member Avatar for diafol
0
752
Member Avatar for rhodoscoder

i have a form that posts to a database and i was testing code that prevents any javascript or othe client-side scripting from being submitted to the database.All javascript code i submitted ended up in the database, i figure this is bad.How can i prevent this?

Member Avatar for cereal
0
217
Member Avatar for gahhon

<script type="text/javascript"> $(document).ready(function () { var e = document.getElementById("ddlCategory"); var value = e.options[e.selectedIndex].text; if(value == "Others") { $('#Other').show(); } else { $('#Other').hide(); } }); </script> <table> <tr> <td><asp:Label runat="server" Text="Category: " /></td> <td><asp:DropDownList ID="ddlCategory" runat="server" ClientIDMode="Static" /></td> </tr> <tr id="Other" style="display:none"> <td><asp:Label runat="server" Text="Others: " /></td> <td><asp:TextBox ID="txtOthers" runat="server" /></td> …

Member Avatar for gahhon
0
117
Member Avatar for faysal.ishtiaq_1

This code snippet can be used to get the current time in 12 hour format using JS

0
2K

The End.