Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 500
Search took 1.26 seconds.
Search: Posts Made By: gusblake
Forum: JavaScript programming 10-24-2011, 12:58 PM
Replies: 5
Views: 325
Posted By gusblake
I can't see how those two would be conflicting as...

I can't see how those two would be conflicting as they are in different scopes. Have you checked the error console?
Forum: JavaScript programming 10-23-2011, 08:39 PM
Replies: 2
Views: 323
Posted By gusblake
To open a popup use the window.open function,...

To open a popup use the window.open function, which takes parameters for the URL, the size of the window and some other things.

http://www.w3schools.com/jsref/met_win_open.asp

e.g.


var...
Forum: JavaScript programming 10-23-2011, 08:31 PM
Replies: 5
Views: 325
Posted By gusblake
Are both the scripts on the same page? If so...

Are both the scripts on the same page? If so then the first definitions of GetBand, GetBandOn etc are getting overwritten by the second. This would normally be solved by using objects, or just...
Forum: JavaScript programming 10-20-2011, 11:24 AM
Replies: 6
Views: 445
Posted By gusblake
I think I read somewhere recently that even...

I think I read somewhere recently that even type="text/javascript" isn't recommended any more. Just <script></script>.

Yeah it was on Douglas Crockford's site,...
Forum: JavaScript programming 10-19-2011, 11:30 PM
Replies: 4
Views: 548
Posted By gusblake
I think the plugin is designed so that if...

I think the plugin is designed so that if javascript is disabled the links work as normal (as a sort of fall-back mode), but if it's available they are only used to select the current news item.

I...
Forum: PHP 10-19-2011, 10:27 PM
Replies: 2
Views: 313
Posted By gusblake
You seem to be using the same $child_job_list on...

You seem to be using the same $child_job_list on each iteration of the outer loop, unless there's something in the templating engine (?) that does something I don't know about. That's what looks...
Forum: JavaScript programming 10-19-2011, 09:07 PM
Replies: 3
Views: 637
Posted By gusblake
Yeah of course, I would do it like this: 1....

Yeah of course, I would do it like this:

1. set up an event listener on the box for keyup events, to javascript function "autocomplete".
2. user types a letter into the box
3. autocomplete()...
Forum: JavaScript programming 10-17-2011, 11:50 PM
Replies: 3
Views: 5,598
Posted By gusblake
If you go to www.xelawho.com (same domain as the...

If you go to www.xelawho.com (same domain as the src of the frame), it works - the subdomain has to match, otherwise the browser thinks you're doing XSS.

If I were you I'd change the src to a...
Forum: JavaScript programming 10-17-2011, 03:40 PM
Replies: 8
Views: 465
Posted By gusblake
It's irrelevant whether he understands PHP isn't...

It's irrelevant whether he understands PHP isn't it? Just change the code as appropriate. selected="selected" is exactly what it looks like - he's selecting Algeria, which changes the value of the...
Forum: JavaScript programming 10-17-2011, 03:22 PM
Replies: 5
Views: 425
Posted By gusblake
The word 'name' goes bold in my editor, which...

The word 'name' goes bold in my editor, which suggests it's a keyword. I've never been sure what it does, but I avoid using it for variable names because of that. Try your original code with _name...
Forum: JavaScript programming 10-17-2011, 03:18 PM
Replies: 1
Views: 745
Posted By gusblake
Is there a particular aspect of this you're...

Is there a particular aspect of this you're having trouble with?
Forum: JavaScript programming 10-17-2011, 03:08 PM
Replies: 1
Views: 589
Posted By gusblake
From a quick look at the source of that...

From a quick look at the source of that screwdefaultbuttons plugin, it looks like when the styled checkbox is clicked it triggers the "change" event of the original input element.

If you have your...
Forum: JavaScript programming 08-30-2011, 09:59 AM
Replies: 1
Views: 1,305
Posted By gusblake
There's no built in way as far as I know, but you...

There's no built in way as far as I know, but you could get hold of the files with javascript using XmlHttpRequests. Then it would just be a case of parsing them. Writing to the DB would be...
Forum: JavaScript programming 08-27-2011, 03:08 PM
Replies: 7
Views: 1,124
Posted By gusblake
I'm not sure this will work without an existing...

I'm not sure this will work without an existing document to open. Could you use a blank html page with the html and body tags already present?

The second example will be incorrect because there...
Forum: JavaScript programming 08-12-2011, 04:56 PM
Replies: 4
Views: 317
Posted By gusblake
You could use a generic 'action' function that...

You could use a generic 'action' function that takes the type of action as its parameter. If anything else needs to be different, just add more parameters.


function action(type) {
try {...
Forum: JavaScript programming 08-06-2011, 10:10 PM
Replies: 12
Views: 18,929
Posted By gusblake
This forum is specifically about coding -- there...

This forum is specifically about coding -- there are plenty of websites full of usability advice, and I don't think that's what the OP was looking for.

There are two things you need to do to get...
Forum: JavaScript programming 06-22-2011, 04:19 PM
Replies: 2
Views: 229
Posted By gusblake
It might be that you're trying to access the...

It might be that you're trying to access the input element before it exists -- is this code in the head? DOM manipulation should usually be done within a window.onload function, or at the end of the...
Forum: JavaScript programming 06-01-2011, 08:09 PM
Replies: 2
Views: 251
Posted By gusblake
Is there a form called Search? I can't see one...

Is there a form called Search? I can't see one in the code you posted.
Forum: JavaScript programming 06-01-2011, 08:08 PM
Replies: 4
Views: 368
Posted By gusblake
Calling document.write after the page has loaded...

Calling document.write after the page has loaded causes everything on the page -- including any script tags -- to be replace by whatever you're printing. I think this is the cause of your problems.
Forum: JavaScript programming 06-01-2011, 08:03 PM
Replies: 2
Views: 321
Posted By gusblake
I was coding something that required the round...

I was coding something that required the round trip time recently, so I will post a simplified extract from the code:


function time() {
return (new Date()).valueOf();
}

var send_time,...
Forum: JavaScript programming 06-01-2011, 07:56 PM
Replies: 2
Views: 589
Posted By gusblake
Here is some code that should give you an idea of...

Here is some code that should give you an idea of how to do it:


<script>
var str="asd98ha39";
var type="sole";

var letters=str.match(/[a-zA-Z]/g);
var numbers=str.match(/\d/g);
Forum: JavaScript programming 06-01-2011, 07:42 PM
Replies: 2
Views: 722
Posted By gusblake
This will probably work - put it in your form...

This will probably work - put it in your form checking function somewhere:


var something_checked=false;

var boxes=document.getElementById("checksdiv").getElementsByTagName("input");
...
Forum: JavaScript programming 05-25-2011, 03:22 PM
Replies: 2
Views: 1,517
Posted By gusblake
Setting window.location or window.location.href...

Setting window.location or window.location.href will always make the page reload to whatever you give it; that's what it's for.

If you want to access stuff on the parent page, you can just use...
Forum: JavaScript programming 04-30-2011, 11:02 AM
Replies: 9
Views: 735
Posted By gusblake
You should have a separate function for...

You should have a separate function for showing/hiding the TEXT divs, that way you can make it hide all the rest before showing one.


function showHideText(el) {
var...
Forum: JavaScript programming 04-29-2011, 10:07 PM
Replies: 8
Views: 657
Posted By gusblake
What is the point of b and c? Couldn't you...

What is the point of b and c?

Couldn't you just do it like this:


var b={
c: {
d: function(e, f) {
this.e=e;
this.f=f;
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT +1. The time now is 10:53 AM.