Hi,
I have a problem that I can't solve. I am loading data into a form using Ajax that calls a feed. I need this because the form has a drop-down list that loads the feed based on the selection in the drop-down list. What I developed worked perfect when logged in as host but when logged in as a regular user the Ajax call is made and the data is loaded but the user is logged out.
I have been troubleshooting the problem by removing everything but what is needed to make the form call the feed via Ajax. I cannot seem to figure out what is happening:
I am using DNN 7.3.2 and XMP 4.6.5
Here is the feed code:
<xmod:Feed ContentType="text/html">
<ListDataSource
CommandText= "SELECT id, ListType, Title, LinkUrl, ImageFilePath
FROM Rsa_WebsiteList_Std WHERE id = @id"
ConnectionString="server=(local);database=RscentralNew;uid=RscentralNew;pwd=dcokx3UsgY;" >
<Parameter name="id" value='[[Url:id]]' datatype="Int32" defaultvalue="-1" />
</ListDataSource>
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<label for="stdTitle">Title:</label>
<div id="stdTitle" style="width:400px;">[[Title]]</div>
<br />
<label for="stdTitle">Link Url:</label>
<div id="stdTitle" style="width:400px;">[[LinkUrl]]</div>
<br />
<label for="stdImage">Image That Will Be Displayed:</label>
<IMG id="stdImage" SRC="[[ImageFilePath]]" ALT="[[Title]]" >
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</xmod:Feed>
Here is the test form code:
<EditForm ClientName="RSA">
<SelectCommand CommandText="SELECT -1 as dummy" >
</SelectCommand>
<div id="stdItemDisplay"> </div>
<jQueryReady>
var id = 10;
$.ajax( {
url: '/DesktopModules/XModPro/Feed.aspx',
type: 'GET',
dataType: 'html',
data: {
"xfd" : 'SelectedStdListImage',
"pid" : 8,
"id" : id
},
success: function(data) {
$('#stdItemDisplay').html(data).show();
}
});
</jQueryReady>
</EditForm>
I have this loaded on a page that requires the user to be logged in to access the form. To recreate the problem I log in as a regular user and go to the test page. Everything appears to work correctly. But if I reload the page or refresh the page I am sent to the login because the user was logged out. I log back in and I end up on the form again with everything loaded correctly. If I reload or refresh the page I go through that cycle again.
Does anyone have any idea of what is causing this?
Thanks
Rut