[eluser]DynamiteN[/eluser]
Okey now i am getting somewhere...
i just altered for the models to pick up 'news_id' instead of id so i didnt get errors there
i went going on tihis jquery,
Code:
jQuery(document).ready(function($){
$("#message").hide();
// $.AJAX Example Request
$('#news_form').submit(function(eve){
eve.preventDefault();
$.ajax({
type: "POST",
data: $(this).serialize(),
dateType: 'html',
url: "<?php echo site_url('admin/admin_news/UpdateNews/'.$newspost->news_id);?>",
success: function(response, status, request){
$("#message").append(response).addClass("ui-corner-all ui-state-highlight").fadeIn("slow");
},
error: function(){
$("#message").html("Update Error!").addClass("ui-corner-all ui-state-error").fadeIn("slow");
}
});
});
});
And now it does work.. sort of..
if i post the data now with the fields all filled in correct it then shows up "news updated"
and if i would leave lets say author field empty, it then show that validation error above the form, jsut as i want it to ...
--
NOW the problem
if i would to lets say press two times when the author field i empty it shows the validation error, BUT it show it two times,
same goes if i would to actually update the news correct, and then maybe see a typo in the news or something, and fix it and press update again it then goes ahead adnd update it again, but it then repeats the line "news Updated" next to the first "News Updated" line
other wise it does work.
any idea how to fix that repeat issue, also i would like to have something like that busy function to show when i press before any success or fail message comes up , just so that it shows it's doing something , if u know what i mean
thanks alot for this help, would still have been stuck if you wouldnt have helped me