Search Results

Showing results 1 to 40 of 43
Search took 0.01 seconds.
Search: Posts Made By: Airshow ; Forum: JavaScript / DHTML / AJAX and child forums
Forum: JavaScript / DHTML / AJAX 25 Minutes Ago
Replies: 3
Views: 47
Posted By Airshow
ZVN,

As Pritaes said plus ......

Unfortunately, .getElementsByClassName is far from safe. Too many browsers don't support it. So you have to be a bit old fashioned and do it longhand with...
Forum: JavaScript / DHTML / AJAX 4 Days Ago
Replies: 8
Views: 341
Posted By Airshow
Maybe I'm being dumb but I don't get it.

That's a very ordinary piece of HTML that could have been written manually or generated by a script.

Why does this qualify as a Code Snippet? How does...
Forum: JavaScript / DHTML / AJAX 6 Days Ago
Replies: 2
Views: 285
Posted By Airshow
Rouse,

Please, STOP CODING AND DO SOME READING - for about a day.

You need to look at the jquery documentation and some examples. In particular you need to learn how to frame your code in a...
Forum: JavaScript / DHTML / AJAX 9 Days Ago
Replies: 7
Views: 343
Posted By Airshow
XMLHttpRequest can behave either synchronously or asynchronously, as determined by the third parameter in the line of the form xmlhttp.open("GET", url, true);.

With synchronous behaviour,...
Forum: JavaScript / DHTML / AJAX 12 Days Ago
Replies: 3
Views: 380
Posted By Airshow
Neogy,

First thing to try is to combine the two code blocks above into a single $(document).ready(function(){.....}); structure.

Airshow
Forum: JavaScript / DHTML / AJAX 14 Days Ago
Replies: 1
Views: 364
Posted By Airshow
Dmmajorstudent,

I'm afraid this addresses only part of your problem (help fields) but the javascript should make a good basis for doing form validation too.

<!DOCTYPE html PUBLIC "-//W3C//DTD...
Forum: JavaScript / DHTML / AJAX 17 Days Ago
Replies: 8
Views: 533
Posted By Airshow
Rblalock,

OK, a fully worked up version of your page is attached, complete with my calc() function and several events to stimulate it.

You will find exactly the same approach used here...
Forum: JavaScript / DHTML / AJAX 19 Days Ago
Replies: 4
Views: 444
Posted By Airshow
Mosel,

Nothing should prevent array.push() from working within an if clause, as long as array is in scope and whatever you are trying to push is valid.

