Yii Framework Forum: Changing ajax parameters - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Changing ajax parameters Rate Topic: -----

#1 User is offline   SOIDev 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 30-April 12

Posted 26 June 2012 - 03:08 PM

I am modifying an existing Yii program using Eclipse on Apache 2.2. I have modified the code to change the parameters of an existing ajax call. I was using one integer field from my database table but now I need to use a different field.

Here's the code:
$url = array('dailyProgressByTrack', 'studentId'=> $student->id);
$url['curriculumTrackId'] = $curriculumTrack->id;
$url['CollectionProgressPreferencesForm[startDate]'] = $prefsForm->startDate;
$url['CollectionProgressPreferencesForm[stopDate]'] = $prefsForm->stopDate;
$tabcontent[$tabTitle] = array('ajax' => $url);

In the second line, I changed 'lessonTypeId' to 'curriculumTrackId'. That's the only change I made.

I'm getting the following error: "NetworkError: 400 CHttpException - .../studentProgress/dailyProgressByTrack?studentId=630&curriculumTrackId=2&CollectionProgressPreferencesForm%5BstartDate%5D=09%2F01%2F11&CollectionProgressPreferencesForm%5BstopDate%5D=07%2F01%2F12"

I'm new to Yii and PHP so I need help identifying the problem. Thanks.
0

#2 User is offline   yugene 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 410
  • Joined: 08-August 09
  • Location:Ukraine

Posted 27 June 2012 - 12:42 AM

So, code worked okay before this change and works okay if you revert change to other parameter?
Which arguments your studentProgress/dailyProgressByTrack method accepts?
0

#3 User is offline   SOIDev 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 30-April 12

Posted 27 June 2012 - 04:12 PM

Your comment got me to look at the action function. I'd missed converting the variable there. Thanks for the help.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users