15,120 Topics

Member Avatar for
Member Avatar for Violet_82

Chaps I have an interesting and odd problem. Today I had the brilliant(??) idea of using google chart https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart#Loading for a site I am building. It is all nice and dandy till I placed the graph inside a hidden container, planning to add some jquery and slide the graph down …

Member Avatar for Violet_82
1
619
Member Avatar for McLaren

yesterday I was disucsing with more experienced programmer. He saw that I am using for (var i =0; i< 6; i++) So 6 is the static number. I was iterating throug array. He said to use lengh, just in case array lemngh is not 6. I say - its always …

Member Avatar for McLaren
0
168
Member Avatar for Navlag

I have this: $(document).ready(function() { $('input[type="button"]').click(function() { var sum = 0, count = 0, result; $('input[type="text"]').each(function() { var val = Number( $(this).val() ); if (val && val >= 0) { sum += Number(val); count++; } }); the error is that it does not take zero into account, for example, 10 …

Member Avatar for paulkd
0
215
Member Avatar for McLaren

Hello, there is overridden collection fetch function. fetch: function() { var collection = this; $.getJSON(this.url, function(data) { // do some processing to data here collection.reset(data); }); }, I need to do processing when I get data, so thats why overrride. But the thing - is - the models change event …

Member Avatar for McLaren
0
99
Member Avatar for polashdeb

I am newbie in learning javaScript.When investigating a site source codes i've got some scripts. in repl.html folder there is bmi.js.My question is why they use this script? or a understandable article will be helpful for me. thannks for reading.

Member Avatar for polashdeb
0
96
Member Avatar for sonicx2218

So I'm using this program that has 2 important sections of code that determine the iframe height and width. if (!images[imageIndex][2]) images[imageIndex][2] = ''; // Thanks to Leo Feyer for offering this fix WH = images[imageIndex][2].split(' '); WHL = WH.length; if (WHL>1) { mediaWidth = (WH[WHL-2].match("%")) ? (window.getWidth()*((WH[WHL-2].replace("%", ""))*0.01))+"px" : …

Member Avatar for sonicx2218
0
202
Member Avatar for deej_uptheowls

http://codecanyon.net/item/ajax-contact-form/full_screen_preview/50846 I bought this contact form that validates and produces a message when its complete. The validation messages are all in with the form. But when I try to integrate it into my page "contact.html", the validation messages popup in a new window "contact.php" and I dont know how to …

Member Avatar for deej_uptheowls
0
693
Member Avatar for atikah8890

Hi. I'm using JS for d3. What I intend to do is get some data from database and plot them in a diagram I've created. Here's what I've done so far: Fetched the data from database: <?php while($row = mysql_fetch_assoc($query)){ $q_id[] = $row['q_id']; $res_val[] = $row['response_value']; $chpt[] = $row['cr_chpt']; $lvl[] …

Member Avatar for atikah8890
0
331
Member Avatar for turpentyne

I have a script that loads in content using jquery. With the popstate/pushstate function everything is working beautifully, when they click on navigation links. But I also have some a href tags on one of the loaded pages for sliding down to anchor points on the page. This seems to …

Member Avatar for LastMitch
0
133
Member Avatar for Cravver

I have this code here and I need to know how to make it randomize the amoutn of images there are: Currently it shows the images, and uses a cookie so the image doesnt show up more than it needs to, but i need to randomize the image order instead …

Member Avatar for Cravver
0
365
Member Avatar for Manuelphp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Webpage</title> <link href="page.css" rel="stylesheet" type="text/css" media="screen" /> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <link href="test.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script type="text/javascript" src="date_ime.js"></script> <link rel="stylesheet" media="screen, print, handheld" type="text/css" href="calendar.css" /> …

Member Avatar for LastMitch
0
193
Member Avatar for tanmay.majumdar2

hey, fellas.. I was gonna make a simple website.. Which somehow explains you about the readystate exchange,. But i am not getting the desired ouput. Please help me out.. I am ginna upload the codes, of the javascript and the html file.. the javascript file {a.js}: http://codeviewer.org/view/code:33b6 _______________________________________________________________ the html …

Member Avatar for LastMitch
0
199
Member Avatar for scarcella

can someone please tell me where im going wrong here? window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB; if ('webkitIndexedDB' in window) { window.IDBTransaction = window.webkitIDBTransaction; window.IDBKeyRange = window.webkitIDBKeyRange; } var VULY_DB = {}; VULY_DB = {}; VULY_DB.db = null; VULY_DB.onerror = function(e) { console.log(e); }; VULY_DB.open = function() { var …

Member Avatar for LastMitch
0
238
Member Avatar for jenny1975

I have two array's Array1[1,3,5,7,4,0,8] Array2[1,5,8,3,4,2,9] What I would like to achieve is an output count = 3( three of the numbers 3,5,8 from Array2 are in Array1 but in the wrong place) using Math.min. Can someone explain this process to me please. Thank you

Member Avatar for dilan91
0
170
Member Avatar for Zagga

Hi folks, It's a bit unusual for me to post in the javascript forum but I'm after a bit of assistance if possible. **The scenario:** I have a form with text input box for a user to enter a 'quantity' in. This can be anything from 1 to 99. When …

Member Avatar for Zagga
0
186
Member Avatar for MattD00

I have set up a cookie in JavaScript to store the change to the stylesheet. The cookie is loaded using <body onload="set_style_from_cookie()"> This cookie was working fine until I set a session cookie in PHP to verity if a user was logged in session_start(); if(isset($_SESSION['username'])) { $user = $_SESSION['username']; } …

Member Avatar for riahc3
0
342
Member Avatar for webdevstudent

Which jQuery effect rotate image like in the picture I have uploaded. I saw the effect few months ago but dnt know what do we call it. Can anybody please help? Or any other plugin that will add random effects to images?

Member Avatar for webdevstudent
0
106
Member Avatar for solomon_13000

I have a form to submit the details as below: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Activate</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?ver=3.0.1"> </script> <script type="text/javascript" src="js/activate.js"> </script> </head> <body> <form method="post" name="form"> <table style="text-align: left; width: 789px; height: 715px;" border="0" cellpadding="2" cellspacing="2"> <tbody> <tr> <td style="width: 305px;"> …

Member Avatar for paulkd
0
260
Member Avatar for eburlea

Hi all. I have a grid table and I need to set globally 2 kind of values for **emptyrecords**: 1. 'Nothing to display from the DB' -> if no data is retrieved from mysql 2. 'No data matches the search' -> after using search and nothing matched. Till now I …

Member Avatar for paulkd
0
151
Member Avatar for jenny1975

I have 2 arrays that I need to compare against each other and retun the count of the same: ex: array1[abcd] array2 [adce] return would be 2 as both a and c are in same postion. I would then have to return 2,1 as a and c are in the …

Member Avatar for |-|x
0
185
Member Avatar for hiyatran

Here's my code (It doesn't work): var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); function Shape(){}; Shape.prototype.Circle = function(){ // Some code here }; Shape.prototype.Square = function(){ // Some code here }; MainMenu.prototype = new Shape(); var MainMenu = function(ctx){ this.draw{ this.Circle(); this.Square(); } } What I want to do is to call the …

Member Avatar for Troy III
-1
88
Member Avatar for brainfo

Hello all, I am having problem with jquery hover action. When ever i refresh a page the hover action is working but whenever i click on any tab (category tab section) hover action is failed. I am tired of finding solution on google. Please help me. The site url is …

Member Avatar for pixelsoul
0
173
Member Avatar for seju

hello...help me rapidly.. query is that.. when we select the mail from the select tag and then automatically display the two text box like user name and contact no.. how i do this...? but remeber it that without use button....i hope as soon as i vl get my perfect ans...

Member Avatar for arundhati dalal
0
225
Member Avatar for turpentyne

This script is set to run automatically. The syntax is stuff I'm not used to. How can I change this script to run at a later point? Such as when an image loads. Or another delayed point from when the page it's on is loaded in with ajax. Like this, …

Member Avatar for turpentyne
0
225
Member Avatar for code_rum

I have some div's one after another. When i click anywhere the first div hides and other div's shifts to fill the empty space. But the movement of other div which aren't hidden are not satisfying as it takes the place but not smoothly. I have no idea as how …

Member Avatar for code_rum
0
295
Member Avatar for furalise

Hello everyone.. I'm trying to work out how to install and use Jquery.jqplot in google chrome. I have no idea how to go about this.. I have downloaded jquery.jqplot but not sure what to do next. Does anyone know how to install this, or include this? Does it go in …

Member Avatar for furalise
0
122
Member Avatar for turpentyne

A problem's come back to haunt me, after reworking the page for other features. I have a page with a caroufredsel script in it to show a rotating slideshow. The page works fine on it's own. But I need it to work when loaded into an existing page. I get …

Member Avatar for turpentyne
0
112
Member Avatar for turpentyne

I'm trying to work in a script to fade out a div, load content and fade the div back in. But when the navigation links are clicked, the div fades out, then is completely removed from the DOM?? Here's the html: <head> <link rel="stylesheet" href="css/styles_default.css" type="text/css" media="screen"/> <link rel="stylesheet" type="text/css" …

Member Avatar for iamthwee
0
329
Member Avatar for solomon_13000

I attempted to implement image rotation using google jquery library. The problem is that the image rotation stops at 5.jpg and doesn't go back to 1.jpg to 2.jpg.........and so on. Did I miss out something? <html> <head> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?ver=3.0.1"> </script> <script type="text/javascript" src="js/img-rotator.js"> </script> <link rel="stylesheet" href="css/style.css" type="text/css" …

Member Avatar for paulkd
0
317
Member Avatar for tanmay.majumdar2

Hey, fellas. I have just started LEARNING AJAX. I am having prblems in the first website only. So this website is like a restaurant menu, which tells you the avaible food. With respect to the user's query. But its not displaying the end result. As i think, it is not …

Member Avatar for tanmay.majumdar2
0
206

The End.