Ok, when I use this code:
Code:
<script type="text/javascript" src="../jquery-1.8.2.js"></script><script type="text/javascript">
$('#responseForm1').submit(function(){$('input[type=submit]', this);});
function parseResponse () {
var code = $("#hiddenField2");
var n1 = $("#n1");
var url = "news_parse1.php";
$.post(url,{ code: code.val(), n1: n1.val()} , function(data) {
});
$.ajax({
type:"POST",
url:"news_load1.php",
data:"getNews=true",
success: function(r){
$("#newsContent").html(r)
var textbox = document.getElementById('code');
textbox.value ="";
},
error: function(){
alert($("#hiddenField2"));
$("#error").text($("#hiddenField2")).fadeIn(300)
}
})
}
</script>
</head><body><form action="javascript:parseResponse();" id="responseForm1">
<input type="hidden" name="hiddenField" id="hiddenField" value="" />
<input type="text" name="hiddenField2" id="hiddenField2" class="hiddenField2" value="123" />
<input type="hidden" name="hiddenField1" id="hiddenField1" value="" />
<input type="submit" name="submit" class="submit" value="" style="left: 0px; background-color:lightgreen; height:70px; width:100px;"> </form>
I get "[object Object]". I am not very good at javascript, seeing as that I can't seem to figure this out. can anyone help me figure this out? it is live at holidaypos.tk/test. thanks.