Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 676993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:59:24+00:00 2026-05-14T00:59:24+00:00

I am working on a web application, whose mock-up page can now be found

  • 0

I am working on a web application, whose mock-up page can now be found at: our server

If you click on the blue title “step1” and then choose the option of “delivery to address”, a form will show up using jQuery ajax load. No problem for this. Click on the “venue” radio button will take you to another form, no problem for this as well.

If you scroll down a bit, you can see a textarea, top of that you can see a link called “what’s this?”. Click on it and the textarea shall be filled with sample words.

The problem is, after clicking on the link, the webpage automatically scrolls to the top section. What I want is to keep the textarea to the center of screen after link is clicked.

I am trying to use a jQuery plugin called “scrollTo”, which can be found here

From its demo page I can tell is what I want. And here is my code to try using it:

function reloadDeliveryForm()
{
$('#deliveryForm').load('./ajax/deliveryToVenueForm.html', 
           function(response,     status, xhr) 
{
    if (status == "error") 
    {
        $.prompt("Sorry but there was an error, please try again.<br />" +
                 "If same error persists, please report to webmaster.");
    }
    else    //deliveryForm loaded successfully
    {
        validateDeliveryForm();
        $("#delivery_special").elastic();
        $('#special_conditions_tip').click(function()
        {
            console.log("start filling");
            fillTextareaWithExample();
            console.log("end filling");
            $.scrollTo('#delivery_special');
            console.log("end scrolling");
        });
    }
});

}

From Firebug output I can tell the scrollTo function is called, but doesn’t work. I’ve switched jQuery back to version 1.3.2, which is used on the demo page of the plugin, but that wouldn’t help, either.

Is there a problem with my coding? Which technique would you use to resolve this problem?

Any suggestion is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:59:24+00:00Added an answer on May 14, 2026 at 12:59 am

    Approx. line 112 of your custom.js, change this

    $('#special_conditions_tip').click(function()
    {
        console.log("start filling");
        fillTextareaWithExample();
        console.log("end filling");
        $.scrollTo('#delivery_special');
        console.log("end scrolling");
    }); 
    

    to this

    $('#special_conditions_tip').click(function(event)
    {
        event.preventDefault();
        console.log("start filling");
        fillTextareaWithExample();
        console.log("end filling");
        $.scrollTo('#delivery_special');
        console.log("end scrolling");
    }); 
    

    .preventDefault() prevents the browsers action from taking place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 343k
  • Answers 343k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can do it like this: var valToSelect = "1";… May 14, 2026 at 5:31 am
  • Editorial Team
    Editorial Team added an answer Some guy posted some sample code on wordpress forums which… May 14, 2026 at 5:31 am
  • Editorial Team
    Editorial Team added an answer I believe Doctrine uses its own serialisation format, which is… May 14, 2026 at 5:31 am

Related Questions

I am working on a web application (ASP.NET) game that would consist of a
I have a web application that I am working on(ASP.NET 2.0 C#). In it
I've been working on a silverlight application which generates various graphs. It requires a
I'm writing a reasonably complex web application. The Python backend runs an algorithm whose
I'm currently working with a part of my application that uses Dynamic Web User

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.