0

I like to set trigger on Jquery based framework.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <title>Trigger scroll</title>
    <script type="text/javascript" src="jquery.js"></script>
</head>

<body>
We have found an error on your page with form. Please modify this input field.<a id="scroll" href="javascript:void(0);">Please go go to the last error</a>
</body>

</html>

If there is an error it will scroll to this error. I'm using validation like:
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Should I use ScrollTo like URL:
http://flesler.blogspot.com/2007/10/jqueryscrollto.html
or this is not needed as error is my trigger position.
How to set also link to this error with scroll?
Need help.

Edited by toplisek: n/a

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by stbuchok
0

Someone can correct me if I'm wrong, but if you set focus to the field that has a validation error, I believe the page will automatically scroll it into view. So you might just need to set focus to the control.

0

Someone can correct me if I'm wrong, but if you set focus to the field that has a validation error, I believe the page will automatically scroll it into view. So you might just need to set focus to the control.

Can you post please example on my case sample.Thanks.

0

I'm sorry but I don't have time to write this for you. Just look up how to use the focus() method and try it out to see if it works. If you get suck at a specific part, post the code and where you are stuck and we will help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.