473,326 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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


Jul 7 '06 #1
2 2816
Hi Tatyana,

There's a proposed solution for that here:

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

Ken
Microsoft MVP [ASP.NET]

"Tatyana" <ta***************@programmers.comwrote in message
news:uq**************@TK2MSFTNGP04.phx.gbl...
>

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


Jul 8 '06 #2

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
Aug 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alan Silver | last post by:
Hello, I am just converting some pages to use master pages, and I have come across a bit of a problem. One of the pages uses some custom Javascript functions for client-side validation. Now,...
1
by: Friso Wiskerke | last post by:
Hi All, We've got an VS.2003 ASPNET (VB) webproject which we would like to convert to VS.2005 so that we can make use of the Master Page feature. Converting the initial pages to 2005 is not such...
4
by: Greg | last post by:
I'm guessing the problem I'm having has something to do with Master Pages or DetailsView because the exact same code works fine on a page without a Master Page and DetailsView controls. The...
7
by: pushpadant | last post by:
Hi, I have one master page which has some table inside one of the <td> i have my contentplaceholder. on the <head> tag of the master page i have specified link to a global CSS...
8
by: Frank | last post by:
Hi, I am working with VS.NET 2005 Ultimately, I wish to call a JavaScript function from a .js file
6
by: Homer J. Simpson | last post by:
Hi all, I have enough experience with HTML/classic ASP to get by, and I'm trying to learn ASP.NET. Traditionally, I've taken the habit of breaking out extra-long CSS files into multiple,...
1
by: =?Utf-8?B?amVmZjMwNDg=?= | last post by:
Hi, I want to incorporate a JavaScript routine (found on the internet) in my page that will restore the scrollbar position of a div tag on postback. I am using master pages which complicates...
1
by: kchaitanya | last post by:
I have created a master page. When I am adding this master page to .aspx files which are in the root directory, it is working fine. When , I am adding master page to .aspx files which are in sub...
1
by: Jollywg | last post by:
I have a master file that works wonderfully on all of the aspx files in the root directory. I added a folder so that I can go back and add security into my site. Whenever I put aspx files into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.