By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,829 Members | 2,308 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,829 IT Pros & Developers. It's quick & easy.

How To display a page from middle

P: 13
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
Feb 27 '08 #1
Share this Question
Share on Google+
10 Replies


Markus
Expert 5K+
P: 6,050
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?
Expand|Select|Wrap|Line Numbers
  1. <div style="margin-top: 300px;">
  2. content
  3. </div>
  4.  
Feb 27 '08 #2

P: 13
Page to be displayed from the middle rather than the top?

Surely that's a html problem?
Expand|Select|Wrap|Line Numbers
  1. <div style="margin-top: 300px;">
  2. content
  3. </div>
  4.  
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.
Feb 27 '08 #3

Markus
Expert 5K+
P: 6,050
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.
Feb 27 '08 #4

harshmaul
Expert 100+
P: 490
links, or images would be good. also some code will help
Feb 27 '08 #5

P: 13
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.
Feb 27 '08 #6

hsriat
Expert 100+
P: 1,654
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 flagIfAlreadyLoaded to know whether AJAX had already called that page or not.
If (flagIfAlreadyLoaded==1), don't reload the page but move it to the corresponding anchor only.
But if (flagIfAlreadyLoaded==0), load the page through AJAX and move it to the corresponding anchor and set flagIfAlreadyLoaded=1 so that it won't reload the page through AJAX again.
Feb 27 '08 #7

P: 13
For all the three links, which point to same page, use var flagIfAlreadyLoaded to know whether AJAX had already called that page or not.
If (flagIfAlreadyLoaded==1), don't reload the page but move it to the corresponding anchor only.
But if (flagIfAlreadyLoaded==0), load the page through AJAX and move it to the corresponding anchor and set flagIfAlreadyLoaded=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
Feb 27 '08 #8

hsriat
Expert 100+
P: 1,654
Thanks for the help can you tell me how to move it to corresponding anchor
Expand|Select|Wrap|Line Numbers
  1. location.hash='anchor1';
[HTML]<a name="anchor1"></a>[/HTML]
Feb 27 '08 #9

P: 13
Expand|Select|Wrap|Line Numbers
  1. location.hash='anchor1';
[HTML]<a name="anchor1"></a>[/HTML]
ThankYou,It is working for me.
Feb 28 '08 #10

hsriat
Expert 100+
P: 1,654
ThankYou,It is working for me.
Glad to know that.

Do post for any other problem in future.. :)
Feb 28 '08 #11

Post your reply

Sign in to post your reply or Sign up for a free account.