Javascript function is not firning

  • Thread starter Thread starter mrajanikrishna
  • Start date Start date
M

mrajanikrishna

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, LoggedInTemplate.

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
 
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)
 
Back
Top