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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:11:04+00:00 2026-06-13T23:11:04+00:00

Here is my requirement, I have an array having datewise data like $.each(dateWiseArr, function(index,

  • 0

Here is my requirement, I have an array having datewise data like

$.each(dateWiseArr, function(index, currentDate){
    myDateArray[currentDate] = "myData";
    dateWiseOtherId[currentDate] = "otherId";
});
alert(myDateArray+"::"+dateWiseOtherId);//working fine and showing right data
$("#myBtn").attr("onClick", "myPassingFunction("+myDateArray+", "+dateWiseOtherId+")");

function myPassingFunction(myDateArray, dateWiseOtherId){
    alert(myDateArray[0]);//throw undefined
}

Now when I am press my button function call successfully but variables becomes string.

Let me know if you need more understanding.

Note: myDate

  • 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-13T23:11:05+00:00Added an answer on June 13, 2026 at 11:11 pm

    Bind a function instead of binding a string, then you don’t need to convert the values to strings:

    $("#myBtn").click(function(){
      myPassingFunction(myDateArray, dateWiseOtherId);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have requirement like i will dynamically get a set of divs having random
Here is simplified version of my requirement I have a java class say Processor
Insertion-sort works also on unordered array, like the example here shows. This statement in
in my project i have a requirement like Set the version to something like
Here is my code, //I have set formData array to session array here $_SESSION['form_data']
Here is the requirement. I have a string with multiple entries of a particular
I have this requirement that states that I must have a function signature as
I have a requirement to create XML that looks like this: <record id=100000000000000000 type=Message>
Here are my requirements: I have a DIV which should display an image (JPEG).
Here I have 2 requirements: Need a batch file to start a process on

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.