Web Design and Development Forums

Response.write if statements in a form?

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


Go Back   Webforumz.com > Program Your Website > ASP Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Apr 30th, 2008, 16:37   #1 (permalink)
New Member
 
Join Date: Apr 2008
Location: hull
Posts: 1
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
natalief2008 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 5th, 2008, 21:58   #2 (permalink)
New Member
 
Join Date: May 2008
Location: Ireland
Posts: 9
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.
Miah is offline  
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
Rate This Thread
Rate This Thread:

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
In Response To FREE advertising craig Adsense & Pay Per Click 10 Dec 26th, 2005 21:43
If Statements... courtjester Flash & Multimedia Forum 5 Sep 2nd, 2004 02:48



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 20:12.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59