Jump to content

Recommended Posts

Basically what I am doing is making a sort of invitation system, the user clicks on users and they go into a list,  that all works, I can get the ids of them using each() but I need to pass it through Jquery Ajax to php to send it to the database for notifications. This is basically what I have:

 

$(".group-video-create").click(function(){
var url = $(".group-input-url").val();										
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
var checked_url = url.match(exp,"<a href='$1'>$1</a>"); 
if(checked_url)
{	
$("#group-input-names li").each(function(){	 //////This is the relevant code/////
var user_id = $(this).attr("id");			   ///////////////////Here too///
});	//////////////////& here

if(user_id)
{

$.ajax({
type: "POST",
//url: "",
//data: "", //this would be an array of all of the ids, (could be 1, could be 100).
cache: false,
success: function(html){
///Once all invitations have been sent to the database it would then load a new div and hide the previous one. 

	}


});
}
}
});

 

if you want to see what I'm trying to accomplish just go here:

 

http://www.kithell.com/#/video

 

usr: PhpFreak@yahoo.com

pass: phpfreaklogin

 

it's under Group Video. (You should be automatically directed there once logged in)

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.