469,918 Members | 2,201 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,918 developers. It's quick & easy.

problems after creating link with table column and display row detail after clicked

idsanjeev
241 100+
Expand|Select|Wrap|Line Numbers
  1. <%@ Language =vbscript%>
  2. <% Option Explicit %>
  3. <html>
  4. <head><TITLE>VOICE OF BARAUNIANS</TITLE></head>
  5. <body>
  6. <!--#include file="front.inc"-->
  7. <div style="Position:Absolute; width:700; TOP:0; left:180; background-color:#f0f0f0">
  8. <%
  9. Dim conn
  10. dim objrs
  11. Dim R
  12. Dim R1
  13. Dim vtopsub
  14. dim vtopid
  15. dim vempno
  16. Dim countloop
  17. Dim replycount
  18. Set conn = Server.CreateObject("ADODB.Connection")
  19. conn.Open("DSN=ORACLE; User Id = STARTER; Password = STARTER")
  20. Set R = Server.CreateObject("ADODB.Recordset")
  21. Set R1 = Server.CreateObject("ADODB.Recordset")
  22. Set R = Conn.Execute("SELECT top_id, top_sub, launch_by, launch_dt FROM topmaster order by top_id  ")
  23. %>
  24. <div style="Position:Absolute; top:100; left:0; width:820; height:472; background-color:skyblue">
  25. <table border=0>
  26.   <tr>
  27.     <td align='center' colspan='10%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Top Id</b></font></td>
  28.     <td align='center' colspan='40%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Topic</b></font></td>
  29.     <td align='center' colspan='40%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Employee Name</b></font></td>
  30.     <td align='center' colspan='20%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Posted Date</b></font></td>
  31.     <td align='center' colspan='10%' bgcolor='#f0f0f0'><font face="arial" size=2><b>No.Of Reply</b></font></td>
  32.     <td align='center' colspan='10%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Reply</b></font></td>
  33.   </tr>
  34. <%
  35.  
  36.   If Not R.EOF Then    
  37.   R.Movefirst
  38.   countloop = 1
  39.   Do While Not R.EOF%>
  40.     <tr>
  41.       <td align='right' colspan='10%'><font face="arial" size=2><%Response.Write R("top_id")%></font></td>
  42.       <td align='left' colspan='40%'><font face="arial" size=2><a href=voice.asp><%Response.Write R("top_sub")%></a></font></td>
  43.       <td align='left' colspan='40%'><font face="arial" size=2><%Response.Write R("launch_by")%></font></td>
  44.       <td align='center' colspan='20%'><font face="arial" size=2><%Response.Write R("launch_dt")%></font></td>
  45.       <%Set R1 = Conn.Execute("SELECT top_id, rep_id from topic where top_id = " & R("top_id"))
  46.       If R1.Recordcount >= 0 Then
  47.         replycount = R1.Recordcount
  48.       else
  49.         replycount = 0
  50.       end if %>
  51.       <td align='center' colspan='10%'><font face="arial" size=2><%Response.Write replycount%></font></td>
  52.      <td>   <input type="radio" name="vtopid" value="<%=R("top_id") %>"></td>
  53.    </tr>
  54.     <%countloop = countloop + 1
  55.     If countloop <= 10 Then
  56.       R.Movenext
  57.     Else
  58.       R.Movenext
  59.     End If
  60.   Loop %>
  61.  <%
  62.   If Not R.EOF Then
  63.       Response.Cookies("top_id") = vtopid
  64. end if
  65. %>
  66. </table>
  67. <table width=765>
  68.   <tr>
  69.     <td align='right'><input type="submit" name="submit" value="Reply" onclick="reply()"></td>
  70.       <td><input type ="button" value="EXIT" onClick="window.close()"></td>
  71.  
  72.   </tr>
  73. </table>
  74. <%end if%>
  75. </div>
  76. <%conn.close
  77. Set conn = Nothing
  78. %>
  79. <script language="Javascript">
  80. function brvoice()
  81. {
  82.   window.location = "brvoice.asp"
  83. }
  84.  
  85. function reply()
  86. {
  87.   window.location = "voicereply.asp"
  88. }
  89. function voice()
  90. {
  91.   window.location = "voice.asp"
  92. }
  93. function newtopic()
  94. {
  95.   window.location = "newtopic.asp"
  96. }
  97. </script>
  98. </body>
  99. </html>
  100.  
  101.  
  102.  asp code for display row detail after clicked but it only disply firs record please correct the code where is logic failed.
  103. <% @ Language =vbscript%>
  104. <% Option Explicit %>
  105. <html>
  106. <head><TITLE>VOICE OF BARAUNIANS</TITLE></head>
  107. <body>
  108. <!--#include file="front.inc"-->
  109. <%If Request.Cookies("userid") = "" Then
  110.   Response.Redirect "login.asp"
  111. Else%>
  112. <div style="Position:Absolute; width=700; TOP:100; left:180; background-color: #e0e0e0">
  113. <%
  114. Dim conn
  115. Dim R
  116. Dim R1
  117. Dim i
  118. Set conn = Server.CreateObject("ADODB.Connection")
  119. conn.Open("DSN=ORACLE; User Id = STARTER; Password = STARTER")
  120. Set R = Server.CreateObject("ADODB.Recordset")
  121. Set R1 = Server.CreateObject("ADODB.Recordset")
  122. Set R = Conn.Execute("SELECT a.top_id, a.top_sub, a.launch_by, a.launch_dt, a.msg,b.rep_id, b.rep_by, b.rep_dt,  b.reply FROM topmaster a,topic b ")
  123. %>
  124. <table border=2 width=700 >
  125.   <tr>
  126.     <td align='center' bgcolor='lightgrey'>Topic Id</td><td colspan='10%' align='right'><%Response.Write R("top_id")%></td>
  127.   </tr>
  128.  
  129.      <tr>
  130.    <td align='center' bgcolor='lightgrey'>Topic Subject</td><td colspan='10%' align='right'><%Response.Write  R("top_sub") %></td>
  131.      </tr>
  132.      <tr>
  133.      <td align='center' bgcolor='lightgrey'>Employee Name</td><td colspan='40%' align='right'><%Response.Write R("launch_by") %></td>
  134.      </tr>   
  135.      <tr>
  136.      <td align='center' bgcolor='lightgrey'>Posted Date</td><td colspan='40%' align='right'><%Response.Write R("launch_dt")%></td>
  137.      </tr>
  138.      <tr>
  139.      <td align='center' bgcolor='lightgrey'>No.Of Reply</td>
  140.      </tr>
  141.  
  142.       <table><b> VOICE</b>
  143.       <tr><td colspan='10%' align='left'><%Response.Write R("msg")%></td></tr>
  144.       </table>
  145. <%
  146.  
  147. conn.close
  148. Set conn = Nothing
  149. %>
  150. <script language="Javascript">
  151. function brvoice()
  152. {
  153.   window.location = "brvoice.asp"
  154. }
  155.  
  156. function voicereply()
  157. {
  158.   window.location = "voicereply.asp"
  159. }
  160. function voice()
  161. {
  162.   window.location = "reply.asp"
  163. }
  164. </script>
  165.    <br>
  166.    <table border=1; width = 700>
  167.        <tr>
  168.         <table align="center">
  169.          <tr>
  170.            <td align="center"><input type="button" name="post voice"  value="Vew Report" onclick= "voice()">
  171.            <td align="center"><input type="button" name="post voice"  value="Reply" onclick= "voicereply()">
  172.                              <td><input type="button" name="Back" value="Back" onclick="brvoice()"></td>
  173.            </td>   
  174.           </td>
  175.          </tr>
  176.         </table>
  177.        </tr>
  178.       </table>
  179. <% End If %>
  180. </body>
  181. </html>
question :- i wnats to transfer value of one form to another form please give how to do.
Oct 19 '07 #1
1 2116
idsanjeev
241 100+
dear sir
i wants to post any massages and stored in table.
display table data and create link with cloumn after clicking on column thats row detail only dislay
Oct 19 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by arun32581 | last post: by
3 posts views Thread by arun32581 | last post: by
2 posts views Thread by TH | last post: by
4 posts views Thread by Miguel Dias Moura | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.