CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 8/22/2007 7:13:27 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 31 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
ekosha
Asp.Net User
Java Script Disabling my stylesheet :(8/22/2007 7:13:27 AM

0

 Hay there,

I have a master page that is implementing a css and everything is working fine. One of my pages uses the the javascript popup calendar and its style sheet.

these are the links the page has :

<LINK href="cal/popcalendar.css" type="text/css" rel="stylesheet">
<script language="javascript" src="cal/popcalendar.js"/>

 And the page is working fine on it own.

When i added the master page to this page  I was not able to find a way to put these lines on the page (within the content tags) so i decided that they belong to the master page... i added the lines as follows it as follows:

<style type="text/css" media="all">

@import "cal/popcalendar.css";
@import "DesignerCSS/style.css";

</style>
<script language="javascript" src="cal/popcalendar.js" /> 

When I put it in the master page, i noticed that the javascript line disables most of the styles from the other sheet,  when i just remove the javascript line both styles are implemented successfully but the popcalendar of course doesn't work...

Any idea how to work around this ???

 

 

 


 

johram
Asp.Net User
Re: Java Script Disabling my stylesheet :(8/22/2007 9:44:43 AM

0

I don't know why this is happening, but it is possible to add include directives stuff from the content page. You have two approaches here. Either you add the included files to the Header property of your Page (within Page_Load of your content page). Like this:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
   Dim cssLink As New HtmlLink()
   cssLink.Href = "~/styles.css"
   cssLink.Attributes.Add("rel", "stylesheet")
   cssLink.Attributes.Add("type", "text/css")
   Header.Controls.Add(cssLink)
End Sub

Or you can define a content placeholder in the head of the masterpage, like this:

<head runat="server">
  <title>Untitled Page</title>
  <asp:ContentPlaceHolder id="headerPlaceHolder" runat="server" />
</head>
For a more complete discussion on the subject, see this great article by K. Scott Allen. It is a reference article if you want to do a little interaction between master/content page! Good luck! 
  

 


If this post was useful to you, please mark it as answer. Thank you!
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Adding Ajax Authors: Shelley Powers, Pages: 382, Published: 2007
Web Design in a Nutshell: A Desktop Quick Reference Authors: Jennifer Niederst, Jennifer Niederst Robbins, Pages: 618, Published: 2001
The World Wide Web for scientists & engineers: a complete reference for navigating, researching & publishing online Authors: Brian J. Thomas, Pages: 357, Published: 1998
Web development solutions: Ajax, APIs, libraries, and hosted services made easy Authors: Christian Heilmann, Mark Norman Francis, Pages: 261, Published: 2007
Make: Technology on Your Time Authors: Mark Frauenfelder, Pages: 224, Published: 2006

Web:
A better Javascript - CSS Style Sheet Switcher - ghaste.com The tutorial on quirksmode.org depends on JavaScript to disable the ... browsers to render my default stylesheet without the need of JavaScript correctly. ...
Cookie help required to remember enable/disable of css stylesheet ... ... to remember enable/disable of css stylesheet JavaScript programming. ... that will remember the enable/disable links throughout my site ...
NOAA Seattle Library >Enable/Disable Javascript and Stylesheets Aug 2, 2005 ... JavaScript and stylesheets may not work properly on older versions Internet ... Go to the My AOL menu, click Preferences. Click WWW. ...
JavaScript tutorial - DOM CSS The script I will show you allows you to choose a combination of stylesheet .... ss[x]; x++ ) { //for each stylesheet ... if( ss[x].title ) { //disable the ... See my stylesheet switching header file for a working example that can store ...
HTML and javascript in XSL style sheet - DevX.com Forums HTML and javascript in XSL style sheet XML. ...

My Table

... (field3 < "10" && field4 >"100") ) ...













unable to access the localhost version on intranet?

anyone have magichyperredirect?

error after upgrade from 3.1.0 to 3.1.1

migrating from dnn 3.1 to 4.0.1 -- any issues

newsletter module for non admin

cannot get dnn to work properly on a remote host(isp)

dnn and msde on different drives

search bar

does dnn hosting server have to be supporting asp.net ?

installing 3.2.1 - missing modules

connection string help please

compiler error message: bc30451: name 'config' is not declared.

external form, submitted or not!

dnn localization issue

logging in as admin / host

new to dnn, am getting sql errors

please help this asp newb.

how do i change the width of the dotnetnuke page?

disable login system.

error loading module - dnn - please help!?

frontpage components

question concerning module administration

configuration error

vs.net + unable to open web project

inherited dnn project - error loading module

sql server 2005

pb with moduledef_v3.xsd and .dnn

continually getting message "the assembly version ( [assemblyversion] ) does not match the database version ( [databaseversion] ) "

menu object modification

help! took the day off to get dnn going. error message.

oh mygod,help me!!!!why?????

skinning and site development question

problem in installing dnn

querystrings in dnn

access dnn 3.0.13 - is this a dumb question?

how would i go about changing a dnn site to another host?

where's the gallery module?

sql server table / view / data errors.

template modules

error on install. help please.

dotnetnuke guru wanted?

file manager

changed http alias - can't access site

basic skin question on modifying classic container

admin menu not working

codesmith templates modification poll

new ecommerce website

problem running dnn on server

dotnetnuke.com registration problem

urgent help required, project deadline in 2 days

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT