Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Click to call – function

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #166236
    Santu
    Participant

    Hello

    I want to create a “Click to call” function in my html page. Please help how I can create this.

    Thanks

    #166246
    Chromawoods
    Participant

    If you’re using jQuery:
    https://api.jquery.com/on/

    For example:

    $('#my-element').on('click', myFunction);
    

    If you want to use straight up JavaScript:
    https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.addEventListener

    Plenty of examples there. For plain JS, your code might need to look different depending on what browsers you need to support.

    #166292
    nkrisc
    Participant

    Maybe I’m crazy but I don’t think they’re asking how to call a function on click, but a “click-to-call” capability similar to LivePerson http://www.liveperson.com/liveengage/engagement/voice

    If that is the case, it’s not something you’re probably going to build yourself, but instead find a service that can provide that capability for you.

    #166293
    Chromawoods
    Participant

    Wow. Yeah that might be it. Totally different story. Can’t help you there. :)

    #166295
    nkrisc
    Participant

    What about putting your number down as @shaneisme suggested or just creating a simple contact form that allows your users to submit their phone number which is then emailed to you to follow up on?

    #166382
    BionicClick
    Participant

    ok, so google voice actually offers a neat plugin to do this for you.

    you can see an example here: http://goo.gl/8RXtUY

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.