dynamic styles
-
Hello everyone, I am trying to change styles of some client-side objects dynamically. For example whenever the user is at the mainPage.aspx, the text between
<div id="activeMainPage">blablabla</div>
should be bold. My problem is : how can I get the current page, and how can I change the text's style dynamically ? BTW, I am a really newbie in ASP.Net. Thanks for your helps and best regards..:: Something is Wrong ::.
-
Hello everyone, I am trying to change styles of some client-side objects dynamically. For example whenever the user is at the mainPage.aspx, the text between
<div id="activeMainPage">blablabla</div>
should be bold. My problem is : how can I get the current page, and how can I change the text's style dynamically ? BTW, I am a really newbie in ASP.Net. Thanks for your helps and best regards..:: Something is Wrong ::.
-
Hello everyone, I am trying to change styles of some client-side objects dynamically. For example whenever the user is at the mainPage.aspx, the text between
<div id="activeMainPage">blablabla</div>
should be bold. My problem is : how can I get the current page, and how can I change the text's style dynamically ? BTW, I am a really newbie in ASP.Net. Thanks for your helps and best regards..:: Something is Wrong ::.
unfortunately i am also a bit of a newbie in asp.net and cant offer a dynamic response, however there is a simple way that you can get your text bold on certain pages that should work through asp.net. presumably you are using external css style sheets.. in which case create a style for you div ie #activeMainPage { font-size:60pt; } in your external page and then if you only wish it to appear on mainpage.aspx / then only refer to it from that page. so for each normal page you could for example name your div "homelink" and for your main page call it "activehomelink". i know this doesnt directly answer your question, but i hope that it offers you a solution, all be it a non-dynamic one. if you already knew this way, good luck in your search for the dynamic way cheers
John Michael Kinsella kinsellajohn@hotmail.com
-
unfortunately i am also a bit of a newbie in asp.net and cant offer a dynamic response, however there is a simple way that you can get your text bold on certain pages that should work through asp.net. presumably you are using external css style sheets.. in which case create a style for you div ie #activeMainPage { font-size:60pt; } in your external page and then if you only wish it to appear on mainpage.aspx / then only refer to it from that page. so for each normal page you could for example name your div "homelink" and for your main page call it "activehomelink". i know this doesnt directly answer your question, but i hope that it offers you a solution, all be it a non-dynamic one. if you already knew this way, good luck in your search for the dynamic way cheers
John Michael Kinsella kinsellajohn@hotmail.com
-
Hello everyone, I am trying to change styles of some client-side objects dynamically. For example whenever the user is at the mainPage.aspx, the text between
<div id="activeMainPage">blablabla</div>
should be bold. My problem is : how can I get the current page, and how can I change the text's style dynamically ? BTW, I am a really newbie in ASP.Net. Thanks for your helps and best regards..:: Something is Wrong ::.
Basic js manipulation of DOM objects centres around the document.getElementById function - give it the id you want and a variable is returned representing the object. From there, you can manipulate the .style.XXX attributes of the object to style them as you need. Best resource for this? www.w3schools.com
"Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox