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 8340659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:14:27+00:00 2026-06-09T05:14:27+00:00

I have a function that calculate price for a product. I’m not JavaScript developer

  • 0

I have a function that calculate price for a product. I’m not JavaScript developer so my knowledge is very limited.

By changing the value in the text field script calculate price for product.

 <input type="text" value="" name="options[22]" class="input-text"
 onfocus="opConfig.reloadPrice()">

Problem is that the script triggers only if the following is done:

  1. insert value into the textfield
  2. click somewhere outside the textfield
  3. click back into the text field

All I need is a button saying refresh that by clicking it will have functionality of step 2 and step above.

I’m not sure if I explained it properly so if there is any more information required to resolve this issue please let me know.

Here is the link to the site.

http://www.floorstodoors.mldemo.co.uk/spotlight/oak-value-lacquered-3-strip.html

The field im trying to amend/add refresh button is Enter Square Metre

  • 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-06-09T05:14:29+00:00Added an answer on June 9, 2026 at 5:14 am

    I’m not sure I fully understand you, but is this what you need?

    <input type="text" value="" name="options[22]" class="input-text">
    <input type="button" onclick="opConfig.reloadPrice()" value="Refresh" />
    

    A button with an click-event listener, so that when you click the refresh-button the opConfig.reloadPrice() method gets executed.

    Edit based on comment:

    I’m not sure what JavaScript library you are using, but you have these two lines in you code that seems to add event-listeners to the input with id qty.

    $('qty').observe('focus',function(){
        $('qty').setValue($('qty').getValue().replace(/[^0-9]/g,''));
    });     
    $('qty').observe('focus',this.getFromQties.bind(this))
    

    They are listening for the focus event, thus only triggers when your input field gains focus.

    If you modify those to listen for the keyup event instead, I believe it will work better. Without being familiar with the framework, I guess the only thing to change would be this:

    $('qty').observe('keyup',function(){
        $('qty').setValue($('qty').getValue().replace(/[^0-9]/g,''));
    });     
    $('qty').observe('keyup',this.getFromQties.bind(this))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have DataBase function that calculate distance by coordinates CREATE OR REPLACE FUNCTION distance(lat1
I have a function that is supposed to calculate the number of times a
I have some javascript that calculates a price and updates a div. However in
I have a function that print calculate the loading time of each page: function
I have a function (mergeall) that returns a float list. I want to calculate
I have to calculate the return of a vector that gives a historical price
I have a function that I use to look up a value based on
I have a non ode function that calculates based on the previous time step
Inside my Controller i have function that runs after user clicks on item, which
So I have function that formats a date to coerce to given enum DateType{CURRENT,

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.