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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:32:40+00:00 2026-06-11T05:32:40+00:00

i am making a product add page for e commerce and after the data

  • 0

i am making a product add page for e commerce and after the data is being submitted then a ajax call pass all the data to the query page and it stores the info to the database. but the problem is when a large amount of html data is being passed then it dosent pass anything in the description . suppose write a short paragraph in description area then it pass throught ajax easily . but whenever there is long paragraphs or lets a very large amount of html data. it fails . the code i am using is

function product()
{
var micategory=$('.micatg option:selected').val();
var misubcategory=$('.misubcatg option:selected').val();
var currency=$('.micurrency option:selected').val();
var looking_for=$('input:radio[name=lookingfor]:checked').val();
var title=$('.btitle').val();
var condition=$('input:radio[name=bcondition]:checked').val();
var buy_description=CKEDITOR.instances['textarea_description_add'].getData();

var buy_country=$('.bcountry option:selected').text();
var buy_city=$('.bcity').val();
var zipcode=$(".bzipcode").val();
var price=$(".bprice").val();
var video_link=$("#infolink").val();
var address=$(".baddress").val();
var loguser=$("#loginuser").val();
var product_id=$("#prod_id").val();
var dataString = 'category='+ micategory+'&subcategory='+misubcategory+'&currency='+currency+'&looking_for='+looking_for+'&title='+title+'&condition='+condition+'&country='+buy_country+'&city='+buy_city+'&zipcode='+zipcode+'&price='+price+'&video_link='+video_link+'&address='+address+'&loguser='+loguser+'&product_id='+product_id+'&description='+encodeURIComponent(buy_description);
alert(dataString);

$.ajax({
type: "GET",
url: "modules/buy&sell/add_prod.php",
data: dataString,
cache: false,
success: function(html){
alert(html);
alert("Your Product is Successfully Added");
window.location = "buy.php";
 }
 });
}

in this due to large amount of html i used encodeURIComponent reading somewhere in stack. but still no help with this. can anyone help me with this.

  • 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-11T05:32:42+00:00Added an answer on June 11, 2026 at 5:32 am

    Use POST instead of GET, Because of size limitation of GET.

    within ajax config object.

    So, it will look like:

    $.ajax({
        type: "POST",
        url: "modules/buy&sell/add_prod.php",
        data: dataString,
        cache: false,
        dataType: 'html', // add this if you only passed html, if have other value then remove it
        success: function(html) {
            alert(html);
            alert("Your Product is Successfully Added");
            window.location = "buy.php";
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This worked fine all last week, then i got a call from my client
i am making a simple site in php. I have a product page and
I am making a scraper which is scraping product price and i need to
Making an adobe flex ui in which data that is calculated must use proprietary
I'm making an administration page for a website. Currently, it allows a user to
I need to perform this query: SELECT * FROM (SELECT * FROM product WHERE
Consider a product where changes a client is making to a text file are
A client has asked me for major changes in a product I'm making for
I am making a project that sells product and I want to have a
I'm currently making a page with loads of products on, which need to be

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.