|
Title: panel('options').href behaviour Post by: mzeddd on April 29, 2015, 05:35:59 AM Hi,
I use the following function to load content into my panel Code: function doSearch(){It works very well. But if I have the following line in reply from web server ('data') then I see that 'Search.php' is called twice. One via POST and one via GET. Code: <script>$("#results").panel('options').href='Search.php';</script>I need "$("#results").panel('options').href='Search.php';" just to update 'href' and use it later. But in case if I return it in reply it works as if I call 'refresh'. Why it is happening? Why refresh for the panel is called? Title: Re: panel('options').href behaviour Post by: stworthy on April 29, 2015, 07:36:09 AM When you call this statement:
$("#results").panel({content:data}); The panel will be created. If the 'href' property value exists, the panel content will be loaded via 'href'. To prevent from loading content from remote server, please remove this 'href' value. If you want to update the content from remove server, please call 'refresh' method instead. $('#results').panel('refresh', 'Search.php'); If you only want to update the content with a given 'data', please try the jQuery's native 'html' method: $('#results').html(data); |