How To display a page from middle

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ksn2007
    New Member
    • Jan 2008
    • 13

    How To display a page from middle

    Hi All,
    I am using Ajax for displaying the resultant pages.When I click on a link I want the page to be displayed from the middle rather than from the top.Please help me in this.
    Thanks,
    KSN
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Originally posted by ksn2007
    Hi All,
    I am using Ajax for displaying the resultant pages.When I click on a link I want the page to be displayed from the middle rather than from the top.Please help me in this.
    Thanks,
    KSN
    Page to be displayed from the middle rather than the top?

    Surely that's a html problem?
    [code=html]
    <div style="margin-top: 300px;">
    content
    </div>
    [/code]

    Comment

    • ksn2007
      New Member
      • Jan 2008
      • 13

      #3
      Originally posted by markusn00b
      Page to be displayed from the middle rather than the top?

      Surely that's a html problem?
      [code=html]
      <div style="margin-top: 300px;">
      content
      </div>
      [/code]
      Im really very very sorry I might confused you. What I want really is my result page contains whole data,If the User click on a link to read the data about some particular,the corresponding data should be shown from top,although there is some data in the page before the required data.i.e.cursor should point to this data.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Originally posted by ksn2007
        Im really very very sorry I might confused you. What I want really is my result page contains whole data,If the User click on a link to read the data about some particular,the corresponding data should be shown from top,although there is some data in the page before the required data.i.e.cursor should point to this data.
        Nope, still not getting you.

        Try and explain it in clear english please, be as detailed as you can be.

        Comment

        • harshmaul
          Recognized Expert Contributor
          • Jul 2007
          • 490

          #5
          links, or images would be good. also some code will help

          Comment

          • ksn2007
            New Member
            • Jan 2008
            • 13

            #6
            Originally posted by markusn00b
            Nope, still not getting you.

            Try and explain it in clear english please, be as detailed as you can be.
            Thanks a lot for looking into this.
            I have some links on the left frame and resultant page should be displayed on the right frame of the screen.Im getting the resultant page using Ajax.Out of these links 3 links point to same page which contains the data corresponding to the three links.What I want is If user clicks on 2nd link,in the result page the cursor should point to the data corresponding to 2nd link.i.e.the user has to scroll up to read the data corresponding to First link.

            Comment

            • hsriat
              Recognized Expert Top Contributor
              • Jan 2008
              • 1653

              #7
              Originally posted by ksn2007
              Thanks a lot for looking into this.
              I have some links on the left frame and resultant page should be displayed on the right frame of the screen.Im getting the resultant page using Ajax.Out of these links 3 links point to same page which contains the data corresponding to the three links.What I want is If user clicks on 2nd link,in the result page the cursor should point to the data corresponding to 2nd link.i.e.the user has to scroll up to read the data corresponding to First link.
              For all the three links, which point to same page, use var flagIfAlreadyLo aded to know whether AJAX had already called that page or not.
              If (flagIfAlreadyL oaded==1), don't reload the page but move it to the corresponding anchor only.
              But if (flagIfAlreadyL oaded==0), load the page through AJAX and move it to the corresponding anchor and set flagIfAlreadyLo aded=1 so that it won't reload the page through AJAX again.

              Comment

              • ksn2007
                New Member
                • Jan 2008
                • 13

                #8
                Originally posted by hsriat
                For all the three links, which point to same page, use var flagIfAlreadyLo aded to know whether AJAX had already called that page or not.
                If (flagIfAlreadyL oaded==1), don't reload the page but move it to the corresponding anchor only.
                But if (flagIfAlreadyL oaded==0), load the page through AJAX and move it to the corresponding anchor and set flagIfAlreadyLo aded=1 so that it won't reload the page through AJAX again.
                Thanks for the help can you tell me how to move it to corresponding anchor

                Comment

                • hsriat
                  Recognized Expert Top Contributor
                  • Jan 2008
                  • 1653

                  #9
                  Originally posted by ksn2007
                  Thanks for the help can you tell me how to move it to corresponding anchor
                  [CODE=javascript]location.hash=' anchor1';[/CODE][HTML]<a name="anchor1"> </a>[/HTML]

                  Comment

                  • ksn2007
                    New Member
                    • Jan 2008
                    • 13

                    #10
                    Originally posted by hsriat
                    [CODE=javascript]location.hash=' anchor1';[/CODE][HTML]<a name="anchor1"> </a>[/HTML]
                    ThankYou,It is working for me.

                    Comment

                    • hsriat
                      Recognized Expert Top Contributor
                      • Jan 2008
                      • 1653

                      #11
                      Originally posted by ksn2007
                      ThankYou,It is working for me.
                      Glad to know that.

                      Do post for any other problem in future.. :)

                      Comment

                      Working...