Javascript link

3 posts, 0 answers
  1. Issac
    Issac avatar
    21 posts
    Member since:
    Mar 2012

    Posted 10 Apr 2012 Link to this post

    I have a link that looks like;

    <a href="javascript:;" onclick="xlaAFMopenfaq(1);" class="HeaderLink">Customer Service</a>


    How do I add it to a NavigateURL in a menu item?
  2. Issac
    Issac avatar
    21 posts
    Member since:
    Mar 2012

    Posted 10 Apr 2012 Link to this post

    Will answer my own question,

    Dim MenuItem As RadMenuItem = New RadMenuItem("Customer Service")
    MenuItem.NavigateUrl = "javascript:;"
    MenuItem.Attributes.Add("onclick", "xlaAFMopenfaq(1);")
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 23 Apr 2012 Link to this post

    Hi:

    May I add another solution:
    Partial Class _Default
        Inherits MMPA.Purchasing.Web.BasePage
        '
        'Inherits System.Web.UI.Page
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If (Not (IsPostBack)) Then
                Dim _windowReport As String = _windowReport = Request.Params("Window")
                If Not (_windowReport Is Nothing) Then
                    ScriptManager.RegisterStartupScript(Me, Me.GetType, "openpopup", "CrystalReport( );", True)
                End If
            End If
        End Sub
        '
    End Class

    So, the menu entry would be something like
    Default.aspx?Window=xyz

    Phil
Back to Top