anybody knows ASP

  • i have a problem,

    we have one customer master, where users can enter customer name and information, then there is one report which will display all the customer names, and some information and there is one option view when the user clicks on it, it will show all the details regarding to that customer, in text boxes,list boxes, and so on

    what the client wants is, user should be allowed to enter information which is not previously entered,

    suppose ia have entered customer name in customer name field

    then that field is not editable, it will be disabled user can see that information but cannot edit,

    the fields which are blank are editable and user can enter inforation and save it.

    when the asp page is submitted i call another asp page to process that information, but what happens is that the textboxes which are disabled are shows blank value..

    but i need that information how to do that ?

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • I would do processing like this in one asp page.

    The submit button has a value, or if you are using <input="image"....> a hidden field has a suitable value.

    The page always looks for this value, but of course it only exists when the page is submitted.

    I generally work in server side Javascript but I am sure you will be able to translat the pseudo code below.

    if(request.txtsubmitted==1){

      var sReadOnly=" READONLY ";

      result=db.execute("usp_AddCustomer "

    + " ' "

    + request.txtFirstName

    + "','"

    + request.txtLastName

    + "'");

    }

    <input type="text" name="txtFirstName" id="txtFirstName" <server>write(sReadOnly);</server>value="<server>write(result["firstname"]</server>">

    In this case the stored procedure returns the record that it has just added.  Generally I have two stored procedures and the Add procedure returns the identity of the record it has just added, or zero if it fails.

    The second procedure returns a customer if using the value returned from the first.

  • no dude,

    there are around 70 text boxes, the text field which will have value will be disabled and wont allow edit

    the text field which are blank will be editable,

    this thing is to enable users to feed missing information which they may get later, but they are not supposed to tamper or change any data thats why those fields are disabled.

    but iam passing parameters in stored procedures and i need values of disabled text boxes got it ??

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • So basically

    if(rs!FirstName){

     write("<input type=text name=txtFirstName READONLY value=\"" & rs!FirstName & "\">");

    else

     write("<input type=text name=txtFirstName>"); 

     

  • pls write an explaination for u r syntax, shall i write this way ?

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • thanks a lot dude, that was very useful, even though u talk less u make sense

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • If a field in your recordset object contains data then use ASP to write out the html <input..> tag with a READONLY attribute and VALUE attribute as picked up from the recordset.

    If your field is empty then simply use ASP to write out the <input..> tag with no value.

    I've used Server Side Javascript (SSJS) though I suppose JSCRIPT would do just as well.

    If you say if(rs!tfirstname) then the condition is satisfied if the recordset field object produces something other than NULL, undefined or zero.

    To write out quotes and various other characters you have to precede them with a \ character to mark them as escaped.

    I think in VBScript the equivalent would be to write chr(34) in your code.

  • i understood u r point, and iam using it

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply