Forum: JavaScript / DHTML / AJAX 27 Days Ago |
| Replies: 1 Views: 347 Inside the function basicAjaxSwitch you are defining a variable basicAjaxSwitch so it's being overwritten. Just use a different variable name inside the function. |
Forum: JavaScript / DHTML / AJAX Oct 12th, 2009 |
| Replies: 5 Views: 441 It should be noted, however, that you can hack around it by not using an array but using an object like so
for ( i in ['key1', 'key2'])
alert(i); // 1, and 2 respectively
// BUT
for ( i... |
Forum: JavaScript / DHTML / AJAX Oct 11th, 2009 |
| Replies: 5 Views: 441 No you can't. i in your scenario is the key for each value so the only way to get the actual value would to do ['val1', 'val2', 'val3'][i] which would defeat the purpose :) |
Forum: JavaScript / DHTML / AJAX Oct 5th, 2009 |
| Replies: 3 Views: 475 Well an HTML page is laid out like a tree.
/*
HEAD
|
BODY
\
DIV <-- SPAN's parent node
\
SPAN
/ \ |
Forum: JavaScript / DHTML / AJAX Oct 5th, 2009 |
| Replies: 1 Views: 208 You should still make your checks for length before this but this will check for numbers like 1111111 and 999999
var phone_number = "9999999";
if (!/^(\d)\1{6}$/.test(phone_number)) {
... |
Forum: JavaScript / DHTML / AJAX Oct 2nd, 2009 |
| Replies: 6 Views: 675 What language are you using the for backend? (PHP, ASP, whatever) |
Forum: JavaScript / DHTML / AJAX Oct 2nd, 2009 |
| Replies: 9 Views: 572 The poster marks the thread solved though admins probably have the ability it's not really their job to do so. |
Forum: JavaScript / DHTML / AJAX Sep 28th, 2009 |
| Replies: 2 Views: 325 You would setup a server-side script (using PHP or ASP or whatever your language is) that uses cURL or whatever your language uses to make and output the response. Then your AJAX call just points to... |
Forum: JavaScript / DHTML / AJAX Sep 22nd, 2009 |
| Replies: 11 Views: 834 It isn't a Netbeans project but it is a JSP AJAX primer (found by searching AJAX JSP on google...) http://www.ics.uci.edu/~cs122b/projects/project5/AJAX-JSPExample.html
It should also be noted... |
Forum: JavaScript / DHTML / AJAX Sep 22nd, 2009 |
| Replies: 11 Views: 834 Sure, it COULD be done with AJAX but there is absolutely no reason to. The term/acronym AJAX describes making a request to the server then receiving and parsing XML. There is absolutely, positively... |
Forum: JavaScript / DHTML / AJAX Sep 22nd, 2009 |
| Replies: 11 Views: 834 The example you described isn't AJAX, that's just standard Javascript validation. AJAX would be, for example, as the user types display a list of possible selections underneath the box.
... |
Forum: JavaScript / DHTML / AJAX Sep 8th, 2009 |
| Replies: 2 Views: 526 Then just get the absolute positions of both then subtract the item you want's position from the item that it's relative from.
Box1 : x 100, y 200
Box2 : x 234, y 123
Box2 Relative Box1: x 134,... |
Forum: JavaScript / DHTML / AJAX Aug 12th, 2009 |
| Replies: 4 Views: 625 well there's your answer:
document.getElementById("divCheckBoxList"); Isn't returning anything, it can't find that element. My first tip is to use Firefox and Firebug so you can actually see the... |
Forum: JavaScript / DHTML / AJAX Aug 12th, 2009 |
| Replies: 4 Views: 625 divRef probably doesn't exist, show the whole code not just one line. |
Forum: JavaScript / DHTML / AJAX Aug 5th, 2009 |
| Replies: 3 Views: 361 You're missing a bunch so you either have broken javascript or you didn't copy/paste directly. It should look like:
$('#css-style-def').click(function () {
var newText =... |
Forum: JavaScript / DHTML / AJAX Jul 23rd, 2009 |
| Replies: 2 Views: 295 Try just returning false from the function. Also, in your onkeypress attribute you don't need "javascript:" it knows what you're trying to do if you just put typed(event); |
Forum: JavaScript / DHTML / AJAX Jul 20th, 2009 |
| Replies: 4 Views: 413 The AJAX response just has to send like a JSON response then you parse the response and set them in your success callback. |
Forum: JavaScript / DHTML / AJAX Jun 22nd, 2009 |
| Replies: 2 Views: 411 |
Forum: JavaScript / DHTML / AJAX Jun 4th, 2009 |
| Replies: 11 Views: 2,339 |
Forum: JavaScript / DHTML / AJAX Jun 2nd, 2009 |
| Replies: 12 Views: 683 length=0 means it isn't returning an element. Right click on each of those, if it doesn't have "Inspect in HTML Tab" then the element doesn't exist in the dom, make sure you actually have something... |
Forum: JavaScript / DHTML / AJAX Jun 2nd, 2009 |
| Replies: 12 Views: 683 Make sure that $("span#votes_count"+the_id) and $("span#votes_buttons"+the_id) are actually returning elements by using console.log from FireBug
// in your success function... |
Forum: JavaScript / DHTML / AJAX Jun 2nd, 2009 |
| Replies: 12 Views: 683 If that's the case then it means your success function is failing somehow. Do an alert() at the top of the success function to make sure its being called and do any other debugging you see fit to... |
Forum: JavaScript / DHTML / AJAX Jun 2nd, 2009 |
| Replies: 12 Views: 683 Make sure you check the Net tab and you're not getting any 404s. If that's not the case then in the Console tab check to see what the AJAX call is actually returning by looking at the Response... |
Forum: JavaScript / DHTML / AJAX Jun 2nd, 2009 |
| Replies: 12 Views: 683 If you're using Firefox get Firebug and see if you're getting any errors |
Forum: JavaScript / DHTML / AJAX Jun 2nd, 2009 |
| Replies: 12 Views: 683 Try using absolute paths(start with /, as opposed to relative that use ../) |
Forum: JavaScript / DHTML / AJAX Jun 2nd, 2009 |
| Replies: 6 Views: 1,465 www.quirksmode.org/css/condcom.html |
Forum: JavaScript / DHTML / AJAX Jun 2nd, 2009 |
| Replies: 6 Views: 1,465 It's usually better to add/remove CSS files for specific browsers using HTML conditions like so
<link rel="stylesheet" type="text/css" href="somestyle.css" />
<!--[if lte IE 7]>
<link... |
Forum: JavaScript / DHTML / AJAX May 22nd, 2009 |
| Replies: 3 Views: 445 In Javascript functions are first class members meaning a function is a type just like an int or a string. Using this.varname = function(){}; is assigning a variable to this.varname, the variable... |
Forum: JavaScript / DHTML / AJAX May 18th, 2009 |
| Replies: 3 Views: 876 www.w3schools.com/jsref/jsref_obj_regexp.asp Regular expressions were made for this, they'll be hard to grasp at first but they'll be your friend in the end. |
Forum: JavaScript / DHTML / AJAX Sep 11th, 2008 |
| Replies: 4 Views: 771 There aren't any Javascript animation studios because there are so many quirks between the different browsers they'd be doing N times more work, where N is the number of current browsers. Believe it... |
Forum: JavaScript / DHTML / AJAX Sep 5th, 2008 |
| Replies: 2 Views: 657 You don't have the close brace } on the function |
Forum: JavaScript / DHTML / AJAX Jul 3rd, 2008 |
| Replies: 2 Views: 1,258 It doesn't work because script tags can never be short-tags i.e., <tagname />, they must be explicitly closed i.e., <tagname></tagname> |
Forum: JavaScript / DHTML / AJAX Jul 1st, 2008 |
| Replies: 2 Views: 1,052 Well the error is generated when you try to get an element that doesn't exist so the simple question is, does the element with the ID "content" exist on the page before you make that call? |
Forum: JavaScript / DHTML / AJAX May 6th, 2008 |
| Replies: 3 Views: 788 You don't need a database to use Ajax. Ajax's purpose is to allow you to send asynchronous requests to a separate page and handle that request (hence the name). You can, if you want, make a request... |
Forum: JavaScript / DHTML / AJAX May 1st, 2008 |
| Replies: 5 Views: 1,307 The div should look like this if you want it to be hidden in the first place.
<div id="testDiv" style='visibility:hidden'> |
Forum: JavaScript / DHTML / AJAX Apr 25th, 2008 |
| Replies: 5 Views: 1,862 OK, exactly what part isn't working. Please describe your problem |
Forum: JavaScript / DHTML / AJAX Apr 14th, 2008 |
| Replies: 3 Views: 2,505 selectbox.options is an array. The add() function is a member of the Element family ie., selectbox.add(<elem>); not selectbox.options.add(<elem>); |
Forum: JavaScript / DHTML / AJAX Apr 11th, 2008 |
| Replies: 11 Views: 8,102 Not unless you have software running on their system. Even if you did I could probably guarantee that no one would be happy with that invasion of privacy. |
Forum: JavaScript / DHTML / AJAX Apr 10th, 2008 |
| Replies: 11 Views: 8,102 You do realize that even if you did find out a way to do this that users could just disable javascript then take a screenshot(or do anything else that javascript is 'protecting') then re-enable... |
Forum: JavaScript / DHTML / AJAX Apr 3rd, 2008 |
| Replies: 4 Views: 1,346 You're never passing an argument to the findValue function. findValue requires an argument but it is never receiving one. |