Reputation: 13
I'm uploading a different files into one div,
and the div does not refresh' it stay all the time with the same content.
Here is my code:
ASPX
<div id="txtHazara"></div>
jQuery code:
if(user=="Manager")
$('#Div1').load('Manager.aspx');
else
$('#Div1').load('Secretary.aspx');
Any suggestion?
Upvotes: 0
Views: 61
Reputation: 7302
Try this:
First clear your div content
<div id="txtHazara"></div>
jQuery Script:
if (user == "Manager") {
$('#txtHazara').html('').load('Manager.aspx');
} else {
$('#txtHazara').html('').load('Secretary.aspx');
}
Upvotes: 0
Reputation: 20860
Id is : "txtHazara", So your code should be like this :
if(user=="Manager")
$('#txtHazara').load('Manager.aspx');
else
$('#txtHazara').load('Secretary.aspx');
Upvotes: 0
Reputation: 291
Your jquery code use wrong div id.
jquery code:
if(user=="Manager")
$('#txtHazara').load('Manager.aspx');
else
$('#txtHazara').load('Secretary.aspx');
Upvotes: 3