Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - JavaScript problem used in Master Pages and Subfolders

 
Thread Tools Search this Thread
Old 07-07-2006, 09:25 PM   #1
Default JavaScript problem used in Master Pages and Subfolders




Hello,



I was wondering if anybody know how to fix the problem with JavaScript in
subfolders.

I have the following in

<body>

<script type='text/javascript' src='Javascripts/var.js'
language="javascript"></script>

......

</body>

This works if the pages are in the main root folder. Once I create a
subfolder I can no longer see javascript menu.

I would like to be able to place several files into the subfolders to keep
the project clean but not able to do this until I fix the problem with
JavaScript.

I'm using a Master page in the project.

Any suggestions? I tried src='~/Javascripts/var.js' this doesn't work and if
I make it a server control the language fails since te defind language is
C#.

Thank you,

Tatyana






Tatyana
  Reply With Quote
Old 07-08-2006, 01:57 AM   #2
Ken Cox [Microsoft MVP]
 
Posts: n/a
Default Re: JavaScript problem used in Master Pages and Subfolders

Hi Tatyana,

There's a proposed solution for that here:

http://geekswithblogs.net/jbentley/a.../31/58600.aspx

Ken
Microsoft MVP [ASP.NET]

"Tatyana" <> wrote in message
news:...
>
>
> Hello,
>
>
>
> I was wondering if anybody know how to fix the problem with JavaScript in
> subfolders.
>
> I have the following in
>
> <body>
>
> <script type='text/javascript' src='Javascripts/var.js'
> language="javascript"></script>
>
> .....
>
> </body>
>
> This works if the pages are in the main root folder. Once I create a
> subfolder I can no longer see javascript menu.
>
> I would like to be able to place several files into the subfolders to keep
> the project clean but not able to do this until I fix the problem with
> JavaScript.
>
> I'm using a Master page in the project.
>
> Any suggestions? I tried src='~/Javascripts/var.js' this doesn't work and
> if
> I make it a server control the language fails since te defind language is
> C#.
>
> Thank you,
>
> Tatyana
>
>
>
>



  Reply With Quote
Old 08-04-2006, 08:33 AM   #3
hebben
Junior Member
 
Join Date: Aug 2006
Posts: 1
Default

Try this solution. I use it all the time.
Including Javascript files no matter where you are - http://extraview.co.uk/blog/PermaLin...2af0afc89.aspx
hebben is offline   Reply With Quote
Old 08-04-2006, 08:58 AM   #4
Jams
 
Posts: n/a
Default Re: JavaScript problem used in Master Pages and Subfolders


Here is, IMHO, a fine solution:
Including Javascript files no matter where you are -
http://extraview.co.uk/blog/PermaLin...2af0afc89.aspx


Tatyana wrote:
> Hello,
>
>
>
> I was wondering if anybody know how to fix the problem with JavaScript in
> subfolders.
>
> I have the following in
>
> <body>
>
> <script type='text/javascript' src='Javascripts/var.js'
> language="javascript"></script>
>
> .....
>
> </body>
>
> This works if the pages are in the main root folder. Once I create a
> subfolder I can no longer see javascript menu.
>
> I would like to be able to place several files into the subfolders to keep
> the project clean but not able to do this until I fix the problem with
> JavaScript.
>
> I'm using a Master page in the project.
>
> Any suggestions? I tried src='~/Javascripts/var.js' this doesn't work and if
> I make it a server control the language fails since te defind language is
> C#.
>
> Thank you,
>
> Tatyana


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump