-
Posts
9 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Damodar
-
-
Sir;
As asked by you I am submitting the code.
=======================================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE> New Document </TITLE><META NAME="Generator" CONTENT="EditPlus"><META NAME="Author" CONTENT=""><META NAME="Keywords" CONTENT=""><META NAME="Description" CONTENT=""></HEAD><!--#include file="session/nosession.asp"--><!--#INCLUDE FILE="connect/dataconnectivity.asp"--><BODY onload="dynAnimation()" background="images/saraswati.jpg" bgproperties="fixed"><IMG SRC="images/sis_logo.jpeg" WIDTH="90" HEIGHT="90" BORDER=0 ALT="INTRANET AKAH"><HR><FONT SIZE="3" COLOR="#330033"><B>DORM DATA ENTRY FORM FOR <FONT SIZE="4" COLOR="#FF0000">ROLL CALL AT BREAKFAST, DINNER AND STUDY HOUR.</FONT></B></FONT><br><FONT SIZE="4" COLOR="#660000"><%response.write(FormatDateTime(date(),vblongdate))%></FONT> <CENTER><A HREF="redirect/loginredirect.asp"><FONT SIZE="3" COLOR="red">Log off</FONT></A><INPUT TYPE="submit" style="background-color: #C0C0C0; color: #800000; letter-spacing: 5pt; border-style: ridge" value="<" onclick = history.go(-1)></CENTER><%ses=session("username")if ses="" thenResponse.redirect"redirect/session_over.asp"end if%><CENTER><FORM METHOD=POST NAME="rollcall"ACTION="" onsubmit="return validateForm()"><%rs.Open "SELECT Name_of_Student from AKAH_dorm order by Name_of_Student asc", conn%><TABLE BORDER="0"><TR bgcolor="#FFFF00"><%for each x in rs.Fields%><%response.write("<th>" & x.name & "</th>")%><%next%></tr><%do until rs.EOF%><tr><%for each x in rs.Fields%><td bgcolor="#CCFFFF"><INPUT TYPE="hidden" NAME="stuname" Value="<%Response.Write(Replace((x.value),"""","'"))%>"><%Response.Write(Replace((x.value),"""","'"))%></td><td bgcolor="#CCFFFF"><SELECT NAME="occasion" value=""><option selected value="Present" >Present</option><option value="Absent" >Absent</option><option value="Fasting">Fasting</option><option value="Sick">Sick</option><option value="Out of Campus">Out of Campus</option></SELECT></td><%nextrs.MoveNext%></tr><%looprs.closeconn.close%><TR><TD bgcolor="#CCFFFF">Date</TD><TD bgcolor="#CCFFFF"><select name="rdate"><%for i = 1 to 31if i = day(now) thenResponse.Write "<option value="&i&" selected>" & i & "</option>"elseResponse.Write "<option value="&i&">" & i & "</option>"end ifnext%></select><select name="rmonth"><%for i = 1 to 12if i = month(now) thenResponse.Write "<option value="&i&" selected>" & i & "</option>"elseResponse.Write "<option value="&i&">" & i & "</option>"end ifnext%></select><select name="ryear"><%for i = 2013to 2016if i = year(now) thenResponse.Write "<option value="&i&" selected>" & i & "</option>"elseResponse.Write "<option value="&i&">" & i & "</option>"end ifnext%></select></TD></TR><TR><TD bgcolor="#CCFFFF">Roll call for :</TD><TD bgcolor="#CCFFFF"><SELECT NAME="occasion" value=""><option selected value="" >Select</option><option value="Breakfast" >Breakfast</option><option value="Dinner">Dinner</option><option value="Evening Study">Evening Study</option></SELECT></TD></TR></TR></TABLE><p><INPUT TYPE="reset"> <INPUT TYPE="submit"></FORM></CENTER><script>function validateForm(){var x=document.forms["rollcall"]["occasion"].value;if (x==null || x==""){alert("Please select occasion of the roll call.Breakfast, Dinner or Study hour. It's the last row.");return false;}}</script></BODY></HTML>===============================ThanksDAMODAR -
Dear All;
Need your help. I am programming students' roll call in ASP with SQL 2008 R2. There are about 100 students. By default option selected is 'Present' using drop down list. I tried to use radio buttons but only one button remains selected so I am using drop-down list ( How to select multiple radio buttons?). After selecting "Present", "Absent","Late" etc, how do I insert all 100( or whatever number) of rows in the SQL table simultaneously? How should I use "for", "loop" or any other method? Please guide.
Regards
DAMODAR
-
Sir;
I have developed a website for my Department of Science, which recently is hosted in USA. The website is programmed not to accept any form submissions after 8 pm. Also it gets redirected to "Site is down" page on Saturdays and Sundays. It was OK while the site was over in-house server. Now that its in USA, because the time zone now is different, it does not accept the forms after 8 pm in USA, which is 8 am here in India. Site does not accept forms from 8 am to 12 noon here in India. Also weekend redirect to "Site is down" is of no use due to date being different in USA and in India.
Is there any code in ASP or procedure in SQL 2008 R2, whereby I can convert the USA time on the server in USA to Indian Standard Time ( IST ) so that the required functioning of the site happens as per the Indian Time and not as per the time in USA? We are on shared server so the server time can not be changed.
Thanks
DAMODAR G AGNI
How to Insert multiple rows in SQL 2008 R2 : Website in ASP
in ASP
Posted
Sir;
I changed dropdown to check boxes. I tried below given code. It works but in a strange manner. In my dummy database I have 9 students. Data gets inserted 9 times but in every row of the SQL table I get nine names of the students separated by a comma in first column,nine entries of PRESENT,ABSENT,LATE etc in the second column separated by commas etc. This repeats nine times consuming 9 rows.The code is shown below.
Thanks for the valued support.
Regards
DAMODAR
===================================
</BODY>