PDA

View Full Version : Multi-Part Content Script | Top Of Page Question



koobos
04-01-2006, 06:38 PM
Hello,

Thank you for this great site! I am using the Free Multi-Part Content script on a page where information is gathered via a very long form. I have set this script up and it works very nice. Because I am using this with a form, I've moved the 'next' & 'back' buttons to the bottom. This has created an issue where after one page is filled out and 'next' is clicked it takes them to the bottom of page two. I would like it to go to the top of page two.

Does anyone know how to achieve this? I have added the url to the page of the script that I am talking about below.

Thanks in advance for any help!


http://www.dynamicdrive.com/dynamicindex17/multipartcontent.htm

jscheuer1
04-02-2006, 04:00 AM
Because I am using this with a form, I've moved the 'next' & 'back' buttons to the bottom.

The next and back buttons were already on the bottom.

koobos
04-02-2006, 04:57 AM
Oh, OK. I had forgotton. Do you know how to make it scroll to the top?

koobos
04-02-2006, 04:58 AM
Sorry for the extra post.......


Like #top

jscheuer1
04-02-2006, 05:08 AM
Well, I am still not clear what you are after, if you want the forward control to, as well as move the contents forward, also scroll the page, you can use the window.scrollTo(x, y) method:


<div id="formnavigation" style="width:200px; display:none">
<a id="backbutton" href="javascript:cycleback()" style="float:left">Back</a>
<a id="forwardbutton" href="javascript:cycleforward()" onclick="window.scrollTo(0, 0);return true;" style="float:right">Forward</a>
</div><br>

Or, with this type of setup you could also do:


<div id="formnavigation" style="width:200px; display:none">
<a id="backbutton" href="javascript:cycleback()" style="float:left">Back</a>
<a id="forwardbutton" href="#" onclick="cycleforward();return true;" style="float:right">Forward</a>
</div><br>

koobos
04-02-2006, 05:23 AM
John,

Thank you so much! You're second option is just what I was looking for.

Have a great weekend!

Scott