How to change the panel's URL in client-side.
Q:
I have the Show control with two panels.
Is there any way to programmatically change the URL of a panel in a Show from javascript?
A:
Here is the code sample:
<obshow:Show id="Show1" runat="server" …>
…
</obshow:Show>
…
var iframeID = "iframe_Show1_0"; // first panel
var iframeObject = document.getElementById(iframeID);
if (iframeObject) {
iframeObject.src = " news_posts.aspx?startatpost=1";
}
iframeID = "iframe_Show1_1"; // second panel
iframeObject = document.getElementById(iframeID);
if (iframeObject) {
iframeObject.src = " news_posts.aspx?startatpost=6";
}
|