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
~91.7K People Reached
Favorite Tags
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
185
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
219
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
300
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
233
Member Avatar for hindu times
Member Avatar for gon1387
0
458
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
245
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
195
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
312
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
128
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
211
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
414
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
159
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
277
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
178
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
126
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
206
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
140
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
202
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
114
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
234