473,392 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,392 software developers and data experts.

ajax question

Hello,

I have begun working with ajax recently to populate a drop down in a
form, where prviously the whole page would have to reload. Works great.

Where the form originally had a standard drop down like this:

<Select Method="ShippingMethod">
<option>method1</option>
<option>method2</option>
<option>method3</option>
</Select>

It now pulls form an external page and ajax uses

document.getElementById('myspan').innerHTML = result;

and puts it here inside my form:

<form name="form1">
(stuff snipped)
<span name="myspan" id="myspan"></span>
</form>

All works well in that the form posts properly.

However, previously there was the following javascript to trigger a
function when the <Select Method="ShipingMethod"was changed:

<script language="JavaScript" type="text/JavaScript">
document.getElementsByName("ShippingMethod")[0].onchange=total;
</SCRIPT>

This now results in an error:

document.form1.ShippingMethod is null or not an object

What do I do about that?
Aug 21 '08 #1
9 1023
" <Select Method="ShippingMethod""
This is a typo. Should of course be <Select Name="ShippingMethod">

One other problem is that there is a validation script that runs to make
sure someone has selected an option, as the first one in the list is

<option value="">Please Select</option>
if (theForm.ShippingMethod.value == "")
{
alert("Please Select a shipping method.");
theForm.ShippingMethod.focus();
return (false);
}

This still works with the ajax version in IE but now fails in Mozilla.
Aug 21 '08 #2
Alex wrote:
As stated, the Select Method was a typo.
Please forgive me for replying one minute before that. I really should have
asked my crystal ball first, but it is currently under maintenance, you see.
Also, things were snipped for brevity.
Very clever. NOT.
Of course the <formhas an action.
Post it, then.
I have done away with

document.getElementsByName("ShippingMethod")[0].onchange=total;

as you are right it needless. So that problem is solved. The one
regarding the validation remains.
PEBKAC. Trust me.
[Top post]
You are quoting like a bat. Please stop that. [tm]
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Aug 21 '08 #3
MC wrote:
We can't all be .js experts and worship your greatness oh one of great
talent.

Geez, can't you be nice to anybody???? or is it your goal to belittle
and put down everyone here?
For me it has been easier not to get upset when I imagine, that any
irritating person in fact may be sick, suffering from Asperger syndrome,
ADHD, autism or some other personal disorder. I pretend for myself being a
physician observing the person and asking myself: is it wise for me to start
shouting and screaming with red face, kicking chairs and spoiling my day,
when I have got such a patient to talk with?

I do not claim any poster here in reality has such disorders. It is my
imagination only and on purpose. If one has not had the opportunity to live
with a person having e.g. Asperger syndrome, then it might help to google
with the word and get astonished. When being extreme cases those people can
be so astonishing that after some time you might feel they are sympathetic
in their almost complete inability to understand human feelings. Is it their
fault if they are sick?


Aug 25 '08 #4
MC
Thank you for the laugh!

Yes,
It almost does seem as if he has mental issues. The bitter vile tone of
messages actually makes me not want the help he provides. Its like buying
gas, you need it, but you cringe every time you have to get some.
"optimistx" <op*************@poistahotmail.comwrote in message
news:48***********************@news.24online.fi...
MC wrote:
>We can't all be .js experts and worship your greatness oh one of great
talent.

Geez, can't you be nice to anybody???? or is it your goal to belittle
and put down everyone here?

For me it has been easier not to get upset when I imagine, that any
irritating person in fact may be sick, suffering from Asperger syndrome,
ADHD, autism or some other personal disorder. I pretend for myself being a
physician observing the person and asking myself: is it wise for me to
start
shouting and screaming with red face, kicking chairs and spoiling my day,
when I have got such a patient to talk with?

I do not claim any poster here in reality has such disorders. It is my
imagination only and on purpose. If one has not had the opportunity to
live
with a person having e.g. Asperger syndrome, then it might help to google
with the word and get astonished. When being extreme cases those people
can
be so astonishing that after some time you might feel they are sympathetic
in their almost complete inability to understand human feelings. Is it
their
fault if they are sick?


Aug 25 '08 #5
On Aug 25, 8:10�am, "optimistx" <optimistxPoi...@poistahotmail.com>
wrote:
MC wrote:
We can't all be .js experts and worship your greatness oh one of great
talent.
Geez, can't you be nice to anybody???? or is it your goal to belittle
and put down everyone here?

For me it has been easier not to get upset when I imagine, that any
irritating person in fact may be sick, suffering fromAspergersyndrome,
ADHD, autism or some other personal disorder. I pretend for myself being a
physician observing the person and asking myself: is it wise for me to start
shouting and screaming with red face, kicking chairs and spoiling my day,
when I have got such a patient to talk with?

I do not claim any poster here in reality has such disorders. It is my
imagination only and on purpose. If one has not had the opportunity to live
with a person having e.g.Aspergersyndrome, then it might help to google
with the word and get astonished. When being extreme cases those people can
be so astonishing that after some time you might feel they are sympathetic
in their almost complete inability to understand human feelings. Is it their
fault if they are sick?


