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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:18:54+00:00 2026-06-02T00:18:54+00:00

I have a multipage design with jquery mobile. On the first site i call

  • 0

I have a multipage design with jquery mobile. On the first site i call a function with onklick() to fill a global array with values. Now i want to display this values on the second site, but i can’t manage to display them with document.write(array)

  • 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-02T00:18:56+00:00Added an answer on June 2, 2026 at 12:18 am

    To append data to the DOM you first need to select an element to append it to, then in your case iterate through the array, adding each index’s value to the DOM:

    //here is the array of values
    var myArr = [...];
    
    //wait for out page to initialize
    $(document).delegate('#my-page-id', 'pageinit', function () {
    
        //create an array to buffer the output
        var output = [];
    
        //use a fast loop to add the value at each index to an array,
        //in this case I'm adding some HTMl markup to it as well
        for (var i = 0, len = myArr.length; i < len; i++) {
            output.push('<li>' + myArr[i] + '</li>');
        }
    
        //check to see if there were any indexes in the array
        if (output.length) {
    
            //append a list-view widget with the info from myArr to the content section of the current page
            $(this).children('.ui-content').append('<ul data-role="listview">' + output.join('') + '</ul>').trigger('create');
        }
    });
    

    Documentation for document.write: https://developer.mozilla.org/en/document.write

    Here is a JSPerf to show the performance difference between some loops: http://jsperf.com/jquery-each-vs-for-loops/2

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

Sidebar

Related Questions

As an Actionscript programmer shifting to JS/jQuery I often have to author multipage apps
Is it a good design to have multiple masterpages in an application. I am
I have an element that can have multiple types (not my design). The element
I have to design a database which will allow me store data in multiple
I have a multipage reporting services report, and i would like to start from
I want to implement a design in Java where I have multiple event sources
I am new to design patterns and I have a scenario here. I am
I have a question that is more in the realm of design, than implementation.
I am working on a Class Registration database design. Courses have multiple sections. Each
I have a design question. I have a nested repeater structure that is 4

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.