Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 845721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:29:54+00:00 2026-05-15T06:29:54+00:00

I have an onChange event that keeps bringing up the error below whenever I

  • 0

I have an onChange event that keeps bringing up the error below whenever I preview it.

‘Object doesnt support this property or method’

I have the onChange event associated with a picklist and when a specific option is selected another field is unhidden.

The code is below:

onLoad:

//If How did you hear about us is set to event show the Source Event lookup
crmForm.SourceEvent = function SourceEvent() 
{
if (crmForm.all.gcs_howdidyouhearaboutus.DataValue == 5)
{
crmForm.all.gcs_sourceeventid_c.style.display = '' ;
crmForm.all.gcs_sourceeventid_d.style.display = '' ;
}
else
{
crmForm.all.gcs_sourceeventid_c.style.display = 'none' ;
crmForm.all.gcs_sourceeventid_d.style.display = 'none' ;
}
}
crmForm.SourceEvent() ;

onChange

crmForm.SourceEvent() ;

Would be great if someone could let me know why this error is showing up?

Also, this has happened on a few onChange events on the form preview but once published onto the live system it does not error. Any ideas?

Thank you

Brett

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:29:55+00:00Added an answer on May 15, 2026 at 6:29 am

    Overriding SourceEvent is not the supported way of doing that…

    You should probably use the fire the OnChange event in the form load using (if (crmForm.all.yourLookup) { crmForm.all.yourLookup.FireOnChange();} and in the field’s javascript onChange event write something like

    var displayStyle = (crmForm.all.cf_picklist.DataValue == "3") ? "none" : "";
    crmForm.all.cf_lookupid_d.style.display = displayStyle;
    crmForm.all.cf_lookupid_c.style.display = displayStyle;
    

    note that changing the Display CSS element is not supported, but it’s the only way of doing that, without writing your own ASPX page.

    ref: http://www.eggheadcafe.com/software/aspnet/31267662/hide-lookup-based-on-pick.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a textbox with an onchange event. Why does this event not fire
I have this code which is called at an onChange event of an function
Hello I have a html select which has an onchange event. And whenever a
I have a drop down list on my page. The onchange event of this
i have a function call it: myFunction(A,B,C) I have onchange event in my option
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have a form with a textarea that can contain large amounts of content
I have this piece of Javascript and it just won't work. I allready checked
I have written a cascading drop down list using JQuery. The code that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.