Hi - I've have an issue with PostBack of a page.
I have created a web application where the default page is in two sections (frames) - the top [banner] and the bottom [content].
There is a menu in my content section that navigates from page to page without links. By this I mean that when you are using the menu, you can go to "fresh" new pages within the content.
When you navigate from page to page from within the contents of the page (example: from the demographics page you can navigate to the activity page with the client id being the link) - OnLoad of each page, the Top [Banner] is reloaded. The Top [Banner] will then give you
client specific information....
If you navigate to a page FROM the menu, then the Top [Banner] gives you a generic Title and Picture.
My Javascript function that is called onload of each page is :
function init()
{
parent.frames['banner'].location.reload();
}
I have tried the following to avoid the Top reloading with every postback:
function init()
{
if (!IsPostBack)
{
}
parent.frames['banner'].location.reload();
}
However, when it goes through the process, it crashes with the following error:
Microsoft JScript runtime error: 'IsPostBack' is undefined
I don't understand why this occurs. Can someone please help me? Is there a way to call the javascript from VB script. Example:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Parent.Frame[Banner].Attributes("onload")= "javascript:init();"
I have tried this, however this does not work...Any ideas?
- Maria
I have created a web application where the default page is in two sections (frames) - the top [banner] and the bottom [content].
There is a menu in my content section that navigates from page to page without links. By this I mean that when you are using the menu, you can go to "fresh" new pages within the content.
When you navigate from page to page from within the contents of the page (example: from the demographics page you can navigate to the activity page with the client id being the link) - OnLoad of each page, the Top [Banner] is reloaded. The Top [Banner] will then give you
client specific information....
If you navigate to a page FROM the menu, then the Top [Banner] gives you a generic Title and Picture.
My Javascript function that is called onload of each page is :
function init()
{
parent.frames['banner'].location.reload();
}
I have tried the following to avoid the Top reloading with every postback:
function init()
{
if (!IsPostBack)
{
}
parent.frames['banner'].location.reload();
}
However, when it goes through the process, it crashes with the following error:
Microsoft JScript runtime error: 'IsPostBack' is undefined
I don't understand why this occurs. Can someone please help me? Is there a way to call the javascript from VB script. Example:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Parent.Frame[Banner].Attributes("onload")= "javascript:init();"
I have tried this, however this does not work...Any ideas?
- Maria