Posts
 
Reputation
Joined
Last Seen
Ranked #109
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
99% Quality Score
Upvotes Received
300
Posts with Upvotes
268
Upvoting Members
177
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
3
116 Commented Posts
~603.98K People Reached
About Me

Largely sane.

Interests
Vintage steel bicycles, Art Deco ceramics, Achimenes, WWII history, Suzuki Cappuccinos, Hurtigrute.
PC Specs
Various. Nothing special. Mostly last Millennium sub-GHz, except my little netbook - new in 2011.
Favorite Tags

1,330 Posted Topics

Member Avatar for kamilacbe

Pretty simple, start with array [1, 2, 3] (representing offsets from current month) and map it to the array you want. function getNext3Months() { const currentMonth = (new Date()).getMonth() + 1; // getMonth() is zero-indexed; add 1 to give conventional month number. return [1, 2, 3].map(n => (currentMonth + n) …

Member Avatar for Airshow
0
2K
Member Avatar for SolidSolutions

Solid, I've been following this but with nothing to offer. Now I know the solution, I understand the problem! My twopenny worth (after the hard work is done) .... it would be slightly(?) more economical to make $(this) just once inside the each loop: [CODE] $('.task-title').each(function() { var $this = …

Member Avatar for John_142
0
565
Member Avatar for Luke_4

The days of generating a special page for print purposes are long gone. Instead of composing HTML on the fly, try mastering CSS @media rules : * https://www.w3.org/TR/WD-css2/media.html If there's going to be any dynamically generated content, you will still need some javascript; but more typically @media rules alone allow …

Member Avatar for Luke_4
0
2K
Member Avatar for Luke_4

I posted a link to a fiddle back in the [original post](https://www.daniweb.com/programming/web-development/threads/506905/printing-values-of-jquery-custom-autocomplete#post2213571)

Member Avatar for Luke_4
0
500
Member Avatar for patk570

As it stands, the question is not 100% self-explanatory, in particular the relationships and juxtapositions of the various input elements. Maybe it would be clearer if you posted an (annotated) screenshot of the original spreadsheet and/or the HTML version.

Member Avatar for Airshow
0
527
Member Avatar for phfilly

You are expecting javascript arrays to behave like PHP arrays. They don't! Elements of a JS array are indexed exclusively by integer. Confusingly, JS arrays can also be given properties, so `tmp[14]['G'] = foo` is quite legal but not what you might expect from knowledge of PHP. `['G']` is a …

Member Avatar for phfilly
0
326
Member Avatar for Patrick_18

The formula will simplify enormously. ((lcost1*24-(dp1/2))/24)+((epay1-(dp1/2))/24) can be written : lcost1 + (epay1 - dp1) / 24 And you probably want to display : (lcost1 + (epay1 - dp1) / 24).toFixed(2) ie rounded to 2 decimal places.

Member Avatar for Airshow
0
1K
Member Avatar for Azer_1
Member Avatar for dandixon

Dan, I don't know which countdown plugin that is but [URL="http://keith-wood.name/countdownRef.html"]this one[/URL] by Keith Wood has a [iCODE]serverSync[/iCODE] capability and is very well documented. [B]Airshow[/B]

Member Avatar for bdanie
0
607
Member Avatar for gagan22

Gagan22, A very similar question was answered just a few days ago. Sugest you read the thread and see if it provides an answer: [url]http://www.daniweb.com/forums/thread139039.html[/url] [B]Airshow[/B]

Member Avatar for gumbiliki
0
257
Member Avatar for pranab2302

Pranab, There is no JavaScript command that activates JavaScript in a browser. Two reasons: [LIST=1][*]If JavaScript is disabled then the JavaScript engine is not running, so no JavaScript commands can be interpreted. [*]If there was a mechanism by which a web page could force JavaScript to be enabled, then this …

Member Avatar for ps1990
0
715
Member Avatar for dawbin

The double test for `hasChildNodes()`, at parent and child levels, looks a bit odd. I would have thought you want the parse out the nodes that *don't* have children, in which case your loop will be as follows: for (i=0; i<x.length; i++) { if (!x[i].hasChildNodes()) { alert(x[i].nodeName + '=' + …

Member Avatar for Airshow
0
294
Member Avatar for double_cola

Double_cola, Broj1 is really trying to help you. Do what he says and ANSWER HIS QUESTIONS. Restating the problem and reposting large sections of code is not going to get you to a solution any faster.

Member Avatar for double_cola
0
220
Member Avatar for gentlemedia

Surely `cc` can be permanently appended to `.news-grid` and `cd` can be permanently appended to `cc` with `.show()` and `.hide()` controlling visibility? There doesn't appear to be any need to detach/reappend. Even better, `cc`/`cd` could be hard coded in HTML. I'm not sure this will fix anything but should better …

Member Avatar for Airshow
0
551
Member Avatar for razamughal67

Text questions will most likely attract text answers. If you want code, then provide code.

Member Avatar for razamughal67
0
231
Member Avatar for lea_1

Try [jQuery-turtle](https://github.com/PencilCode/jquery-turtle/blob/master/README.md), "a jQuery plugin for turtle graphics". I've not used this plugin but assume that its "accurate collision-testing of turtles with arbitrary convex hulls" can be used for collision detection of turtles with each other, ie. turtlize each of your eggs. You would need to more-or-less restart your coding …

Member Avatar for janissantony
0
861
Member Avatar for jean_5
Member Avatar for terrymold
Member Avatar for Priti_P

Refresh very deliberately reloads the current document in its original state. The only (and very limited) control the user has (in most browsers) is to do a "soft" or "hard" refresh; - Soft: accepts data from cache(s) - Hard: ignores cache(s) and goes back to the original source (sever). Relies …

Member Avatar for mattster
0
183
Member Avatar for suavedesign

You want something more like : $(".bot").on('mouseenter', function() { $(this).siblings(".over").fadeIn(1000); }).on('mouseleave', function() { $(this).siblings(".over").fadeOut(800); }); This should give the desired behaviour for all .bots that are in place on page load. If .bots (and/or their contents) are dynamically added, then you need to consider delegation, which would be a mild …

Member Avatar for suavedesign
0
215
Member Avatar for Shibbir Khan

As I understand it, the NetFront browser's javascript is not fully featured (and has limited HTML5 support). I would guess that, if jQuery loads without error, some aspects of it will work and some won't. If you try, then please post your findings here.

Member Avatar for Airshow
0
83
Member Avatar for Nabeel_2

I'm not too sure what the question is but here are a few observations from a client-side perspective : 1. Don't use `async:false`!!! AJAX is fundamentally asynchronous and `async:false` should never have been provided. It is, at best, unreliable. 2. You can't rely on an arbitrary cart-entry index to identify …

Member Avatar for Airshow
-2
3K
Member Avatar for nadiam
Member Avatar for Siberian

To give the animation every chance of being smooth, make sure there's no **document reflow**. ie. make sure the div animates into a reserved space. eg. wrap `#block` in another div with width and height set to accommodate the div at its maximum size. Also, **chain the jQuery**, so `#block` …

Member Avatar for Airshow
-4
216
Member Avatar for SimonIoa

> If you're only seeing the code on the site and in the view source then your hosting doesn't have PHP enabled. Or, the source file is otherwise not served via the PHP parer, eg. it does not have a `.php` extension, or the server is set up to recognise …

Member Avatar for Airshow
0
127
Member Avatar for ivan3510

Two things strike me immediately : Click handlers --- Take a look at the following : $(".conjugate").click(function() { conjugate(); }); and $(document).on("click", ".conjugate", function() { conjugate(); }); This means that any ".conjugate" element that is present in the document at page load will fire `conjugate()` *twice* when clicked!!! jQuery selectors …

Member Avatar for Airshow
0
977
Member Avatar for Siberian
Member Avatar for Ritesh_4

As far as I know, you have to inspect the contents of the files and work out whether they do server-side or client-side stuff. I expect that in some cases, the distinction will be manifest, in others less so.

Member Avatar for Airshow
0
159
Member Avatar for Priti_P

It's difficult to answer questions like this when the HTML is in the form of server-side source code (PHP presumably). Please post the served HTML!

Member Avatar for AleMonteiro
0
326
Member Avatar for Priti_P
Member Avatar for Airshow
0
153
Member Avatar for dwlamb

There are no doubt all sorts of HTML/CSS issues that the Owl Carousel author has resolved, so take maximum advantage of that expertise. Instead of emulating the appearance of your Owl Carousel, you might consider (in order of preference) : - a second Owl Carousel, with appropriate options to give …

Member Avatar for Airshow
0
254
Member Avatar for Priti_P

What you show in the question would appear to be the returned JSON, decoded then re-encoded (re-stringified). It woud be more useful to see the raw JSON, which may or may not be the same as the re-encoded JSON. To do this, temporarily use `dataType:'text'`, and `alert (data_)`.

Member Avatar for Airshow
0
237
Member Avatar for safi.najjar1

The problem is that `count = $(".count")` selects *all* the elements with `class="count"`, not just the one you are interested in whenever a plus/minus button is clicked. You need for the click handler to sniff out the particular `.count` element that is a sibling of the particular plus/minus button that …

Member Avatar for Airshow
0
2K
Member Avatar for vuyiswamb
Member Avatar for Priti_P

If AleMonteiro's answer works, then so should this simplification of it : var checkboxList = $("fieldset.step input:checked").map(function() { return { 'step': $(this).closest("fieldset").index(), 'checkboxId': this.id }; }).get();

Member Avatar for Airshow
0
289
Member Avatar for mrvijayakumar

This is actually quite simple if approached the right way. First, let's define the problem in more standard terms : 1. take a collection of `n` congruant arrays each containing `m` elements 2. transform the collection to an array of `m` arrays each containing `n` elements (effectively a matrix row-column …

Member Avatar for Airshow
0
311
Member Avatar for kanjigirl

According to the API, the 7th parameter for [ICODE]swfObject.embedSWF()[/ICODE] should be flashvars, not a boolean. Deleting [ICODE]false, [/ICODE] will give it a fighting chance. [B]Airshow[/B]

Member Avatar for Airshow
0
292
Member Avatar for gotboots

Boots, In this block of code from fastupdate(), it appears that you copied and pasted three lines of code and forgot to edit the left hand side of the statements. [CODE] ... var ba = document.getElementById("ba").value; var bs = document.getElementById("bs").value; var bc = document.getElementById("bc").value; var ba = document.getElementById("sa").value; var bs …

Member Avatar for Ralf_1
0
16K
Member Avatar for eshko

Eshko, Do you really mean AJAX? Form submission is a feature of bog-standard HTML/HTTP and can be triggered either by the user clicking the form's submit button or from javascript, eg, [ICODE]forms[0].submit()[/ICODE], which is safe as long as you have just one form on the page. This approach will send …

Member Avatar for murat.ozkan.9028194
0
6K
Member Avatar for danale

Printing from a new window is a crazy way to achieve something that is catered for by CSS (from CSS2 if I recall correctly). Simply specify an @media rule in your CSS style sheet: [CODE] <style> /* All common (screen) styles here, in the normal way. */ @media print { …

Member Avatar for tnjnorbert
0
10K
Member Avatar for salman4aslam

Why revive a bonkers 3-year old topic full of wallpaper with more of the same? I'm outa here.

Member Avatar for Airshow
0
461
Member Avatar for jovstudios

Ask yourself, why should it work? How many `<a>` elements are there when `$("a").click(...)` is executed?

Member Avatar for Airshow
0
76
Member Avatar for coreyavis

One-part emails are pretty simple. To be really useful, this function would simplify the composition of multi-part emails such that you could compose two or more parts (eg plain text and markup) and the function would do the formatting into multi-part. Another feature would be a mechanism to send drafts …

Member Avatar for Airshow
1
845
Member Avatar for Siberian

To concatenate the individual strings together, comma separated : var list_ = list.join(); Then you can do what you want with `list_`. alert(list_); document.getElementById('myDiv').innerHTML(list_);//pojs $("#myDiv").html(list_);//jQuery Only use `document.write` in the document writing phase. Once the document has achieved its `ready` state, `document.write` will blitz it completely.

Member Avatar for diafol
0
189
Member Avatar for wonderland

I would have more confidence in traditional `location.hostname` than `document.domain`, which I've not encountered before. In plain javascript : document.getElementById('myLogo').src = (location.hostname=='domain1') ? 'image1.gif' : (location.hostname=='domain2') ? 'image2' : 'default.gif'; or in jQuery : $('#myLogo').attr('src', (location.hostname=='domain1') ? 'image1.gif' : (location.hostname=='domain2') ? 'image2' : 'default.gif'); or the equivalent `if ... else …

Member Avatar for owen101
0
2K
Member Avatar for Violet_82

Violet, you have discovered the problem but you don't need to refactor your original code to quite that extent : Try : $(document).ready(function(){ form.init(); }); var form = { //object literal init: function(){ $("button").click(function(){ console.log("inside the click " + $(this)); }); } }; or, avoiding the global namespace : $(document).ready(function(){ …

Member Avatar for Troy III
0
196
Member Avatar for Siberian
Member Avatar for Troy III
0
307
Member Avatar for mbarandao

Hi Mossa, Your code is clearly not a million miles away from doing what you want. I think it would benefit from : * Rearranging to do more inside the switch/case structure * Having `$loopCount` as a simple incremental * Judicious use of the `%` operator to work out whether …

Member Avatar for mbarandao
0
328
Member Avatar for Angle90
Member Avatar for chrisschristou

With multiple rows in the table, you must use classes, not ids to identify the various DOM elements. Ids must be unique within a given DOM. With the ids converted to classes, `calculatePtotal()` will be something like this : function calculatePtotal() { $("tr", "#myTable").each(function(i, row) { $row = $(row); var …

Member Avatar for chrisschristou
0
1K

The End.