object is null or no object

  • Thread starter Thread starter catweezle2010
  • Start date Start date
C

catweezle2010

Hello,

I have two colums for adressdata. The first one is enabled and
includes fields like name, city and postcode. The second has the same
fields, but is disabled. With a button, which says, there is a
different delivery address, I enable them. To here no Problem.

To be sure the postcode and cityname are correct, I open a second
aspx-page, where the postcode is to be entered. From the database I get
the cityname (if more then one to a datagrid, where to select). No I
write the data back to my first site.

The Problem is, it works only while I do not change the state of the
fields. After the first time I click to enable the delivery address
fields, the javascript to write back the values says, the field is null
or no object. It dosn't matter if I disable the fields again. But not
only the statechanged fields are not to find, the fields I haven't
changed are not available anymore as well.

Thank you for helping.
 
You are likely enabling them on the client side, via JavaScript? If so, the
server has no clue when they are enabled or disabled. If you are doing this
server side, you can do a enabled/disabled state check prior to processing.
If not, you need to check and see if the values are filled or not and process
only if so.

I would set up this check, regardless, as enabled does not mean filled out.

Hope I am understanding the issue. Good luck!

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Hi Gregory,

I do it server side. By clicking the button the server enables the
fields. I can see it and use them. My first fields will never be
disabled. In the problem field has nothing to stand in, the second site
just has to write in, but can't find, even the fields which would be
found before enabeling. I take a look to the produced sourcecode and
find it's very strange, that the fields, which are changed from
disabled to enabled and shown enabled stay in there as disabled. But
even the fields shown there as enabled could not be found any more.

Thank you for answering
 
Back
Top