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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:19:47+00:00 2026-06-15T00:19:47+00:00

I use a function on my website, count($opt, $amount), a PHP function and it

  • 0

I use a function on my website, count($opt, $amount), a PHP function and it returns integer value, Ex. 20.

I’ve various products, I use this function to count available stock. Ex. A handicraft (sku-101), price $51. count(‘sku-101’, 51) will return the actual available stock for the item.

I do use this function many times in my website. I want to keep a button for user which can retrieve output without refreshing the whole page.

I searched and got too many results but each of those were “to post data in a specific URL and retrieve response”. But in my case I need to run count($opt, $amount) on a button click, without posting data and get response.

jQuery/Ajax which can help me to get that? I need your guideline.

  • 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-15T00:19:49+00:00Added an answer on June 15, 2026 at 12:19 am

    Your “count” function seems to be a server side function (if I understand correctly your question). So this mean that the work is done by the server. PHP and C# are server side languages (and many other). So you don’t have the choice to call an URL if you want to call this function! Still, there are different ways to call this whithout realoading the page : Ajax, iFrame, UpdatePanel, etc.

    If you absolutly don’t want to call an URL, you need to use a client side language, like Javascript.

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

Sidebar

Related Questions

I use the setInterval function in a website, and it works fine in IE,
I am trying to use GoogleMap in my website : function InsertMap() { var
I use this function for transforming URLs to images on output. function InsertLink(T){ var
I use DATEDIFF function to filter records added this week only: DATEDIFF(week, DateCreated, GETDATE())
why after several times click on buttons, is hang website? i use of function
I'm using HtmlAgilityPack. In this function the imageNodes in the foreach count is 0
So I'm trying to use this javascript with my asp.net website https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart I have
I use function below to check connection to WiFi hotspot point: public boolean IsWiFiConnected(){
How do I use function arguments declared like void f(double) { /**/ } if
I think it would be easier to use function pointers if I created a

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.