JavaScript function is not firing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mrajanikrishna@gmail.com

    JavaScript function is not firing

    Hi

    I am designing an application. I have developed an user control
    for sidebar links(User details, edit details, change password). These
    are given in LoginView control, LoggedInTemplat e.

    These targets are located in ~/Users folder.

    I placed these links in a table with anchor tag. I have given href as
    ~/Users/filename.aspx

    This is working fine but I wrote code to fire javascript function
    when the user clicks on table->tr->td

    I put the script tag in Master page(external js file). When I am at
    the root folder, the javascript function is firing(clicking on TD).
    When I move to /Users folder, the javascript functions is not firing.

    Whats the problem.

    And, how can I refer ~/Users/filename.aspx in javscript function? ~/
    Users link works with server side controls. How can I use this
    javascript function.

    thanks in advance





  • Munna

    #2
    Re: Javascript function is not firning

    Hi,

    Please check if you have any script error in browser... ...
    This can happen if you have script error and do also check
    if your browsers script error alert is turned on or not..

    Best of luck

    -----------
    Munna




    Comment

    • bruce barker

      #3
      Re: Javascript function is not firning

      the "~/" is translated by server code for url properties. of course a
      <script src="~/somepath"will not be converted because its not a server
      control, and if you place at runat=server, then its not client script.

      to get around this issuse, asp.net supports javascript files as a
      resource, and has an api to register them as a webresource or
      scriptresource if using ajax.

      -- bruce (sqlwork.com)

      mrajanikrishna@ gmail.com wrote:
      Hi
      >
      I am designing an application. I have developed an user control
      for sidebar links(User details, edit details, change password). These
      are given in LoginView control, LoggedInTemplat e.
      >
      These targets are located in ~/Users folder.
      >
      I placed these links in a table with anchor tag. I have given href as
      ~/Users/filename.aspx
      >
      This is working fine but I wrote code to fire javascript function
      when the user clicks on table->tr->td
      >
      I put the script tag in Master page(external js file). When I am at
      the root folder, the javascript function is firing(clicking on TD).
      When I move to /Users folder, the javascript functions is not firing.
      >
      Whats the problem.
      >
      And, how can I refer ~/Users/filename.aspx in javscript function? ~/
      Users link works with server side controls. How can I use this
      javascript function.
      >
      thanks in advance
      >
      >
      >
      >
      >

      Comment

      Working...