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

  • SEARCH
  • Home
  • 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 6229077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:30:04+00:00 2026-05-24T09:30:04+00:00

I am trying to rerun a block of javascript when the user clicks on

  • 0

I am trying to rerun a block of javascript when the user clicks on a button. The site was created in a CMS so I do not have access to the button to give it an id. However, in firebug I noticed it has these values ->

<input type="submit" value="Continue">

Is there anyway I can call to this by using the value of ‘Continue’?

FYI: the button is coded with php and I want to rerun the following

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<script type="text/javascript">
    $(window).load(function resizePole(){
    var ht=($('#LayoutColumn2').height() > $('#LayoutColumn3').height()) ?
    $('#LayoutColumn2').height() : $('#LayoutColumn3').height(); $('#lightPole').height(ht); }); </script>

and I am attempting to call this using:

onclick="return resizePole();"

Oh and I know next to nothing about javascript 🙂

Link to page working on – you may have to create a customer account. Enter some jibberish and I can delete it later

link to site

What the problem is: Ok let me explain what should be happening. I have created a div called ‘lightpole’ this div contains a background image of a lightpole that is coded with javascript to match the height of the ‘content’ div when the page loads. On the checkout_express page the creators of the CMS system have created expanding and collapsible divs that guide the user through the checkout process. On the third step ‘Shipping Method’ the user clicks on the ‘Continue’ button which expands the ‘Order Confirmation Step’. This div causes the ‘content’ div to be longer than on initial loading but the lightpole was only sized to match the inital height of the content, not the added height of the Order Confirmation Step so it causes the lightpole to be shorter than it actually needs to be.

  • 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-24T09:30:07+00:00Added an answer on May 24, 2026 at 9:30 am

    This will work.

    $('[type="submit"][value="Continue"]').click(function () {
    {
        return resizePole();
    });
    

    EDIT

    As pointed out in the comments, there is a more concise way to do this. I typically use the method above out of habit (makes it easier to add future logic to the click event).

    $('[type="submit"][value="Continue"]').click(resizePole);
    

    EDIT 2

    To answer the question in the comments – yes, you can filter by the div ID as well. This will attach to the click event of all submit buttons inside a div with an id of DivIdHere and a value of Continue.

    $('#DivIdHere [type="submit"][value="Continue"]').click(resizePole);
    

    EDIT 3

    This is a bit dirty, but after looking at your updated requirments, this should do the trick. Basically, it adds the click event to the last submit button on the page that has a value of continue (which appears to be the shipping section based on the link you provided).

    $('[type="submit"][value="Continue"]:last').click(resizePole);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to perform a single boolean NOT operation, it appears that under MS SQL
I am trying to have my app reload data when it is brought to
I'm new to writing Javascript, and here's what I'm doing/trying to do. When a
Trying to setup an SSH server on Windows Server 2003. What are some good
Trying to get my css / C# functions to look like this: body {
Trying to find some simple SQL Server PIVOT examples. Most of the examples that
Trying to make a make generic select control that I can dynamically add elements
Trying to keep all the presentation stuff in the xhtml on this project and
Trying to make a MySQL-based application support MS SQL, I ran into the following
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation

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.