Jump to content

Automatic Post


-twenty

Recommended Posts

First, it depends on how you want to do it, the easy way (JS framework) or hard way (built-in javascript functions).  I don't know if you have experience with JS, but you need to make javascript send a POST or GET request to a page with the content using the format "/url?post=[...]" which you would process like any other form using PHP.

 

From briefly searching google for "PHP AJAX tutoria"l, I found this.  It covers sending the request without using a framework.  If you're going to use a framework I suggest either MooTools or jQuery.  I prefer Mootools mostly because it's geared more toward programmers and I find the native extensions very useful.

 

Edit:

To post when the character count is a set amount, you simple do this (using Mootools):

var ta = $('myTextarea');
ta.addEvent('keyup', function() {
     var length = ta.get('value').length;
     if(length >= 10) {
         var value = length.substr(0, 10);
         // Send POST request
     }
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.