Yii Framework Forum: Page Reloading Error - Yii Framework Forum

Jump to content

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

Page Reloading Error Page Reloading ... Rate Topic: -----

#1 User is offline   YearningForYii 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 21-September 12

Posted 15 March 2013 - 12:47 AM

On reloading the page after right click the value gets populated twice in the model .How to prevent this??
0

#2 User is offline   yiiplayboy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 56
  • Joined: 03-May 12

Posted 15 March 2013 - 02:40 AM

View PostYearningForYii, on 15 March 2013 - 12:47 AM, said:

On reloading the page after right click the value gets populated twice in the model .How to prevent this??


use redirect function to force a new call...then you will not face this issue...
0

#3 User is offline   YearningForYii 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 21-September 12

Posted 15 March 2013 - 03:11 AM

View Postyiiplayboy, on 15 March 2013 - 02:40 AM, said:

use redirect function to force a new call...then you will not face this issue...



The problem is I have to redirect to the same page.

Do we have to unset the attributes,once it has been posted??
0

#4 User is offline   yiiplayboy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 56
  • Joined: 03-May 12

Posted 15 March 2013 - 06:03 AM

View PostYearningForYii, on 15 March 2013 - 03:11 AM, said:

The problem is I have to redirect to the same page.

Do we have to unset the attributes,once it has been posted??


no you dont have to...
0

#5 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,601
  • Joined: 04-March 10
  • Location:UK

Posted 15 March 2013 - 06:17 AM

If you're redirecting to the same page, use $this->refresh() instead of $this->redirect() in the controller.
0

#6 User is offline   YearningForYii 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 21-September 12

Posted 15 March 2013 - 06:31 AM

View PostKeith, on 15 March 2013 - 06:17 AM, said:

If you're redirecting to the same page, use $this->refresh() instead of $this->redirect() in the controller.


I tried but of no help.Do,we have some other method?
0

#7 User is offline   YearningForYii 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 21-September 12

Posted 16 March 2013 - 12:36 AM

View PostYearningForYii, on 15 March 2013 - 06:31 AM, said:

I tried but of no help.Do,we have some other method?



Is it to do something with cookies or sessions??
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