Jump to content
Larry Ullman's Book Forums

Julia

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Julia

  • Rank
    Newbie
  1. Thanks Edward for your suggestion. I have learnt something that I did not know even though it is not the solution to the problem. I sought the help of some people expert at PHP who found the solution to the problem. I had to modify the access rules of controller to give access to the required action that was being called in the URL parameter of Jquery $.post: array('allow', // allow authenticated user to perform 'dupecheck' actions 'actions'=>array('dupecheck'), 'users'=> array('authorised username'), That was a struggle!!
  2. You could be right though because I have been struggling with this code and can't get it to work According to my Jquery reference book, $.post is supposed to do that. Waiting for some help from this forum
  3. $.post initiates a POST request to the server...
  4. Hi, I am having difficulty to have an instant validation carried out immediately after input of a value in a view file. Here is the code (extract of the view file) that calls for the function (found in the controller file) View file: <?php Yii::app()->getClientScript()->registerScript('checkid2','$("#thisid").change(function() { alert("actiondupecheck"); $.post("index.php?r=roomtype/dupecheck", {thisid: $("#thisid").val()}, function(data) { $("#dupecheck").html(data); }); } );'); ?> Controller file: public function actionDupecheck() {
×
×
  • Create New...