English 中文(简体)
未能从PHP网页上的一个jax站检索数据
原标题:Failure to retrieve data from ajax-post on PHP page
  • 时间:2012-01-11 16:40:18
  •  标签:
  • php
  • jquery

I m trying to pass a collection of parameters to a PHP page to be processed, from a JavaScript function:

entries: "test data from JavaScript"

在我的PHP网页Im试图冲淡贴在网页上的价值:

$_POST[ entries ]

但是,不管我试图推动什么,这种情况仍然令人高兴。 住房价格指数新元,因此这可能是固定的 st。

This is invoked from a button click like such:

$("#submitButton").click(function(){});

是否应当采取形式,因为我看不到这一点的必要性?

Update [full code]

var proxy = new ServiceProxy("submit.php");

$("#submit").click(function () {
     var store = $("#store_name").val();
     var contact = $("#contact_person").val();

     proxy.invoke("", { entries: store }, success, error, false);
     return false;
});

Note on the ServiceProxy. This proxy class wraps the default $.ajax {...} into a neat little proxy class, thanks to Rick Strahl over at west-wind. I ve used this proxy class successfully in numerous single HTML and ASP.Net solutions in the past, so I don t it s the proxy service that s causing the issue.

最佳回答

想像你那样使用 j,为什么不使用其职务?

1 P-4, 1 P-3, 1 P-2, 1 FS, 1 GS, 1 GS, 1 GS, 1 GS, 1 GS, 1 GS, 1 GS, 2 NS, 1 UNV

之后,在您的《加拿大法典》中,你可以使用:

* E/CN.6/2009/1。

希望这一帮助。

职业介绍所,刚刚看到你的增订法典——这项工作应当:

$("#submit").click(function () {
 var store = $("#store_name").val();
 var contact = $("#contact_person").val();
 $.post("submit.php", { entries: store } );
 return false; });
问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签