This topic is locked

Disable a row in Add Page

9/15/2010 10:33:56 AM
ASPRunnerPro General questions
J
Jay123 author

Hi!
I am using ASP Runner 6.1.
I would like to ask if it's possible to disable a row so all contents in that row (textbox, checkbox, etc.) will become readonly.
I know how to hide a row based on condition (in Add Page before display) and I am wondering if it's possible to make it disabled instead of hiding it. The code that I have used to hide a row is:

==================================================================================

dim rsExists4

set rsExists4 = dal.Table("Session Schedule 4").Query("NewPresentation='Yes'","")

if not rsExists4.eof then

xt.assign "SessionOption4_fieldblock", true

else

xt.assign "SessionOption4_fieldblock", false

end if

rsExists4.Close : set rsExists4 = Nothing

===================================================================================

where SessionOption4_fieldblock is the name of the row.
I've tried to change "true/false" to "enabled/disabled" and "1/0" but didn't work.
I know also how to make the field readonly in HTML editor using this code:

==============================================================================

document.getElementById("display_value_RegistrationStartDate").readOnly=true;

==============================================================================

where RegistrationStartDate is a lookup field from another table and set as "Edit box with AJAX popup".
I was wondering if it's possible to replace the field with a row and make everything in that row readonly.
Thanks,

Jay

Sergey Kornilov admin 9/15/2010

Not sure what 'make row readonly' means. You can only make edit controls readonly.

J
Jay123 author 9/15/2010

Hi Sergey,
I have copied a checkbox from another row to the row that I would like to make readonly. In order for the user not to click on the checkbox that I have copied, I want to make that row readonly. I'm not sure if that is possible.
Thanks,

Jay

Sergey Kornilov admin 9/15/2010

It's possible in exactly the same way you describe above - via Javascript.