#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2012
    Posts
    14
    Rep Power
    0

    Thumbs down Displaying in Multiple div's in a for loop


    Hi all,
    I need to display some info in 4 div's enclosed in div row tag.
    for eg:-
    <div row>
    <div a>
    </div>
    <div b>
    </div>
    <div c>
    </div>
    </div>
    Suppose div a displays info from an array k based upon a criteria. if current element of k matches a criteria it displays in a . else not. So correspondingly there should be same entries in div's b and c based upon a item is displayed in a.
    So if an item is displyed in div a then corresponding entry in b and c should also be displayed which holds the same index value.
    I am thinking to use for loop for this. Can anyone specify how can I writeinto another div (b and c ) without closing the current div?

    Thanks,
    Pavan
  2. #2
  3. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,592
    Rep Power
    278
    something like
    <div row>
    <%
    for i=1 to 4
    response.write "<div a>"
    select case i
    case 1 response.write"<div a>"
    case 2 response.write"<div b>"
    case 3 response.write"<div c>"
    case 4 response.write"<div d>"
    end select
    'your logic there

    response.write "</div>
    next
    %>
    </div>
    GK
    __________________________________________________ _____
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree
  4. #3
  5. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2012
    Posts
    14
    Rep Power
    0
    Hi GK,
    If i Understand correctly you mean to replace the <div a> <div b> etc.. tags with the texts I need to print. right..?if so, they will be printed in div a only. If you mean the <div a> as a tag then it will create a new div with Id a. any of the solution does not work for me....If I get it wrong pls pardon me and direct me correctly.
    Here is my requirement clearly:-
    ======================
    I need to display the text in more than one div's simultaneously while I was in another div without closing the current div.
    for eg:- I have a <div a> and I am inserting data into a then I need to insert some more data into div b and c wihich are already defined without closing a. Hope I am clear now. if not please let me know...ASAP
  6. #4
  7. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,592
    Rep Power
    278
    I'm not clear of what you need just publish small html sample of what result page should looks like

Similar Threads

  1. Repeat region IF index = multiple of 5 (LOOP?)
    By farmboy in forum ASP Development
    Replies: 5
    Last Post: January 8th, 2007, 05:37 AM
  2. Multiple update in loop
    By buffalopjuck in forum ASP Development
    Replies: 1
    Last Post: March 12th, 2006, 02:03 AM
  3. loop with multiple conditions
    By -Dman100- in forum ASP Development
    Replies: 5
    Last Post: May 20th, 2005, 09:00 PM
  4. Displaying multiple results in one row
    By violato in forum Microsoft SQL Server
    Replies: 9
    Last Post: March 14th, 2005, 09:33 AM
  5. Nested loop not displaying all the records??
    By Steve Schofield in forum ASP Development
    Replies: 3
    Last Post: January 8th, 2002, 01:09 PM

IMN logo majestic logo threadwatch logo seochat tools logo