Response.write if statements in a form?

This is a discussion on "Response.write if statements in a form?" within the Classic ASP section. This forum, and the thread "Response.write if statements in a form? are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Apr 30th, 2008, 16:37
New Member
Join Date: Apr 2008
Location: hull
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Response.write if statements in a form?

Hope this is the correct thread to post in.
I am a student and currently studying sql, vbscript and web based databases etc.
However i am pretty much stuck on the following piece of script.

Code: Select all
<%
    Set MyConn=Server.CreateObject("ADODB.Connection")
    MyConn.Open "pqrtrav"
    Set Rs=MyConn.Execute("SELECT*From[trip]Order by activity")
    Previousactivity="None"
    WHILE NOT Rs.EOF

    CurrentActivity=Rs("Activity")

    if (CurrentActivity<>PreviousActivity) then
%>    
        <%Response.Write(Rs("Activity")) %> <input name="<%Response.Write(Rs("Activity")) %>" type="checkbox" value="<% Response.Write(Rs("Activity")) %>" >
<% 
       end if
       PreviousActivity=CurrentActivity

       Rs.MoveNext
            
       WEND
       Rs.Close
       
       MyConn.Close
%>
I have opened the database and produced a list of 'activities' taken from the database with a checkbox along side it. However, when I submit the form, the information is not displayed on the next page when boxes are checked. How would it be possible to display this information on the submit page after a box has been checked??

Please help,
kind regards Natalie

Last edited by saltedm8; May 5th, 2008 at 22:12. Reason: added [code] tags
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 5th, 2008, 21:58
New Member
Join Date: May 2008
Location: Ireland
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Response.write if statements in a form?

Have a look at http://www.plus2net.com/asp-tutorial/form-checkbox.php I think it's what you might be looking for.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant figure out senton and response Foobster ASP.NET Forum 0 Aug 15th, 2007 10:01
Response.IsClientConnected does not work in IIS6 Jacque Classic ASP 2 May 22nd, 2006 22:48
If Statements... courtjester Flash & Multimedia Forum 5 Sep 2nd, 2004 02:48


All times are GMT. The time now is 22:14.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42