Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 500
Search took 5.12 seconds.
Search: Posts Made By: Old Pedant
Forum: JavaScript programming 05-22-2013, 11:28 PM
Replies: 3
Views: 61
Posted By Old Pedant
> after the src tag, am I adding the whole script...

> after the src tag, am I adding the whole script that I posted , or from the web address

Neither.

You need to make *ANOTHER* HTML page (the one I named "xyz.html", but name it whatever you...
Forum: JavaScript programming 05-22-2013, 10:43 PM
Replies: 31
Views: 432
Posted By Old Pedant
Anyway, if I were coding all that, I almost...

Anyway, if I were coding all that, I almost surely would use
$scope.items = {
"cavetto" : { quantity: 7, price: 4.56},
"midland" : { quantity: 1, price: 139},
"xtc" : { quantity: 3, price:...
Forum: JavaScript programming 05-22-2013, 10:39 PM
Replies: 31
Views: 432
Posted By Old Pedant
Exactly. And yet more reasons not to use the...

Exactly. And yet more reasons not to use the construction when you can just use an integer index in a loop.

And in both constructions, you *STILL* have to do
var item = $scope.items[index]; ...
Forum: JavaScript programming 05-22-2013, 10:37 PM
Replies: 3
Views: 61
Posted By Old Pedant
One easy way: Put that script in an <iframe> and...

One easy way: Put that script in an <iframe> and then reload the <iframe> every minute.


<span id="mav_nowplaying"></span>
<iframe id="showplaying" src="xyz.html"></iframe>
<script...
Forum: JavaScript programming 05-22-2013, 10:31 PM
Replies: 19
Views: 140
Posted By Old Pedant
In any case, the whole idea of using a global...

In any case, the whole idea of using a global variable named i just cause shudders to run up and down my spine.
Forum: JavaScript programming 05-22-2013, 10:30 PM
Replies: 19
Views: 140
Posted By Old Pedant
LOL! Except that it seems that about 95% of the...

LOL! Except that it seems that about 95% of the people who try to adapt what they find on the net will end up with a rocket swatter or a flylauncher.

Or even worse: Likely a rokectlunger...
Forum: JavaScript programming 05-22-2013, 10:25 PM
Replies: 31
Views: 432
Posted By Old Pedant
Yourveins: You would normally use the...

Yourveins:

You would normally use the for...in construction *IF* you had coded that something like this:

$scope.items = {
"cavetto" : { quantity: 7, price: 4.56},
"midland" : { quantity:...
Forum: JavaScript programming 05-22-2013, 09:24 PM
Replies: 31
Views: 432
Posted By Old Pedant
Minor goof in that: for (var i = 0; i <=...

Minor goof in that:

for (var i = 0; i <= $scope.items.length; i++){

Needs to be < and not <=
Forum: JavaScript programming 05-22-2013, 09:20 PM
Replies: 19
Views: 140
Posted By Old Pedant
RndMe's trick is cute. Personally, I just...

RndMe's trick is cute.

Personally, I just avoid using ++ for this stuff:

function onPress()
{
document.getElementById("story").innerHTML = story[i]; i = ( i + 1 ) % story.length;
}

We...
Forum: MySQL 05-22-2013, 08:34 PM
Replies: 4
Views: 105
Posted By Old Pedant
FouLu's query should have worked. Try it in...

FouLu's query should have worked.

Try it in a MySQL query tool instead of PHP.

But another way to write it is:

SELECT platform_id, plat_name FROM platforms
WHERE platform_id NOT IN (
...
Forum: JavaScript frameworks 05-22-2013, 03:05 AM
Replies: 1
Views: 113
Posted By Old Pedant
Well, for one thing, you include the parallax...

Well, for one thing, you include the parallax library *twice*.

<script type="text/javascript" src="scripts/jquery.parallax-1.1.3.js"></script>
<script type="text/javascript"...
Forum: JavaScript programming 05-22-2013, 02:53 AM
Replies: 1
Views: 71
Posted By Old Pedant
Okay, I give up. *HOW* can the user populate the...

Okay, I give up. *HOW* can the user populate the value of a RADIO BUTTON????

And how does it make sense to have a radio button that does *NOT* have a name?
Or a single radio button instead of a...
Forum: JavaScript programming 05-22-2013, 12:30 AM
Replies: 13
Views: 216
Posted By Old Pedant
Or another way, if you don't want to proliferate...

Or another way, if you don't want to proliferate variables in the JS code:

<script type="text/javascript">
var phpVars = {
<?php
$jsValues = array( "name" => "John Doe", "age" => 42, "city" =>...
Forum: JavaScript programming 05-22-2013, 12:03 AM
Replies: 13
Views: 216
Posted By Old Pedant
Ahhh...yes, that would work! It's still not...

Ahhh...yes, that would work!

It's still not clear to me what the advantage of the array in JS is, since you would have to always *KNOW* to keep the two arrays in the same order. Not hard in a...
Forum: MySQL 05-21-2013, 11:47 PM
Replies: 6
Views: 131
Posted By Old Pedant
Don't be surprised if EXPLAIN gives you the same...

Don't be surprised if EXPLAIN gives you the same results for #1 and #2, indicating that almost surely MySQL has made the right choices. But also don't be surprised if MySQL opts to do an "all"...
Forum: MySQL 05-21-2013, 10:03 PM
Replies: 6
Views: 131
Posted By Old Pedant
Generally speaking, you want the WHERE condition...

Generally speaking, you want the WHERE condition that is the *MOST EFFECTIVE* in limiting the number of results to occur first.

In the case of a standard one-to-many relationship, this almost...
Forum: JavaScript programming 05-21-2013, 09:50 PM
Replies: 8
Views: 127
Posted By Old Pedant
LOL!! You got me. Okay, okay... any other...

LOL!! You got me.

Okay, okay... any other *normal* JavaScript on the page.
Forum: JavaScript programming 05-21-2013, 08:56 PM
Replies: 8
Views: 127
Posted By Old Pedant
I just noticed: Wolfshade's code has a goof in...

I just noticed: Wolfshade's code has a goof in it.

He was doing
$radar = function(){$('#radar').load(".../nxrd_txe.gif" )

meaning he is trying to put the URL shown into the <div...
Forum: JavaScript programming 05-21-2013, 08:50 PM
Replies: 8
Views: 127
Posted By Old Pedant
Ummm...what the heck do you think these tags...

Ummm...what the heck do you think these tags *MEAN*???

<script type="text/javascript">
$radar =...
Forum: JavaScript programming 05-21-2013, 08:34 PM
Replies: 3
Views: 112
Posted By Old Pedant
It *is* an old book. This is the same homework...

It *is* an old book. This is the same homework problem we have had appear here for many, many years.

Exhibitatrocity: While it is true that alert( ) is really a very very bad choice for...
Forum: JavaScript programming 05-21-2013, 08:21 PM
Replies: 3
Views: 150
Posted By Old Pedant
"almost at the same time"?? Again, until the...

"almost at the same time"??

Again, until the ASP.NET code does its job and sends back those values to the page, there is nothing available to graph.

Can you show this live? Give us a URL to...
Forum: JavaScript programming 05-21-2013, 08:00 PM
Replies: 117
Views: 2,041
Posted By Old Pedant
var phonebox =...

var phonebox = document.getElementById("somePhoneNumberBox");
if ( phonebox.value.indexOf("(02)") != 0 )
{
alert("The phone number must begin with (02)");
phonebox.focus();
return...
Forum: MySQL 05-21-2013, 07:37 PM
Replies: 6
Views: 131
Posted By Old Pedant
In theory, no. In practice, especially with...

In theory, no. In practice, especially with MySQL, it can. (Much less so with SQL Server, which has a very powerful query optimizer built in.) Luckily, thanks to EXPLAIN and thanks to MySQL's...
Forum: JavaScript programming 05-21-2013, 06:42 AM
Replies: 12
Views: 137
Posted By Old Pedant
WOW. Shows how much I play such games. I do...

WOW. Shows how much I play such games.

I do play some games that keep track of high scores for all players, but only if you login and submit your score, which I never bother to do. So yes, in...
Forum: Computer Programming 05-21-2013, 05:46 AM
Replies: 3
Views: 160
Posted By Old Pedant
Oh, we almost never stood in front of them. ...

Oh, we almost never stood in front of them.

We usually sat down while pushing all those little levers and buttons.

(Yeah, I've been around that long.)


Or has hopes of being one. If the...
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT +1. The time now is 02:37 AM.