Does anybody sees a fault in this?
both codes are in the same file. It seems it doesnt gets in the javascript/ajax script because the alert doesnt work but i cant figure out why?
<form method="post" enctype="text/plain">
<textarea name="update_press" id="update_press"></textarea>
<input type="submit" name="press_button" class="press_button" id="press_button" value="Submit">
</form>
<SCRIPT>
$(".press_button").click(function()
{
var updateval = $("#update_press").val();
var dataString = 'update_press='+ updateval;
if($.trim(updateval).length==0)
{
alert("Please write a text");
}
else
{
$("#flash").show();
$("#flash").fadeIn(400).html('Loading Update...');
$.ajax(
{
type: "POST",
url: "text_ajax.php",
data: dataString,
cache: false,
success: function(html)
{
$("#update_press").val('').focus().css("height", "40px");
}
});
}
return false;
});
</SCRIPT>