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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:50:58+00:00 2026-05-27T07:50:58+00:00

I am about to write codes for presenting information, in some cases, I will

  • 0

I am about to write codes for presenting information, in some cases, I will get outputs as a list with a pager. I need your help about deciding between two:

  1. Passing values to client side with AJAX in JSON format and modifying HTML with DOM, maybe creating a hidden div and table somewhere and creating an instance of it, filling with values and inserting somewhere with innerHTML function. I have never tried this one, so please tell me about the drawbacks of this. This will make my View Class in javascript when leaving Model And Controller Class in PHP.
  2. Returning an HTML table with an AJAX request and inserting on page
    with innerHTML function (This seems to be the classical, safe
    solution)

  1. What are the drawbacks of handling formatting and view related
    operations in javascript?
  2. Is formatting in javascript easy?
  3. Will I be able to edit a template table for displaying values with
    javascript?
  4. SHould I create a div somewhere or should I build a table with
    string values in javascript?
  5. Do I have to use Innerhtml each time?
  6. Is it easy to build an html output using javascript code like we do
    in PHP? (like echo -table -tr -td -data)

for the people who automaticly ask for code, I am adding some, knowing that it is not actually necessary.

var ccomment= { 
            commentmin:10,
            commentmax:1000,
            view:function(commentid){}, //I am planning to present data with this
            viewbyopinionid:function(opinionid){},
            viewbyactorid:function(actorid){},
            insert:function(opinionid,comment){},
            remove:function(commentid){}
         }

I use PHP and JQuery; I am writing Object Oriented code in both.

  • 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-05-27T07:50:58+00:00Added an answer on May 27, 2026 at 7:50 am

    Php has a function json_encode which will convert an array to a json compatible string. I’d use that and set the return data type to json.

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

Sidebar

Related Questions

I see most http codes in php. I'm about to write some http calls
What are your thoughts about them? Sometimes I have to write unmanaged code at
I've been wondering about how hard it would be to write some Python code
I'm about to write a little GUI app that will sit in the system
Do you know some books, articles, blogs about how to write code to keep
I'm thinking about writing an automatic spam protection system (maybe I will write a
I'm about to write a Wrapper for a COM interop IStream so that code
Some time ago I wrote a little piece of code to ask about on
I am about to write an audio file converter for my side job at
I am about to write junit tests for a XML parsing Java class that

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.