Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8737153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:27:06+00:00 2026-06-13T10:27:06+00:00

<div style=width:100%;background-color: #61b832;border-radius: 10px;color:white;text-align: center>Videos List</div> <table style=width:100%;id=videoTable> <c:forEach items=${requestScope.userInfo.videoList}var=videovarStatus=0> <script> var fullvideoUrl='<c:out value=${video.videoUrl}></c:out>’;

  • 0
<div style="width:100%;background-color:  #61b832;border-radius: 10px;color:white;text-align: center">Videos List</div>
<table style="width:100%;"id="videoTable">
    <c:forEach items="${requestScope.userInfo.videoList}"var="video"varStatus="0">
        <script>
            var fullvideoUrl='<c:out value="${video.videoUrl}"></c:out>';
            var videocode='http://www.youtube.com/embed/'+youtube_parser(fullvideoUrl);
            $('#videoTable').prepend('<tr class="appendVideo"><td  style="width:80%;border-bottom: 1px solid #CCC;"><c:out value="${video.videoDescription}"></c:out></td><td  style="width:20%;border-bottom: 1px solid #CCC"><img src="images/fancybox_play-button-icon.png" class="changeVideo" videoId="<c:out value="${video.videoId}"></c:out>" videoUrl ="'+videocode+'"/></td></tr>');
        </script>
    </c:forEach>
</table>
</div>

This is what i ‘m trying to do but each video gets added twice in the table

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:27:08+00:00Added an answer on June 13, 2026 at 10:27 am

    You may want to use a c:if as below:

        <c:if test="${requestScope.userInfo.videoList.size() >0}" >
          <script>
              $('#videoTable').prepend("1");
          </script>
        </c:if> 
    

    EDIT:

    Not sure why are using script. I think you can simply write like this:

     <div style="width:100%;background-color:  #61b832;border-radius: 10px;color:white;text-align: center">Videos      List</div>
      <table style="width:100%;"id="videoTable">
       <c:forEachitems="${requestScope.userInfo.videoList}" var="video" varStatus="0">
         <tr class="appendVideo"><td  style="width:80%;border-bottom: 1px solid #CCC;"><c:out value="${video.videoDescription}"></c:out></td><td  style="width:20%;border-bottom: 1px solid #CCC"><img src="images/fancybox_play-button-icon.png" class="changeVideo" videoId="<c:out value="${video.videoId}"></c:out>" videoURL="http://www.youtube.com/embed/${video.videoUrl}"/></td></tr>
       </c:forEach>
      </table>
    </div>
    

    If you want sorting of the results in reverse, simply sort your requestScope.userInfo.videoList using Collections.sort in reverse before printing that in the UI. Also if there is any modification required in the URL, perform in the original video list itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<html> <head></head> <body> <div id=ctl00_ContentPlaceHolder1_ctl00_ctl01_Showcase> <div style=width:100%;text-align:center;><img src=http://www.xyz.com/aaa.gif id=ctl00_ContentPlaceHolder1_ctl00_ctl01_loderImg alt=Loading /></div> </div> <script> q=
From line: < div style=left:0px; top:0px; width:100%; height:63px; border-style: solid; border-width: 1px; background-color:#FCF0C4; border-color:#E87511;
I have the following <div id=border style=width:100%; border:8px solid #FFF> <div id=menu style=width:250px; float:left;
This works great: <style type=text/css> div { width:100px; height:100px; background:red; transition:width 2s; -moz-transition:width 2s;
<style type=text/css> div#foo { background: #0000ff; width: 200px; height: 200px; opacity: 0.30; filter: alpha(opacity
my code is as follows: #under { width: 100%; height: 50px; background-color: #D4D4D4; border:
The situation is: The CSS: <style> #aux1{ position:relative; background-color:#ccc; width:100%; height:200px; } #aux2{ display:block;
My navigation panel currently has the following attributes: <div id='navpanel' style='float:left; width:300px; height:100%; overflow:hidden;
I have a page with a Google Maps div: <div id=map_canvas style=width: 100%; height:
Here is my code i am using for custom search, <div id=cse-search-form style=width: 100%;>Loading</div>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.