Frank Rocco
|
Posted: 06/22/2001, 8:31 AM |
|
Hello,
The following code is not working. I get no errors. Can someone explain what
is wrong?
Thanks
Frank
<SCRIPT Language="JavaScript">
if (document.forms["Bugs"])
document.Bugs.contact_id.onChange=loadphone;
function loadphone() {
alert("onchange");
document.Bugs.WorkPhone = "3186";
}
</SCRIPT>
|
|
|
Frank Rocco
|
Posted: 06/22/2001, 1:27 PM |
|
Ok, the event is now working.
I cannot execute the DLookUp() function. I get a Object Error.
Thanks
Frank
Here is my Code.
<SCRIPT Language="JavaScript">
if (document.forms["Bugs"])
document.Bugs.contact_id.onchange=loadphone;
function loadphone() {
var phone = "";
phone = DLookUp("contacts","work_phone","contact_id=" +
document.Bugs.contact_id.value);
document.Bugs.WorkPhone.value = phone;
}
</SCRIPT>
|
|
|
Dr. Scott R. Senay
|
Posted: 06/22/2001, 2:23 PM |
|
It might be something as simple as the case of the function call, I'm not
sure but your might want to change it to dlookup() which is how I have it in
all my code...
Scott...
P.S. I'm also not certain you can call dlookup from with javascript code
like that...
Frank Rocco <farocco@hotmail.com> wrote in message
news:9h09mn$6tp$1@news.codecharge.com...
> Ok, the event is now working.
> I cannot execute the DLookUp() function. I get a Object Error.
>
> Thanks
> Frank
>
> Here is my Code.
> <SCRIPT Language="JavaScript">
> if (document.forms["Bugs"])
> document.Bugs.contact_id.onchange=loadphone;
> function loadphone() {
> var phone = "";
> phone = DLookUp("contacts","work_phone","contact_id=" +
> document.Bugs.contact_id.value);
> document.Bugs.WorkPhone.value = phone;
> }
> </SCRIPT>
>
>
>
|
|
|
|