Scope is different in javascript from...
Forum: JavaScript / DHTML / AJAX 32 Days Ago
Replies: 12
Views: 940
Posted By Airshow
You can add the lines of code from my onload function above or below the lines within your existing onload function.
For example:
onload = function(){
//existing lines of code
//existing lines...
Forum: JavaScript / DHTML / AJAX Oct 23rd, 2009
Replies: 12
Views: 1,038
Posted By Airshow
darkRoom,

Here's a demo showing how to use my QueryParser object for passing parameters from page to page.

Three files attached (zipped together) - save all to same directory then browse...
Forum: JavaScript / DHTML / AJAX Oct 7th, 2009
Replies: 6
Views: 291
Posted By Airshow
Good point and demonstrates that browser security is getting tighter not looser.

I very much doubt this screen shot thing is possible. I've certainly never read about it being done but would be...
Forum: JavaScript / DHTML / AJAX Oct 6th, 2009
Replies: 3
Views: 478
Posted By Airshow
First, you must understand HTML/XHTML and Javascript. Otherwise you will be trying to run before you can walk.

Then, get your mind round the fact the the Document Object Model (DOM) is a tree...
Forum: JavaScript / DHTML / AJAX Oct 2nd, 2009
Replies: 9
Views: 576
Posted By Airshow
Altairzq,

Not using document.getElementById() but you should be able to use document.getElementById('x').document.getElementsByTagName('whatever') instead, where 'x' is the id of a div wrapper of...
Forum: JavaScript / DHTML / AJAX Sep 28th, 2009
Replies: 16
Views: 738
Posted By Airshow
Azegurb,

Neighbour's party was good, thank you.

Here is some code, but you must be sure to go through and see how it works. Learn from it, don't just accept it. I am sure you will.


<body>...
Forum: JavaScript / DHTML / AJAX Sep 16th, 2009
Replies: 4
Views: 847
Posted By Airshow
Try,

ajax.onreadystatechange = function(){setTimeout("show_messages()", 500);}
It is also good practise to establish the response handler before sending the request, so put lines 9/10 above 6/7....
Forum: JavaScript / DHTML / AJAX Sep 2nd, 2009
Replies: 4
Views: 593
Posted By Airshow
Stockton,

That's because the value of the selected option is detemined by its value attribute (0|1) not its innerHTML property (Parent|Dependant).

You will find the following code more reliable...
Forum: JavaScript / DHTML / AJAX Aug 27th, 2009
Replies: 15
Views: 1,291
Posted By Airshow
Daved83,

It turns out that IE has a bug (http://domscripting.com/blog/display/99) whereby "if you use innerHTML to add or update form elements, all sorts of screwiness can occur".

The linked...
Forum: JavaScript / DHTML / AJAX Aug 10th, 2009
Replies: 19
Views: 826
Posted By Airshow
Forum: JavaScript / DHTML / AJAX Aug 9th, 2009
Replies: 8
Views: 922
Posted By Airshow
Beanryu,

You said in your original post:

Therefore, you should have the means for javascript to remember the contents of these paragraphs without needing to retreive them from the DOM.
...
Forum: JavaScript / DHTML / AJAX Aug 4th, 2009
Replies: 2
Solved: Opener question
Views: 331
Posted By Airshow
Xessa,

This is very simple, though maybe not obvious.

First create a funtion in your main page

function popUpCallback(x){
var b = document.getElementById('b1');//the button that you want...
Forum: JavaScript / DHTML / AJAX Aug 3rd, 2009
Replies: 9
Views: 506
Posted By Airshow
Kako,

You could make that work, but there's no point. You're just telling the page about something it already knows - namely itself! My previous post refers.

Airshow
Forum: JavaScript / DHTML / AJAX Aug 2nd, 2009
Replies: 6
Views: 951
Posted By Airshow
Sonia,

You might like to try something like this:

//This is a general utility function that returns an Initial Caps version of the input string
function initialCaps(str){
var a =...
Forum: JavaScript / DHTML / AJAX Jul 31st, 2009
Replies: 4
Views: 847
Posted By Airshow
Osirion,

Remembering that you have three buttons, "Add", "Delete" and "Update", you might like to do it as follows.

It's a good idea to test the query string towards the top of page and set...
Forum: JavaScript / DHTML / AJAX Jul 21st, 2009
Replies: 4
Views: 415
Posted By Airshow
JSON is certainly the way to go for complex data but for simple, predicatable stuff you can D.I.Y. with something like the solution I posted here:
...
Forum: JavaScript / DHTML / AJAX Jul 16th, 2009
Replies: 4
Views: 442
Posted By Airshow
Menster, I can only suggest a strategy.

There are three parts to an AJAX call,
Clent-side - Initiating, composing and sending a request.
Server-side - Doing whatever is asked of it (eg....
Forum: JavaScript / DHTML / AJAX Jul 12th, 2009
Replies: 10
Views: 694
Posted By Airshow
Ablitz,

Waaaaahaaaay! There's a certain satisfaction in getting code to work. I think you are feeling it right now. Well done, my contribution was minimal.

There's something you might like to...
Forum: JavaScript / DHTML / AJAX Jun 29th, 2009
Replies: 7
Views: 603
Posted By Airshow
Q8iEnG,

You were nearly there but like all things HTML/javascript, there are always a few things to fix.

Code below is a fixed version of yours. Fixes are essentially
1. Return false from...
Forum: JavaScript / DHTML / AJAX Jun 28th, 2009
Replies: 7
Views: 603
Posted By Airshow
Here you are Q8iEnG, I think this is what you want.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>...
Forum: JavaScript / DHTML / AJAX Jun 19th, 2009
Replies: 8
Views: 1,018
Posted By Airshow
Hi Ardav,

I'm not massively experienced in Prototype but I think I've worked something out. It may not be exactly what you want but it's a start.

Event.observe(window, 'load', function(){
...
Forum: JavaScript / DHTML / AJAX Jun 18th, 2009
Replies: 4
Views: 658
Posted By Airshow
Surfer,

First of all, you can massively simplify your form by purging all the nested tables.
<form action="<?php echo $editFormAction; ?>" id="insertForm" name="insertForm" method="POST">
<table...
Forum: JavaScript / DHTML / AJAX Jun 15th, 2009
Replies: 15
Views: 1,509
Posted By Airshow
Well spotted that man. If I ever knew, then I had certainly forgotten.

And now I find in my little reference book, further methods for resizing (I'm not saying what they are).

I tried them. And...
Forum: JavaScript / DHTML / AJAX Jun 4th, 2009
Replies: 5
Views: 717
Posted By Airshow
Enrico,

As already said, plus it can be proceduralised in a loop as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
...
Forum: JavaScript / DHTML / AJAX May 30th, 2009
Replies: 4
Views: 662
Posted By Airshow
Adaykin,

Original code didn't run in IE6. Would neither add nor delete. Part of the reason is that IE needs thead or tbody elements within a table to make rows addressable. IE also didn't like...
Forum: JavaScript / DHTML / AJAX May 30th, 2009
Replies: 6
Views: 1,364
Posted By Airshow
Bob Arctor,

Something like this maybe?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"-->
<html>
<head>...
Forum: JavaScript / DHTML / AJAX May 26th, 2009
Replies: 9
Views: 718
Posted By Airshow
Spycat,

A small word of warning. Whether you use Itsjareds' code or mine, you have to pay attention to a subsequent form submission from the page. It may be better to set the form's action...
Forum: JavaScript / DHTML / AJAX May 26th, 2009
Replies: 12
Views: 1,447
Posted By Airshow
Lucky, I'm sure your code works but it can be much more compact by adding some simple methods to the Date object.

Date.prototype.setToMidday = function(){ this.setHours(12); this.setMinutes(0);...
Forum: JavaScript / DHTML / AJAX May 26th, 2009
Replies: 8
Views: 531
Posted By Airshow
I'm still not sure I fully understand but maybe this will help.

In client-side Javscript, all expressions are evaluated in the context of the current Window object, which provides the global...
Forum: JavaScript / DHTML / AJAX May 21st, 2009
Replies: 2
Views: 421
Posted By Airshow
Dexeloper,

I have had no end of problems getting block element alignment successfully under control in all browsers. Most reliable:IE (though probably not stds-compliant), most stubborn:Opera...
Forum: JavaScript / DHTML / AJAX May 21st, 2009
Replies: 12
Views: 1,447
Posted By Airshow
Sorry, forgot the old Date.getYear() dichotomy (IE & Safari vs the rest).

Change .getYear() to .getFullYear() in three places.

Airshow
Forum: JavaScript / DHTML / AJAX May 15th, 2009
Replies: 9
Views: 2,886
Posted By Airshow
Poor smartness - advice overload I expect ......

..... but please let me join in.

This code:

will validate as many independent groups of checkboxes as you like.
will, on failure to...
Showing results 1 to 40 of 43

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC