Вернуться в каталог >>>
  Ссылки поиска и показа блока или слова с выделением, затем возврат к заданному месту
Можно найти и выделить картинку или любой другой элемент на страничке с возвратом к ссылке поиска When you have a large amount of text on your page so that your reader has to scroll down the page and you explain something at the top of the page that is refering to something further down the page (out of view), sometimes it would be better if you could actually point out what you are referencing.

Example 1:

I want to make sure you read the 3rd можно найти и выделить параграф с возвратом к ссылке поиска that I am referring to now, but which you cannot see because it is lower down the page
So ... I create a keyword by emphasising the word paragraph, in bold, and make it a link.

When you click the link the page scrolls down to bring the paragraph into view, the background of the paragraph flashes, and the page scrolls back up.

Example 2:

I want to point out a specific можно найти и выделить слово с возвратом к ссылке поиска in that paragraph


Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text

Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy This Word! Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text
Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text Dummy Text

Сама ссылка может быть словом (с возвратом)


To create a keyword place it in a link, and give the link a unique ID, include the onclick event which will pass the relevant arguments to function whichway('caller_ID','target_ID','direction','colour'). caller1" href="#null" onclick="whichway('caller1','target1','down','gold')">Keyword

The target is simply:
Highlighted Text

Each separate caller and individual target must have its own unique identity, but you can call the same target with more than one caller.

IE:
Caller1 - Target1, Caller2 - Target1

2 слова 1 с возвратом к этой-же ссылке and

Note:
In order to test the script yourself, once you have copied the above into your page you need to make your page long enough to scroll. To do this add about 20 line breaks
between caller1, target1, and caller2.

The script ended up longer than anticipated because I had to include some preventative measures to stop the browser locking up.
This happened because I am using the while statement, and through experimental mishaps (positioning the caller and/or target at the extreme top or bottom of the page) I found that if the scroll went over the upper and lower limits of the page the while loop would not terminate, hence a lockup.
Function Init and two if statements in each function prevent this from happening.

If you use this script and should have the misfortune to experience a lockup just increase the variable Top_Limit value. --> Можно несколькими ссылками искать одно и тоже, выделяя разного цвета подсветкой, и делать возврат к другой ссылке(2 слова 2)

In order to test the script yourself, once you have copied the above into your page you need to make your page long enough to scroll. To do this add about 20 line breaks
between caller1, target1, and caller2.

The script ended up longer than anticipated because I had to include some preventative measures to stop the browser locking up.
This happened because I am using the while statement, and through experimental mishaps (positioning the caller and/or target at the extreme top or bottom of the page) I found that if the scroll went over the upper and lower limits of the page the while loop would not terminate, hence a lockup.
Function Init and two if statements in each function prevent this from happening.

If you use this script and should have the misfortune to experience a lockup just increase the variable Top_Limit value

Скопируйте и вставте
Внутри тега <HEAD> - </HEAD>
Всё подписано, проблем быть не должно.
В сам тег <BODY> вставляем атрибут
onload="hlite_Init()"
Запускаем функцию hlite_Init() после полной загрузки странички
Внутри тега <BODY> - </BODY> там где у Вас будет текст.
Это пример. Впринципе все параметры функции whichway('caller9','target9','down','gold') подписаны. Если Вы внимательно разберёте пример Вы всё поймёте. Здесь всё достаточно просто. Колличество ссылок-поиска и элементов-поиска на страничке на Ваше усмотрение. Впринципе можно производить поиск любых нужных Вам элементо расположенных на страничке. Скрипт может быть полезен в статьях, описаниях и т.д.
И Вы будите использовать скрипт прямо из моей библиотеки не загружая его к себе на страницу.
Вы экономите место и время.

Если Вы хотите иметь скрипт, чтобы изменять и другие его параметры, воспользуйтесь функцией [Скачать с сервера].
Если Вы не видите этой функции в []- следовательно Вы не зарегистрированы на сайте.Вам надо зарегистрироваться и войти как Пользователь.