473,756 Members | 3,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problems to use a redio button

idsanjeev
241 New Member
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 1618
jhardman
3,406 Recognized Expert Specialist
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 New Member
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 Recognized Expert Specialist
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.writ e%>. 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 New Member
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
3162
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 row has been added is itself contained within an outer table (to handle the desired screen layout). That outer table does not properly grow to contain the new size of the table to which the row was added. (More specifically, I have...
3
1534
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 computer, and this particular button does not function on the new computer. I installed several version of Outlook from 2000 to 2003 and still doesn't work, windows has the latest patches, I installed the jet engine, I
10
2416
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) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
17
2493
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 'Button19' of type 'Button' must be placed inside a form tag with runat=server Can the IDE not do what it is supposed to do. It seems that it is a fight to make it do anything or did I do something wrong? It would seem silly to have to create a...
1
3598
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 I am hoping someone knows what I am doing wrong: 1) Pressing the Settings.. Button multiple times, brings up many instances of the Settings Panel. I just want it to bring up one. Is there an easy way to do that?
0
1888
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 input button that would allow for both text and an image on it. I am attempting to accomplish this by basing off of the asp:button control. I added a property for the image url and one to determine if the image is displayed on the left or right...
1
1929
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 field Document ID is unbound combo box. The table is Documents. (2) "Document Reception Subform" is the sub form in tabular form. The linked field is DocID. The table is DocumentReception.
3
2855
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 submmit button. so when I select one ption and click the submit button in the left side frame(or frame 1 or in index1.html) my right side frame should be reloded with a new html page as per the javascript method in main html page. but insted I...
5
1209
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 now work including my asp.net pages sort of....... What I mean is the page now displays without a server unavailable error (I resolved this by putting asp.net permissions on the folder containing the aspx pages). However when I point IIS at that...
0
9456
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10032
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9872
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9841
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5141
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5303
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.