JScript object comparaison problems.

Results 1 to 2 of 2

Thread: JScript object comparaison problems.

  1. #1
    Join Date
    Dec 1969

    Default JScript object comparaison problems.

    I&#039;ve created an ASP page using JScript which allows users to edit existing records in an Access Database over the net.<BR><BR>One of the things i want my page to do is to initially load all form objects on the page with the values of those controls currently stored in the database. (ex. If the "FirstName" field in my database record reads "John Smith", I want this value loaded automatically into the "FName" textfield on my form.)<BR><BR>This is working perfectly except in the case of drop-down menus. I use a script to populate all my drop-down menus, and want to use a comparaison between: <BR> 1. The value of the control stored in the database.<BR> 2. All possible values of the control.<BR>to determine which of the possible values for the control should be initially selected.<BR><BR>However, my comparaison doesn&#039;t seem to work!<BR>I&#039;m trying to do this:<BR> if (rsTable("ModID") == rsPriority("ModID"))<BR>where the rsTable object is the contents of the database record, and ModID is a field of type "Number", and the rsPriority object contains one of the possible values of the form control. This comparaison is iterated over all possible values of rsPriority.<BR><BR>But, i found that even when the values ARE equal, this comparaison returns false!<BR>I even tried using formatString() on BOTH objects before the comparaison, and that didn&#039;t work either.<BR><BR>Any ideas?<BR><BR>Thanks!<BR><BR>- Colin<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default *** CROSSPOST ***

    Answered in ASP Q&A. Please don&#039;t crosspost. Or, if you do, *say* you are doing it.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts