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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:36:30+00:00 2026-06-16T02:36:30+00:00

Hi all thanks for taking a look. I am trying to call a javascript

  • 0

Hi all thanks for taking a look.

I am trying to call a javascript function when I click on the update button.

Here is the javascript

var text2Array = function() {
// takes the value from the text area and loads it to the array variable.

alert("test");

}

and the html

<button id="update" onclick="text2Array()">Update</button>

if you would like to see all the code check out this jsfiddle
http://jsfiddle.net/runningman24/wAPNU/24/

I have tried to make the function global, no luck, I can get the alert to work from the html, but for some reason it won’t call the function???

  • 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-16T02:36:31+00:00Added an answer on June 16, 2026 at 2:36 am

    In your fiddle, in the drop-down in the top left, change “onLoad” to “no wrap (head)”
    Then change

    var text2Array = function()
    var pswdBld() = function()
    

    to

    function text2Array()
    function pswdBld()
    

    and it will alert as expected.

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

Sidebar

Related Questions

First of all thanks for taking the time to look into this. I store
first of all thanks for taking the time to look at my problem, I
and thanks for taking the time to look over my issue. I am trying
Thanks for taking a look: Here is the php I'm using to insert the
first of all thanks for taking your time! I'm a junior Dev, working with
Sorry for the long explanation. Thanks in advance to all who are taking their
For starters I'm brand new to ExtJS Thanks for taking a moment to look
and thanks for taking a look at the question. The background I have several
Thanks for taking the time to look at another of my questions. This seems
Thanks for taking a look at this. I’ve been looking and looking for 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.