People with Asperger's are NOT irritating.

People without Asperger's though are highly irritating TO US!!!

I find this extremelly offensive what the person wrote about
Asperger's people in such a derogaroty way, but maybe it's not his
fault, maybe he is just 'diseased' with something called IGNORANCE?

I think so.

Roza
www.myspace.com/rozagy

Autistic, beautiful girl and proud of being ME!
Aug 25 '08 #6
On Aug 25, 5:52�pm, "MC" <mica[removethis]@aisus.comwrote:
Thank you for the laugh!

Yes,
It almost does seem as if he has mental issues. The bitter vile tone of
messages actually makes me not want the help he provides. Its like buying
gas, you need it, but you cringe every time you have to get some.

"optimistx" <optimistxPoi...@poistahotmail.comwrote in message

news:48***********************@news.24online.fi...
MC wrote:
We can't all be .js experts and worship your greatness oh one of great
talent.
Geez, can't you be nice to anybody???? or is it your goal to belittle
and put down everyone here?
For me it has been easier not to get upset when I imagine, that any
irritating person in fact may be sick, suffering fromAspergersyndrome,
ADHD, autism or some other personal disorder. I pretend for myself being a
physician observing the person and asking myself: is it wise for me to
start
shouting and screaming with red face, kicking chairs and spoiling my day,
when I have got such a patient to talk with?
I do not claim any poster here in reality has such disorders. It is my
imagination only and on purpose. If one has not had the opportunity to
live
with a person having e.g.Aspergersyndrome, then it might help to google
with the word and get astonished. When being extreme cases those people
can
be so astonishing that after some time you might feel they are sympathetic
in their almost complete inability to understand human feelings. Is it
their
fault if they are sick?- Hide quoted text -

- Show quoted text -


Yes, Gas, I hear it - coming out of your mouth.

what do you use to talk then, your big fat a** LOL :-))))))

Aug 25 '08 #7
On Aug 25, 8:10�am, "optimistx" <optimistxPoi...@poistahotmail.com>
wrote:
MC wrote:
We can't all be .js experts and worship your greatness oh one of great
talent.
Geez, can't you be nice to anybody???? or is it your goal to belittle
and put down everyone here?

For me it has been easier not to get upset when I imagine, that any
irritating person in fact may be sick, suffering fromAspergersyndrome,
ADHD, autism or some other personal disorder. I pretend for myself being a
physician observing the person and asking myself: is it wise for me to start
shouting and screaming with red face, kicking chairs and spoiling my day,
when I have got such a patient to talk with?

I do not claim any poster here in reality has such disorders. It is my
imagination only and on purpose. If one has not had the opportunity to live
with a person having e.g.Aspergersyndrome, then it might help to google
with the word and get astonished. When being extreme cases those people can
be so astonishing that after some time you might feel they are sympathetic
in their almost complete inability to understand human feelings. Is it their
fault if they are sick?

THIS is a bunch of crap you wrote here! And your English is awful!

English is my second language, too but my God, yours is something
else...

Aug 25 '08 #8
Rozagy, artistic Autistic wrote:
"optimistx" wrote:
>MC wrote:
>>[...]
[...]
[...]
Could the three of you please FOAD? Thanks in advance.
PointedEars, f1
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Aug 25 '08 #9
Sn!pe crossposted mindboggingly stupid:
optimistx <op*************@poistahotmail.comwrote:
>Thomas 'PointedEars' Lahn wrote:
>>Rozagy, artistic Autistic wrote:
"optimistx" wrote:
MC wrote:
>[...]
[...]
[...]
Could the three of you please FOAD? Thanks in advance.
PointedEars, f1
Sorry, I will not FOAD. FYI, TPAC because ITIOT is very typical for ASP.

[ahem] 'scuse me, guys; is this article yours?
It seems to have crept through a gap in the fence.
*plonk*
Aug 26 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I'm about to finally make the jump and start a new site using AJAX. THe question i have for all of you AJAX developers out there is which one? 1. The Standard AJAX frame work 2. The Tool kit....
2
by: =?Utf-8?B?VG9u?= | last post by:
Hello, I want to understand teh benefits of ajax technology. Does anyone has a good website where AJAX EXTENSIONS is worked out so I really understand it. There a 2 main questions: 1) How about...
2
by: Cirene | last post by:
3 quick questions... 1. Are the controls in the AJAX Futures download "beta" or the release and stable version? 2. Also, where is the best way to learn how to implement these? (Other than by...
6
by: Jonathan Wood | last post by:
Greetings, I'd like to implement some AJAX features on an existing ASP.NET site. I have one example of doing this but, otherwise, don't know much about it. I have one question, though, about...
22
by: sheldonlg | last post by:
I am looking for a clean solution to a problem that I solved in, what I call, a "dirty" way. Here is what I want to do. I have a dropdown list. Clicking on an item in the dropdown list invokes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.