db update on the fly

Results 1 to 2 of 2

Thread: db update on the fly

  1. #1
    Join Date
    Dec 1969

    Default db update on the fly

    Hi all<BR>I have a huge .asp page, that reads a lot of tables and lots of data from different tables is shown in the page. In one place I have a bit field from the database displayed in the form of a check box. How can i by checking or unchecking the checkbox update the database just for that particualar field and come back to the same position on the page quickly. I know this is posible in .net. but is there any way to accomplish this easily in regular .asp. Any suggestion is highly appreciated.<BR>thanx<BR>

  2. #2
    Join Date
    Dec 1969

    Default RDS or hidden frame...

    You can read about RDS (Remote Data Services) at MSDN.<BR><BR>But my own preference for something simpler to understand is to use a hidden frame.<BR><BR>Just have a 100% hidden frame (e.g., in the frameset use ROWS="100%,*" or similar) and then have a &#060;FORM&#062; set up ready to go in that hidden frame. Something like:<BR><BR>&#060;FORM Name="hiddenForm"&#062;<BR>&#060;INPUT Name="id"&#062;<BR>&#060;INPUT Name="value"&#062;<BR>&#060;/FORM&#062;<BR><BR>and then you have the onClick of the checkbox do something like this:<BR><BR>&#060;INPUT Type=Checkbox Name="whatever" Value="&#060;%=RS("id")%&#062;"<BR> onClick="doit( this );"&#062;<BR><BR>&#060;SCRIPT&#062;<BR>function doit( cb )<BR>{<BR> var frm = parent.hiddenFrame.document.hiddenForm;<BR> frm.id = cb.value;<BR> frm.value = ( cb.checked ? 1 : 0 );<BR> frm.submit( );<BR>}<BR>&#060;/SCRIPT&#062;<BR><BR>Presumably, the hidden &#060;FORM&#062; is an ASP page that submits to itself and simply returns the same blank and ready-to-use-again &#060;FORM&#062;.<BR><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