473,432 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,432 software developers and data experts.

problems to use a redio button

idsanjeev
241 100+
first i want to use link href to click and display its data on next page.
and anther work i want to do selected redio buttons top_id is submetted in another recordset. please help me soon
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.   <%R.Movefirst
  35.   countloop = 1
  36.   Do While Not R.EOF%>
  37.     <tr>
  38.       <td align='right' colspan='10%'><font face="arial" size=2><a href=voice.asp><%Response.Write R("top_id")%></a></font></td>
  39.       <td align='left' colspan='40%'><font face="arial" size=2><a href=voice.asp><%Response.Write R("top_sub")%></a></font></td>
  40.       <td align='left' colspan='40%'><font face="arial" size=2><%Response.Write R("launch_by")%></font></td>
  41.       <td align='center' colspan='20%'><font face="arial" size=2><%Response.Write R("launch_dt")%></font></td>
  42.        <%Set R1 = Conn.Execute("SELECT top_id, rep_id from topic where top_id = " & R("top_id"))
  43.       If R1.Recordcount >= 0 Then
  44.         replycount = R1.Recordcount
  45.       else
  46.         replycount = 0
  47.       end if%>
  48.       <td align='center' colspan='10%'><font face="arial" size=2><%Response.Write replycount%></font></td>
  49.       <td>  <input type="radio" name="radio1" value="R("top_id")" checked></td>
  50.    </tr>
  51.     <%countloop = countloop + 1
  52.     If countloop <= 10 Then
  53.       R.Movenext
  54.     Else
  55.       R.Movelast
  56.     End If
  57.   Loop %>
  58.  <%
  59.   R.Find "top_id = '" & Request.Form("top_id") & "'"
  60.   If Not R.EOF Then
  61.      vtopid = Request.Form("top_id")
  62.       Response.Cookies("top_id") = vtopid
  63. end if
  64. %>
  65. </table>
  66. <table width=765>
  67.   <tr>
  68.     <td align='right'><input type="submit" name="submit" value="Reply" onclick="reply()"></td>
  69.   </tr>
  70. </table>
  71.  
  72. </div>
  73. <%conn.close
  74. Set conn = Nothing
  75. %>
  76. <script language="Javascript">
  77. function brvoice()
  78. {
  79.   window.location = "brvoice.asp"
  80. }
  81.  
  82. function reply()
  83. {
  84.   window.location = "voicereply.asp"
  85. }
  86. function voice()
  87. {
  88.   window.location = "voice.asp"
  89. }
  90. function newtopic()
  91. {
  92.   window.location = "newtopic.asp"
  93. }
  94. </script>
  95. </body>
  96. </html>
Expand|Select|Wrap|Line Numbers
  1. <%@ Language=VBScript%>
  2. <%Option Explicit%>
  3. <html>
  4. <head>
  5. <title>Barauni Refinery -Voice of baraunians</title>
  6. <!--#include file="front.inc"-->
  7. </head>
  8. <body>
  9. <%If Request.Cookies("userid") = "" Then
  10.   Response.Redirect "login.asp"
  11. Else%>
  12. <div style="Position:Absolute; top:100; left:180; width:820; height:472; background-color:skyblue">
  13. <%
  14. Dim R
  15. Dim R1
  16. dim R2
  17. Dim vrepby
  18. Dim vtopid
  19. Dim vrepid
  20. Dim vrepdt
  21. Dim vreply
  22. Dim errorMsg
  23. Dim conn
  24. dim i
  25. Dim no_of_day
  26. Set conn = Server.Createobject("ADODB.Connection")
  27. conn.Open "DSN=ORACLE; User ID = STARTER; Password = STARTER"
  28. Set R = Server.CreateObject("ADODB.Recordset")
  29. Set R1 = Server.CreateObject("ADODB.Recordset")
  30. Set R2 = Server.CreateObject("ADODB.Recordset")
  31. Set R2 = 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 ")
  32. %>
  33.    <center><b><font face="arial"><h2>POST YOUR REPLY</h2></font></b></center>
  34.     <hr>
  35.     <p>
  36.     <form method="POST" action="voicereply.asp">
  37. <div style="position:absolute; left:300; top:60; z-index:0">
  38. <table border=1 width=250 > <font face="monotype corsiva"><b>Topic</b></center></font>
  39.      <tr>
  40.    <td align='center'>Topic ID</td><td colspan='10%' align='right'><%Response.Write  R2("top_id") %></td>
  41.      </tr>
  42.      <tr>
  43.    <td align='center'>Topic Subject</td><td colspan='10%' align='right'><%Response.Write  R2("top_sub") %></td>
  44.      </tr>
  45.      <tr>
  46.      <td align='center'>Employee Name</td><td colspan='40%' align='right'><%Response.Write R2("launch_by") %></td>
  47.      </tr>   
  48.      <tr>
  49.      <td align='center'>Posted Date</td><td colspan='40%' align='right'><%Response.Write R2("launch_dt")%></td>
  50.      </tr>
  51.      <tr>
  52.      <td align='center' >No.Of Reply</td>
  53.      </tr>
  54. <%end if%>
  55. </table>
  56.  </div>
  57. <% R1.Open "Select top_id from topmaster order by top_id", conn, adOpenStatic, adLockOptimistic, adCmdText
  58.   R.Open "Select rep_id from topic order by rep_id", conn, adOpenStatic, adLockOptimistic, adCmdText
  59.   If R.Recordcount > 0 Then
  60.     R.Movelast
  61.     vrepid = R("rep_id")
  62.     vrepid = CInt(vrepid) + 1
  63.   Else
  64.     vrepid = 1
  65.   End if
