Thread: Posting
View Single Post
Old 11-18-2012, 12:49 AM   PM User | #1
searls03
New Coder

 
Join Date: Jun 2011
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
searls03 is an unknown quantity at this point
Posting

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.

Last edited by searls03; 11-18-2012 at 12:49 AM.. Reason: code typo
searls03 is offline   Reply With Quote