Results 1 to 2 of 2

Thread: How to move the records towards up in asp page in a frame !

  1. #1
    Join Date
    Aug 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation How to move the records towards up in asp page in a frame !

    Hi,

    I created a asp page thorugh Front Pgae & added a frame in the right side of my page. I Populated the data from my Northwind(Ms Sql 7) database in a table inside the Frame. It works fine.

    I need to move the table towards up.
    For Example if i have 15 records in the table. Then i need to move the table slowly towards up, so the first record will go up and dissappear and then second, similarly upto 15th record. After that from the bottom of the Frame the firrst records should appear and go on.

    How to do this task, i don't know exactly this belongs to html side or asp side.

    Can any 1 give me guidence abou this.

    Thankyou,
    Chock.

  2. #2
    Join Date
    Jul 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Create the following .asp page (replacing the part between the comments with your results from you database:

    <html>
    <body>

    <div id="datacontainer" style="position:absolute;left:0;top:10;width:100%" onMouseover="scrollspeed=0" onMouseout="scrollspeed=cache">

    <!-- ADD YOUR SCROLLER COMMENT INSIDE HERE--------------------->

    PUT THE RESULTS OF YOUR SQL HERE

    <!-- END SCROLLER CONTENT---------------------------------------->
    <div>


    <script language="JavaScript1.2">
    //Specify speed of scroll. Larger=faster (ie: 5)
    var scrollspeed=cache=2

    function initialize(){
    marqueeheight=document.all? parent.document.all.datamain.height : parent.document.getElementById("datamain").getAttribute("height")
    dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
    dataobj.style.top=50
    thelength=dataobj.offsetHeight
    scrolltest()
    }

    function scrolltest(){
    dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed
    if (parseInt(dataobj.style.top)<thelength*(-1))
    dataobj.style.top=100
    setTimeout("scrolltest()",50)
    }

    window.onload=initialize

    </script>
    </body>
    </html>




    Now. put this code on the page where you want to show your results moving up:

    <iframe id=datamain src="thenameofthepageabove.asp" width="300" height="300" marginwidth=0 marginheight=0 hspace="0" vspace="0" frameborder=1 scrolling=no>
    </iframe>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •