Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
92% Quality Score
Upvotes Received
37
Posts with Upvotes
21
Upvoting Members
15
Downvotes Received
2
Posts with Downvotes
1
Downvoting Members
2
4 Commented Posts
3 Endorsements
Ranked #486
Ranked #406

120 Posted Topics

Member Avatar for someone5

Hi someone5, If you keep this pattern `tr/td/input` this will be ok. The snippet supposed you start at input. I also have a JSFiddle made, here's the link: [JSFiddle Example](http://jsfiddle.net/PehPj/) //Colors the input.child's closet TR.menu $("input.child").parent().parent().each(function(){ var $this = $(this), $target = $this.prev(); //looks for previous sibling with menu class …

Member Avatar for hari_19
0
14K
Member Avatar for faisal6621

Hi Faisal, You can show the loading image right in the click event and use jquery's deferred method `always()` to hide the loading image. Here's a sample script: $(document).ready(function() { $("#submit").click(function(){ var acc = $("#accountNumber").val(); src = "pass.php"; //show your loading image $("#loading").show(); $.ajax({ url: src, data: 'action=account&type=viewDetail&accNo='+acc, cache: false, …

Member Avatar for Hoven_1
0
3K
Member Avatar for ebc3142

Looking at the aspect of seeing only a function for checking if the user's loggedin, and if not would redirect, clearly, there's no problem. :) Can you show us the logout script and your login? Specifically in the logout script the part where you unset the "user" variable in the …

Member Avatar for lisandroivan
0
2K
Member Avatar for monching

Although there are numerous ways to insert multiple records in a database, the easiest way is this: INSERT INTO [TABLE] ( [COLUMN1], [COLUMN2], [COLUMN3]) VALUES ( [COLUMN1_VALUE], [COLUMN2_VALUE], [COLUMN3_VALUE]), ( [COLUMN1_VALUE], [COLUMN2_VALUE], [COLUMN3_VALUE]), ( [COLUMN1_VALUE], [COLUMN2_VALUE], [COLUMN3_VALUE]), ( [COLUMN1_VALUE], [COLUMN2_VALUE], [COLUMN3_VALUE]), ( [COLUMN1_VALUE], [COLUMN2_VALUE], [COLUMN3_VALUE]), ( [COLUMN1_VALUE], [COLUMN2_VALUE], [COLUMN3_VALUE])

Member Avatar for icebergman
0
2K
Member Avatar for Siberian

Try this: **HTML** <div id="element-to-be-commented"> <div>Some div...</div> <div>Inspect the element underneath this</div> </div> **JS** var commentContainer = document.getElementById("element-to-be-commented"); var data = {name: "gon1387", notAnotherArray: [2,4,1]}; // Convert the object to string through JSON api // then create a comment out of the result var convertedData = document.createComment(JSON.stringify(data)); // Put the …

Member Avatar for diafol
0
189
Member Avatar for anku83
Member Avatar for ethan.david.376

Hi ethan, Though not the same as your request, you can do it through css alone. Having this kind of html structure: <div class="checkBox"> 1 <input type="checkbox" /> <div> 1.1 <input type="checkbox" /> 1.2 <input type="checkbox" /> <div> 1.2.1 <input type="checkbox" /> </div> </div> 2 <input type="checkbox" /> <div> 2.1 …

Member Avatar for gon1387
0
222
Member Avatar for gon1387

Hi! I would like to know if anyone here have attempted installing Redmine V2.3.\* on IIS? If you did, can you please direct me to the right direction. What are the things should be done? I had tried it on my own, but I kept on having errors like "Gem::Installer::ExtensionBuildError: …

Member Avatar for LastMitch
0
303
Member Avatar for YakuzaJevin

If you wanted a redirect through JS you can either do it like this: window.location.href = "http://www.google.com"; OR this window.location.replace("http://www.google.com"); OR this window.location = "http://www.google.com"; Let me know if that's what you want or not.

Member Avatar for YakuzaJevin
0
235
Member Avatar for hindu times
Member Avatar for gon1387
0
467
Member Avatar for Vinodh_1

You can use this: [setQueryTimeout](http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html) If I get you right and you don't want to set it on a DB level; if so, you have to configure it base on what DBMS you're using.

Member Avatar for Vinodh_1
0
1K
Member Avatar for NettSite

I'm not a fan of synchrounous request in JS. Everytime I see this in someone elses code I'd always think of browser's code execution limit, especially when it's inside a loop (which really is not a good practice). Hopefully these references might help you: [Browser Execution Limit](http://www.sitepoint.com/javascript-execution-browser-limits/) [Recursive SetTimeout](http://www.erichynds.com/blog/a-recursive-settimeout-pattern)

Member Avatar for gon1387
0
4K
Member Avatar for Sabyre

Hi Sabyre, >Problem is, I don't have much of any experience with JS. >Is this a possibility? Is there another more effective/efficient was to accomplish this? Yes, I believe, you see php and javascript has interworked in one script file in the client side. To make it clear, php are …

Member Avatar for Sabyre
0
247
Member Avatar for Lucardy

Can you please make it clear if this one's intentional? `// function setCookie('TheCookieName', 'MyValue', '3', '/', '.mywebsite.com', ")` It's located at line 3 of your second example. Currently, it's commented and wouldn't run the function.

Member Avatar for Lucardy
0
1K
Member Avatar for DamzWildfire

Hi DamzWildfire, There was no issue with regards to your keydown event, as your keydown event are captured anywhere on the document. It will be a much help for us and mostly to you if you'll show your code on your "moveSelection" function.

Member Avatar for DamzWildfire
0
197
Member Avatar for GraficRegret

Hi GraficRegret, Hope this helps. //Container for the image sources var images = ["img/image1.jpg","img/image2.jpg","img/image3.jpg"], //temporary counter ctr, //Container for the images within an A element imgElem=[], //Temporary storage for the element $tempElem; for(ctr in images){ //Creates an image tag $tempElem = $("<img>"); //Assign the image source to the IMG tag …

Member Avatar for GraficRegret
0
315
Member Avatar for azegurb

Hi azegurb, Hope this doc will explain it: [Replace Doc](https://developer.mozilla.org/en/docs/JavaScript/Reference/Global_Objects/String/replace) Please look into the **Specifying a function as a parameter** section for explanation of the 4 parameters sent to a anonymous func from *replace*

Member Avatar for azegurb
0
131
Member Avatar for saadi06

Hi saadi06, JPGraph purely uses php for graph rendering. Please move this thread to php, as you might get a better answer from there.

Member Avatar for gon1387
0
221
Member Avatar for riahc3

Hi riahc3, you can do the following to parse your string result, hopefully this will give you an idea on how to implement one. var dataStr = "Name: Bob Last: Han Ken Age: 36#Name: George Last: Alan Age: 45#Name: Amy Last: James Age: 36#", storage; // Split the string using …

Member Avatar for diafol
0
518
Member Avatar for pucivogel

That problem typically occurs when you use `setRequestHeader` before `open`. To make it short, you have a typo at line 10, on your posted code: var vars="deets="+deets; //change this to this // hr.open("POST",url,true); hr.open=("POST",url,true); hr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); hr.onreadystatechange=function(){ This should be the correct snippet: var vars="deets="+deets; hr.open("POST",url,true); hr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); hr.onreadystatechange=function(){

Member Avatar for gon1387
0
162
Member Avatar for chr.s

Hi chr.s, Prototype and jQuery both uses the '$'. You have to relieve the dollar sign from jQuery for prototype and assign another identifier or use the jQuery var for jQuery operations. I can be done like this. <script src="[PROTOTYPE_URL]" type="text/javascript"></script> <script src="[JQUERY_URL]" type="text/javascript"></script> <script type="text/javascript"> //Relieves the '$' identifier …

Member Avatar for chr.s
0
284
Member Avatar for sobias

In JS you can, like in C. But it's a bad practice messing with the global directly under the local scope of a function, although on some instances it's ok. But as much as possible try to hesitate from doing so; you have to seperate concerns and responsibility. In a …

Member Avatar for sobias
0
180
Member Avatar for DamzWildfire

In javascript you can encode your url like this: var DWUrl = "http://www.daniweb.com"; //output: http://www.daniweb.com console.log(encodeURI(DWUrl)); //output: http%3A%2F%2Fwww.daniweb.com console.log(encodeURIComponent(DWUrl)); here's the description for the two func: [Encode URI](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURI) [Encode URI Component](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent) [Decode URI](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/decodeURI) [Decode URI Component](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/decodeURIComponent)

Member Avatar for pritaeas
0
129
Member Avatar for Violet_82

Hi Violet_82, Here's a dissection of the regexp. /\B - Look for any zero-width character within a word (?= - that follows (\d{3})+ - a 3 digit number (?! - and doesn't follow \d)) - another digit /g - should look globally

Member Avatar for Violet_82
0
210
Member Avatar for Travus

This is just a hack. You have to look for the part of the script in your external js that has connection with the anchor tag, and edit it. <a href="site/contact.php" onclick="event.preventDefault();$(this).closest('form').submit()" class="button"> You have to look at your external js for the part of the code that causes the …

Member Avatar for Travus
0
2K
Member Avatar for riahc3

jQuery thinks you're looking for `#cart` with attributes `[1223686][qty]`. if you want to look for that element, you have to specify the id attribute and value instead. Like this : $j("[id='cart[1223686][qty]']").click(function() { alert("Handler for .click() called."); });

Member Avatar for riahc3
0
144
Member Avatar for delta_frost

Hi delta_frost, You have to do it this way, as on the initial load of the page, it can't find any set $_FILE["file"], in the $_FILE global. Why? there where no form submissions yet. if(isset($_FILES['file'])){ $filename = $_FILES['file']['name']; $tempname = $_FILES['file']['tmp_name']; //echo $filename; $directory = 'E:/php_uploads/';

Member Avatar for delta_frost
0
204
Member Avatar for Venter

Hi Venter, Here you are :) for (var i=0;i<fruits.length; i++) { if(fruits[i]==y) { localStorage[fruits[i]]="SELECTED"; } } Let me know if you have questions.

Member Avatar for gon1387
0
118
Member Avatar for mehar89

Hi Mehar89 here you go, let me know if you have questions. var form = document.getElementById("myForm"), incInput = form["formitemquantity[]"], len = incInput.length, ctr = 0; for(;ctr < len; ctr++){ incInput[ctr].value = ctr; }

Member Avatar for gon1387
0
2K
Member Avatar for pucivogel

Hope this explains it: In a simple sense, webservice is a standardized way for you to provide data and communication to your other software or a 3rd party software. Like in your php code and your js code, how will the js code understand your php code?

Member Avatar for gon1387
0
238
Member Avatar for awfootball7

Hi awfootball7, I tweaked your code and here it is, let me know your questions. class Money { int dollars, cents; Money(int dollars, int cents) { this.cents = cents%100; this.dollars = dollars + (int)cents/100; } Money(int cents) { this(0,cents); } Money() { this(0,0); } int getDollars() { return dollars; } …

Member Avatar for gon1387
0
455
Member Avatar for welshly_2010

Hi welshly_201, The data you recieved are parsed as an array. You can use it like this: $(document).ready(function(){ $.ajax({ url: "dropdown.php", data: data_str, type: "POST", // You should put the type inside double or single quotes dataType: 'json', success: function(d) { // Alert shows "please select XML to load" alert(d[0]); …

Member Avatar for gon1387
0
198
Member Avatar for riahc3

Actually it's not that simple to get the size of the the window on different browsers, it can give you a lot of headache. :D For FF, if you're after the browser window size, then use `window.outerWidth` and `window.outerHeight`. But then, if you want to get the viewport, it's `document.documentElement.clientHeight` …

Member Avatar for riahc3
0
278
Member Avatar for Martin C++

Hi Martin C++, You can match each operator and operand using regex, like this. var str = "11+4+9-5.5/5*10"; var arr = []; var cur; // result of match for str // ["11", "+", "4", "+", "9", "-", "5.5", "/", "5", "*", "10", ""] arr = str.match(/[\*\/+-]|[0-9.]{0,}/g); // get each value …

Member Avatar for gon1387
0
402
Member Avatar for Priti_P

Hi Priti_P, A newline escape character would do for an inline and your sample would also do it. example: <?php $myString = "MULTILINE: hi this is for test"; echo "<textarea rows='6'>" . $myString . "</textarea>"; $myString2 = "INLINE:\nhi\nthis\nis\nfor\ntest"; echo "<textarea rows='6'>" . $myString2 . "</textarea>";

Member Avatar for Priti_P
0
160
Member Avatar for techyworld

I guess the best way to explain the the trivialities of this problem is this: var myArray = [0,1,2,3,4,5]; ARRAY: length = 6 index value [0] 0 [1] 1 [2] 2 [3] 3 [4] 4 [5] 5 myArray.splice(3,1) ARRAY: length = 5 index value [0] 0 [1] 1 [2] 2 …

Member Avatar for LastMitch
0
248
Member Avatar for Wailintun

Do you mean normalize further your table? COUNTRY country_id | country_name COUNTRY_STATE country_id | state_id STATE state_id | state_name STATE_CITY state_id | city_id CITY city_id | city_name This one's requires joins, and lesser the size as yours; but I would prefer your design than this cause, a DB for location …

Member Avatar for gon1387
0
909
Member Avatar for praveen_dusari

HI praveen_dusari, I can't grok on the whole point in the middle of your thought, but I'll just isolate and answer this "is there to any way store my data." Until you gave and clarify your whole point. If you're looking for a persistent data storage, you can use the …

Member Avatar for gon1387
0
171
Member Avatar for asif49

The way you describe it was obscure, hopefully I understand it the way you do and my answer would enlighten you to give you a better explanation for your thought. First, let me put it this way; JQuery in the basic sense was created due to inconsitencies of browser vendors …

Member Avatar for gon1387
0
102
Member Avatar for cgull

Hi cgull, It can't find the "mask" plugin. Have you checked if the plugin file's downloaded by your browser? There's an inconsistency in your script, unlike the first two, the src attribute in your modernizr external script has a an additional forward slash before "javascript". Can be the cause of …

Member Avatar for cgull
0
865
Member Avatar for techyworld

Hi Techyworld, again. Hehe. :) Here, you review and tweak this code as you like: [JSFiddle Live Example](http://jsfiddle.net/HcZUQ/) /** * Converts the tabel value in an array * @param elementNode first table row * @return array the retrieved value of each rows and cells in 2d array */ function retreiveTableValue(firstRow){ …

Member Avatar for gon1387
0
157
Member Avatar for techyworld

Hi Techyworld, I'm quite not sure what kind of retrieval you're after but, I hope this helps. It geneerates a 2d array, based from given config and generate an html table, and append to html body. I also have a JSFiddle prepared Here's the link [JSFiddle Example](http://jsfiddle.net/bSaSj/) var twoDArrayGenerator, generateTable, …

Member Avatar for gon1387
0
150
Member Avatar for riahc3

Hi riahc, Basing from your ajax URL(using cookies for session id storage),one way for it not to be updated is wrong session ID, or with a browser with a setting of not saving cookies; also assuming you referenced jQuery to `$j` variable. So let's start first with encoding your data, …

Member Avatar for riahc3
0
12K
Member Avatar for soapyillusion

Hi Soapuillusion, I'm really puzzled by what you mean? Can you please elaborate, explain it further?

Member Avatar for soapyillusion
0
129
Member Avatar for biswa2ray

Hi biswa2ray, Here's a simple sample vanilla javascript and jQuery I created on how to add, delete and view the values of a dynamic input elements. You can review the sample on this link: [JSFiddle Vanilla JS Sample](http://jsfiddle.net/tXNwe/1/) [JSFiddle jQuery Sample](http://jsfiddle.net/apcSf/) Here's also the code: **VANILLA** //get the form element …

Member Avatar for gon1387
0
346
Member Avatar for thompsonSensibl

If by what you mean "explicit website blocker" is programmatically blocking sites in your list; then, there goes the cons. I can't thought of any other pros except you have more control or options on this one. For manually editing the host file, it's a systemwide approach, all users will …

Member Avatar for gon1387
0
167
Member Avatar for riseguim

Hi riseguim, can you please explain further? Also when you say, "at the very last elem it stops", it doesn't: for (i = 0, allElems = $('.FadingBanner').length, elemNoFade = allElems - 1; i < allElems; i+=1) { fadingElem = "#elem" + i; if (i === 0) { $(fadingElem).fadeIn(fadeTime).delay(delayTime).fadeOut(fadeTime); // Once …

Member Avatar for riseguim
0
107
Member Avatar for pln89

Hi pin89, Here's a sample implementation and extraction from the data format you have. var jsonData = [ {"ID":10,"Duration":24235}, {"ID":21,"Duration":9034}, {"ID":12,"Duration":13681}, {"ID":1,"Duration":23053}, {"ID":13,"Duration":22863}, {"ID":22,"Duration":57163} ]; //container for the idList and duration in array var idList = []; var durationList = []; //Extract data from the recieved json data for(var i=0, …

Member Avatar for gon1387
0
3K
Member Avatar for NoUserNameHere

Hi NoUserNameHere, Yes, `$(this).val() != ""` this is a correct way on how to check if the value is empty in jQuery. It seems you have a problem with your each. Should it be this instead? $.each($(':input'), function() { if ($(this).val() != "") { $('#submit_button').removeAttr('disabled'); } }); The code you …

Member Avatar for NoUserNameHere
0
294
Member Avatar for markyeoj

I found no errors in the script, nor any culprit in the script for it not to run; even problems with older IE versions. My guess here is, maybe there is/are extentions in your IE that perturbs its execution; or misconfigurations.

Member Avatar for stbuchok
0
331

The End.