vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   scrolling when page loads (https://vborg.vbsupport.ru/showthread.php?t=159592)

Kiint 10-06-2007 08:43 AM

scrolling when page loads
 
on my current project I've been playing with a bit of code which scrolls users to part they are editing, for instance if you have a list of tasks and you edit one, then save...when the page reloads it will take you to the one you just edited.

I've been using the javascript code from here http://dotnetjunkies.com/HowTo/56233...0CA019FDD.dcik

But realise that there is a method which Vbulletin uses to scroll you back to the message you just posted in reply to someone.

The above method works but could someone please point me to some instructions on how to do this with vbulletin as i'd rather use a function that's built in than use one from somewhere else.

Opserty 10-06-2007 03:11 PM

I think vBulletin just uses standard anchor HTML tags with the name attribute. Then it just loads the page with a pound symbol ('#') followed by value of the name attribute.

E.g.
HTML Code:

<a name="post1353983"></a>
(For your post).

Then in the URL it would be something like:
Code:

https://vborg.vbsupport.ru/showthread.php?t=159592#post1353983


All times are GMT. The time now is 10:53 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01088 seconds
  • Memory Usage 1,712KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete