PDA

View Full Version : [Solved]problem with panel autoLoad called twice



junkzilla
20 Feb 2009, 5:58 AM
Hi people,

I have a panel where photos are displayed executing an autoLoad action. The problem is that the action is called twice. The first time is called with POST and the second one with GET. In the second call, the values of the parameters (id and editable) are lost. Why does it happen?

How do I do to run this action just once?



<div id="photoSlide"></div>

<script type="text/javascript">
Ext.onReady(function () {

var slide_panel = new Ext.Panel({
id: 'slide_panel'

,autoLoad: {
url: '/photos/slideshow.php'
,method: 'POST'
,timeout: 5
,scripts: true
,text: 'Loading...'

,params: {
id : id
,editable : true
}
}
});

slide_panel.render('photoSlide');
});
</script>


In the first call, everything works well:

POST /photos/slideshow.php HTTP/1.1
id=1212&editable=true

I don't know why this action is called another time with GET method and without parameters.

GET /photos/slideshow.php HTTP/1.1


Regards,

20 Feb 2009, 7:35 AM
What version of Ext are you using?

junkzilla
20 Feb 2009, 9:44 AM
What version of Ext are you using?

2.1

tryanDLS
20 Feb 2009, 10:04 AM
Please verify with 2.2.1

junkzilla
20 Feb 2009, 10:48 AM
Please verify with 2.2.1

I've tested it with this version, but I have the same problem.

20 Feb 2009, 10:51 AM
What browser, version and os please

tryanDLS
20 Feb 2009, 10:52 AM
What is the script content of the page you're loading?

20 Feb 2009, 10:53 AM
FYI, cannot reproduce on Fx 3.0.6 on OS X.

junkzilla
20 Feb 2009, 10:57 AM
What browser, version and os please

Firefox 3.01, Open Suse 11.0

junkzilla
20 Feb 2009, 11:01 AM
What is the script content of the page you're loading?

The result of the php script is a simple html with images.

<div>
<img src="..." alt="..." />
...
</div>

tryanDLS
20 Feb 2009, 1:14 PM
Why do you have scripts:true in you config?

junkzilla
24 Feb 2009, 4:55 AM
I haven't been able to fix this problem, but thank you anyway.

Cheers,

junkzilla
24 Feb 2009, 4:58 AM
Why do you have scripts:true in you config?

Because the page that is loaded has some scripts. I've commented these scripts, but it works in the same way.

Cheers,

junkzilla
24 Feb 2009, 12:46 PM
I found the problem. There's something in firebug that executes the AJAX request twice. I don't know what option is, but I disabled firebug and everything worked well.

Thank you for you time.

Cheers,

tryanDLS
24 Feb 2009, 12:56 PM
Check your firebug version - this was an issue in prior versions - you should try upgrading to the latest 1.3.3 version.

junkzilla
25 Feb 2009, 6:54 AM
Check your firebug version - this was an issue in prior versions - you should try upgrading to the latest 1.3.3 version.

You're right, I've updated firebug from 1.3.2 to 1.3.3 and it worked well.
Thank you.