Print Page | Close Window

checkbox singel works but

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4426
Printed Date: 30 March 2026 at 6:37am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: checkbox singel works but
Posted By: aero
Subject: checkbox singel works but
Date Posted: 21 July 2003 at 5:25pm

Hi. i have this code:

Set objRS = objConn.Execute("SELECT * FROM Aero ORDER BY ID")

If (Not objRS.BOF) And (Not objRS.EOF) Then
  objRS.MoveFirst
 Dim intCounter
 intCounter = 0
  While Not objRS.EOF
 intCounter = intCounter + 1
 
 strgodkend = objRS("Godkendt")
 If strgodkend = "True" then
    strgodkend = "checked"
 end if
 BrugerID = objRS("ID")
%>
   <form action="Godkend.asp" method="Post" name="godkend<%=intcounter%>">
   <%=BrugerID%>&nbsp;&nbsp;&nbsp;<%=objRS("Navn")%>&nbsp;&nbsp;&nbsp;&nbsp;
     
             <input type="hidden" value="<%=objRS("ID")%>" name="ID">
             <input type="checkbox" value="<%=objrs("ID")%>" name="check"  onclick="godkend<%=intcounter%>.submit();" <%=strgodkend%>>
         
      </form>
<%

on this site i can select or deselect some records from a db and it works !!!

my problem is to make a checkbox field before the first record, and if i klik ind this checkbox i can select or deselect all at one klik !!!!

Can someone make that little function in my code so i can select or deselect all at one klik or select the records i want like i can now !??

 




Replies:
Posted By: Flamewave
Date Posted: 23 July 2003 at 10:54am

Do you really need a seperate form for each recordset? If not it would be much easier to write a function to do what you want. The function will have to be written in javascript, since what you want to do is client side and not server side. Check on http://www.irt.org - www.irt.org under the javascript faq for possible solutions.



-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net