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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:57:33+00:00 2026-06-04T04:57:33+00:00

I’m having issues with jquery’s $.post function, and (what I think) the cross-domain security

  • 0

I’m having issues with jquery’s $.post function, and (what I think) the cross-domain security thing.

The weird part is that the page I’m trying to post to, is in the same directory as the page that sends the post.

This is the javascript code of ‘latest.php’, the file that makes the post request:

$.post("upload.php", { base64: fCanvas, description: description }, function(data){
             // some things happen here
        });

upload.php is a php script that uploads the content of the base64 variable to Tumblr.

The javascript console shows a 403 Forbidden error. I tried chmodding -777 ‘upload.php’, but that didn’t change anything.

Using $.get instead of $.post works, but is undesired due to security reasons, and the length limit of $get data (I’m sending a base64 encoded image).


EDIT: I changed one of the $.get requests on ‘latest.php’ to a $.post one, and it’s working…

$.post("base64.php", { url: t_url },
               function(data){
                 data = "data:image/gif;base64,"+data;
                 draw(data);
               });

So, I’m completely clueless of what’s going wrong.

  • 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-04T04:57:35+00:00Added an answer on June 4, 2026 at 4:57 am

    Well. I got it working.

    I tried sending a smaller (still base64-encoded) image to my upload.php script, and it did the job. It appears that jQuery’s post function can’t handle large (thats relative, it’s just a 640×453 image) amounts of data.

    I solved the problem by using a XMLHttpRequest() instead. It works like a charm.

    If anybody knows the exact problem with jQuery’s Ajax, please let me know, because I still don’t know exactly why my data caused a HTTP Forbidden error.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the

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.