This is a migrated thread and some comments may be shown as answers.

Radajaxmanger with IE backbutton issue

9 Answers 72 Views
AJAX and Web 2.0
This is a migrated thread and some comments may be shown as answers.
Dayana Maliyakal
Top achievements
Rank 1
Dayana Maliyakal asked on 05 Jul 2011, 08:03 AM
Hi Telerik Team,
We are using Radajaxmanger in one page and set EnableHistory="true" in scriptmanager and in radajaxmanager.But some times back button is not working.Please give me a solution for it.We are using IE:8

By
Dayana

 

9 Answers, 1 is accepted

Sort by
0
Genti
Telerik team
answered on 05 Jul 2011, 02:17 PM
Hello Dayana Maliyakal,

It is not clear from the post why do you have such issues.
What do you mean when you say that sometimes works and sometimes it doesn't?
Is there any scenario that reproduces the issue?

Regarding the way you are keeping the history, did you implement any OnNavigateHistory
handler so that you can reload the previous state successfully?
For more information, you can read the following article from Microsoft:
Managing Browser History

Hope this helps.

Best wishes,
Genti
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Dayana Maliyakal
Top achievements
Rank 1
answered on 06 Jul 2011, 05:51 AM
Hi Telerik Team,
   Thank you for your reply.Actually we have an aspx page with one usercontrol with a RadTreeView and the rest of the contents is in the page itself.
On clicking each node of RadTreeView corresponding contents will be displayed on the right side of the page itself.Please see the attached files.
In that case we got  the back button as enabled and getting the browsing history for some nodes only.ie.sometimes back button is enabled and got the browsing history for the node test1.But on next time loading the page it may be disabled.Each time this back button issue is on different node.
Please give me reply
BY
Dayana
0
Genti
Telerik team
answered on 06 Jul 2011, 12:35 PM
Hello Dayana Maliyakal,

I could not see any attachments.
But as I told you before, you should write some code in order to make the back button work.
This gets explained in the Microsoft link that I provided.

Another detailed example could be found here:
Browser History

Kind regards,
Genti
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Dayana Maliyakal
Top achievements
Rank 1
answered on 12 Jul 2011, 05:42 AM
Hi Telerik Team,
  Thank you very much for your reply.I am gping through your example likeCreating Browser History Points.
Now I can manage browsing history. I want one more help.ie.In this example button1,button2 and button3.While we pressing back button
how can we change this button selection also?I think the same button is as selected there in all cases.

Please give me a solution.

By
Dayana
0
Genti
Telerik team
answered on 12 Jul 2011, 09:37 AM
Hello Dayana Maliyakal,

In this example they are using just one method to handle all of the onclick events of the buttons.
You can change the OnClick attribute of each button in the declaration to point to a different method than the previous.
I.e:
<asp:Button runat="server" ID="Button1" Text="Key 1" OnClick="ButtonClick1" />
<asp:Button runat="server" ID="Button2" Text="Key 2" OnClick="ButtonClick2" />
<asp:Button runat="server" ID="Button3" Text="Key 3" OnClick="ButtonClick3" />
And then in the code behind you would have:
// On button click, handle the event and set a history point.
   public void ButtonClick1(object sender, EventArgs e) {
       LabelHistoryData.Text = ((Button)sender).Text;
       ScriptManager.GetCurrent(this).AddHistoryPoint(key, LabelHistoryData.Text);
   }
   public void ButtonClick2(object sender, EventArgs e)
   {
       LabelHistoryData.Text = ((Button)sender).Text;
       ScriptManager.GetCurrent(this).AddHistoryPoint(key, LabelHistoryData.Text);
   }
   public void ButtonClick3(object sender, EventArgs e)
   {
       LabelHistoryData.Text = ((Button)sender).Text;
       ScriptManager.GetCurrent(this).AddHistoryPoint(key, LabelHistoryData.Text);
   }

I am also attaching a sample.

Hope this helps.

Regards,
Genti
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Dayana Maliyakal
Top achievements
Rank 1
answered on 18 Jul 2011, 06:13 AM
Hi Telerik Team,
  
  Thank you very much for the reply.We have another problem.We are using RadtooltipManager  for maintaining tooltip.In IE8 history cannot be 
maintained while formatting tooltip.In IE7 it has no problem.Please give me a solution
By
Dayana
0
Genti
Telerik team
answered on 18 Jul 2011, 12:55 PM
Hello Dayana Maliyakal,

Can you provide some example code that illustrates such issue?


Best wishes,
Genti
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Dayana Maliyakal
Top achievements
Rank 1
answered on 19 Jul 2011, 04:26 AM
Hi Telerik Team,

   The following code we are using and it has history problem with IE8

  string ToolTipFormater = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width: 200px;\">"
                + "<tr><td class=\"NormalBold\" style=\"white-space:pre-line;background-color: #a8c1e4;border-bottom:1px solid #A5B3C5;\">{0}</td></tr>"
                + "<tr><td style=\"white-space:pre-line;\">{1}</td></tr></table>";


    rtNode.Attributes.Add("onMouseOver", "showToolTip(this,'" + Title + "','" + string.Format(ToolTipFormater, Title.Replace("\r", "<BR>").Replace("\n", "<BR>").Replace("'", "`"), Description.Replace("\r", "<BR>").Replace("\n", "<BR>").Replace("'", "`")) + "')");
         


rtnode----->radtreenode
Title,Description  are string values 


function showToolTip(element, Content1, Content2) {
        var tooltipManager = $find("<%= RadToolTipManager1.ClientID %>");


        //If the user hovers the image before the page has loaded, there is no manager created
        if (!tooltipManager) return;


        //Find the tooltip for this element if it has been created 
        var tooltip = tooltipManager.getToolTipByElement(element);
        //alert(Content);
        //Create a tooltip if no tooltip exists for such element 
        if (!tooltip) {
            tooltip = tooltipManager.createToolTip(element);
            //tooltip.set_title(Content1);
            tooltip.set_text(Content2);

        }

        //Let the tooltip's own show mechanism take over from here - execute the onmouseover just once
        //element.onmouseover = null;
        //show the tooltip
        tooltip.show();
    } 
0
Genti
Telerik team
answered on 19 Jul 2011, 01:59 PM
Hello Dayana Maliyakal,

Note that when you use the ToolTipManager control inside an UpdatePanel, you have to make sure that the outer UpdatePanel UpdateMode is set to Conditional. The reason for this is that the RadToolTipManager has its own UpdatePanel integrated.

Now, judging by the sample code that you provided, I see no code that implements some HistoryPoint, so that the tooltip shows the correct data when you click the back button.

I am attaching a solution that illustrates how you can achieve what you are trying to do.
Some points to notice:
-I am defining the  RadToolTipManager outside the UpdatePanel1, for the above-mentioned reason.
-Whenever the mouse is over a tree node, the RadToolTipmanager1_AjaxUpdate would fire and would set an history point.
-Then the tricky part comes when you hit the back button. In this case the OnNavigate method gets fired and in there you have to fire the Update method of the RadToolTipManager1 as its mode is set to Conditional.



Greetings,
Genti
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
AJAX and Web 2.0
Asked by
Dayana Maliyakal
Top achievements
Rank 1
Answers by
Genti
Telerik team
Dayana Maliyakal
Top achievements
Rank 1
Share this question
or