Oct 17 '07 #1
4 1604
jhardman
3,406 Expert 2GB
first i want to use link href to click and display its data on next page.
and anther work i want to do selected redio buttons top_id is submetted in another recordset. please help me soon
Please explain again what your question is. I'm afraid it is not clear what you are asking.

Jared
Oct 18 '07 #2
idsanjeev
241 100+
sir i am creating a page which is display records from table i wants to click on link and display its row detail after searching from table.
another work i wants to do reply on that topic and add its priamry key into anothe table automatically
that my problems
i cant disply specific row data it only disply first or last data from table clicking on any link .
Oct 19 '07 #3
jhardman
3,406 Expert 2GB
OK, from what I can see there are a couple holes. 1- the line that generates the radio button should look like this:
Expand|Select|Wrap|Line Numbers
  1.       <td>  <input type="radio" name="radio1" value="<%=R("top_id")%>" checked></td> 
the <%=%> notation is just a shortened notation for <%response.write%>. As you had it written the value passed to the form was "R("

2- On the second page you will need to pull up this info and pass it to the db somehow. Sind you are using a radio button and only one option will be selected, I would do something like this:
Expand|Select|Wrap|Line Numbers
  1. "SELECT * FROM topic WHERE top_id = '" & request.form("radio1") & "'"
I'm not sure I follow everything in your second page, so I hope I'm not steering you wrong, but it should be something along those lines.

Jared
Oct 19 '07 #4
idsanjeev
241 100+
thanks for taking response
plz support enhanced mode at next time
Oct 23 '07 #5

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

Similar topics

3
by: daveland | last post by:
I am working on some JavaScript that dynamically adds rows to a table in response to a button click. A new row does appear on the screen when the button is clicked. However, that table to which a...
3
by: John | last post by:
Hi All, I have a database with a button that when it is click it sends an email to the client. This email button works without any problems in other computers. On Thursday we bought a new...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
17
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
1
by: Michael Yanowitz | last post by:
Hello: Below I have included a stripped down version of the GUI I am working on. It contains 2 dialog boxes - one main and one settings. It has the following problems, probably all related, that...
0
by: David | last post by:
Hello all. I am trying to implement my first server control and have run into two problems that I cannot solve. I need the assistance of someone with more experience. My goal was to create an...
1
by: Wes Brooks | last post by:
Hello expert, Please help me with the following problems. I have spent ages to resolve them but no luck. I have two forms. (1) "Document Reception Input Form" is the main form. The search...
3
by: rajarya | last post by:
Hi, I m designing a HTML page(index.html),here i have 2 frames,by defult both frames have index1.html and index2.html as their source . in first frame(index.html) ,i have some redio buttons,and a...
5
by: Chris | last post by:
I was having problems using my local IIS to display asp.net pages, or any pages for that matter. I actually reinstalled IIS and then uninstalled the ..net framework and reinstalled it. All pages...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.