I include the attached Javascript file when building my intranet web
page using PHP and it partially works.
When called the function Done() works fine and the function ClearForm()
works up to the line that reads
document.getElementById("MemberName").innerHTML = "";
Below that nothing works.
I have altered the abovementioned line to
document.getElementById("MemberName").value = ""; and it still works but
again nothing below that line works.
I feel that there must be something wrong with the line that reads
document.getElementById("Amount").value = ""; but I'm blessed if I can
see it.
The relative HTML line reads
id="Amount" onBlur="CheckAmount()">
Please make suggestions.
--
Regards,
Alf Stockton www.stockton.co.za
Stay away from hurricanes for a while.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
function Done()
{
window.location="Administration.php";
}
function ClearForm()
{
document.getElementById("Issue").disabled=true;
document.getElementById("CardNumber").focus();
document.getElementById("CardNumber").value = "";
document.getElementById("MemberName").innerHTML = "";
document.getElementById("Amount").value = "";
document.getElementById("Reason").value = "";
}
function SubmitClick()
{
document.getElementById("Issue").disabled=true;
Adjustments.submit();
ClearForm();
Done();
}
function CheckAmount()
{
var x = document.getElementById("Amount");
// alert(x.value);
if (x.value = "")
{
alert ("A value must be entered");
x.focus();
return false;
}
}
function CheckReason()
{
var x = document.getElementById("Reason");
// alert(x.value);
if (x.value = ""))
{
alert ("A reason is required and must be entered");
x.focus();
return false;
}
var w = document.getElementById("Amount");
if ((w.value != "") &&
(x.value != ""))
{
document.getElementById("Issue").disabled=false;
}
}
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--------------030707010700030903020803--
Re: Javascript partially not working
am 24.04.2007 15:06:28 von php
Alf, it has already been pointed out that this list is for PHP. That the
JavaScripts are supposed to run on a page generated from PHP isn't
enough to make it PHP related.
Please register to a JavaScript list and ask your question about
JavaScript there.
Mike
Alf Stockton skrev:
> I include the attached Javascript file when building my intranet web
> page using PHP and it partially works.
>
> When called the function Done() works fine and the function
> ClearForm() works up to the line that reads
> document.getElementById("MemberName").innerHTML = "";
>
> Below that nothing works.
>
> I have altered the abovementioned line to
> document.getElementById("MemberName").value = ""; and it still works
> but again nothing below that line works.
>
> I feel that there must be something wrong with the line that reads
> document.getElementById("Amount").value = ""; but I'm blessed if I can
> see it.
>
> The relative HTML line reads
>
> id="Amount" onBlur="CheckAmount()">
>
> Please make suggestions.
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Javascript partially not working
am 24.04.2007 15:24:00 von Gustav Wiberg
I agee to Mikaels Gröns comment about Javascript
But just for helping out a bit
If it is about Javascript and nothing below a certain line works, then it i=
s THAT line that is wrong...
document.getElementById("MemberName").innerHTML =3D "";
Best regards
/Gustav Wiberg
-----Original Message-----
From: Alf Stockton [mailto:alf@stockton.co.za]=20
Sent: Tuesday, April 24, 2007 2:42 PM
To: php windows
Subject: [PHP-WIN] Javascript partially not working
I include the attached Javascript file when building my intranet web=20
page using PHP and it partially works.
When called the function Done() works fine and the function ClearForm()=20
works up to the line that reads=20
document.getElementById("MemberName").innerHTML =3D "";
Below that nothing works.
I have altered the abovementioned line to
document.getElementById("MemberName").value =3D ""; and it still works but=
=20
again nothing below that line works.
I feel that there must be something wrong with the line that reads
document.getElementById("Amount").value =3D ""; but I'm blessed if I can=20
see it.
The relative HTML line reads
id=3D"Amount" onBlur=3D"CheckAmount()">
Please make suggestions.
--=20
Regards,
Alf Stockton www.stockton.co.za
Stay away from hurricanes for a while.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Javascript partially not working
am 24.04.2007 15:33:03 von Alf C Stockton
Mikael Grön wrote:
> Alf, it has already been pointed out that this list is for PHP. That the
> JavaScripts are supposed to run on a page generated from PHP isn't
> enough to make it PHP related.
> Please register to a JavaScript list and ask your question about
> JavaScript there.
>
Any suggestions as to which Javascript list may be good?
--
Regards,
Alf Stockton www.stockton.co.za
Never reveal your best argument.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Javascript partially not working
am 24.04.2007 15:46:31 von Chandar V R
Devshed Forums wil be good[http://forums.devshed.com/]
thnx/Chandar
Alf Stockton wrote:
> Mikael Grön wrote:
>> Alf, it has already been pointed out that this list is for PHP. That
>> the JavaScripts are supposed to run on a page generated from PHP
>> isn't enough to make it PHP related.
>> Please register to a JavaScript list and ask your question about
>> JavaScript there.
>>
> Any suggestions as to which Javascript list may be good?
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Javascript partially not working
am 24.04.2007 16:30:46 von Bill Bolte
http://www.sitepoint.com
Their forums are pretty good.
Bill
-----Original Message-----
From: Alf Stockton [mailto:alf@stockton.co.za]=20
Sent: Tuesday, April 24, 2007 8:33 AM
To: Mikael Grön
Cc: php windows
Subject: Re: [PHP-WIN] Javascript partially not working
Mikael Grön wrote:
> Alf, it has already been pointed out that this list is for PHP. That =
the=20
> JavaScripts are supposed to run on a page generated from PHP isn't=20
> enough to make it PHP related.
> Please register to a JavaScript list and ask your question about=20
> JavaScript there.
>=20
Any suggestions as to which Javascript list may be good?
--=20
Regards,
Alf Stockton www.stockton.co.za
Never reveal your best argument.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Javascript partially not working
am 24.04.2007 16:32:23 von php
I actually started looking for one myself, right after I mailed. Haven't
found any good ones yet. I'll let you know when I do.
Chandar and Bill: I don't like forums. I enjoy using Thunderbird too much.
Mike
Alf Stockton skrev:
> Mikael Grön wrote:
>> Alf, it has already been pointed out that this list is for PHP. That
>> the JavaScripts are supposed to run on a page generated from PHP
>> isn't enough to make it PHP related.
>> Please register to a JavaScript list and ask your question about
>> JavaScript there.
>>
> Any suggestions as to which Javascript list may be good?
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Javascript partially not working
am 25.04.2007 04:09:15 von bedul
>>document.getElementById("Issue").disabled
i must see the html result
i believe u have error on your html not on the js