CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Help - Whats wrong with this event code?

Print topic Send  topic

Author Message
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>
>
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.