|
The problem is not with OO or the professors who teach us OO, it is what forces us to tie our code to business requirements with scant regard for reusability - DEADLINES.
|
|
|
|
|
how true,
its not about the quality of the software you develop, its all about the time frame that you deliver it within.
Jd.
|
|
|
|
|
hello, for my college project i have to create a nice looking website, i am thinking of translucent backgrounds ..... if any of you can help me , i would like to know how I would do translucent backgrounds in an external style sheet and doesn't affect my content colours, that would be really useful ... I know it’s to do with the tag opacity i think....
Thanks
|
|
|
|
|
Yes it is done with opacity in css....
For mozilla and others it is
#id{
opacity: 0.4;
}
for IE it is
#id{
filter:alpha(opacity=40 );
}
so mix 'em up
#id{
opacity: 0.4;
filter:alpha(opacity=40 );
}
|
|
|
|
|
but that also turns my content to be translucent ... so how do i stop that ?
|
|
|
|
|
to simply stop
opacity:1 for mozilla
and for IE
filter:alpha( opacity:100 )
|
|
|
|
|
thanks for all your help :P
|
|
|
|
|
Put all of your content inside a div with a higher z-index.
|
|
|
|
|
Hello,
I am trying to make a textbox with default text..as user clicks it should disappear.I succeeded in doing that but got struck while differing the classes of default text and user input...
here is my code
............................................................................................................
<html>
<head>
<style>
.hint{color:blue;}
.real{color:black;}
</style>
<script type="text/javascript">
window.onload = onchange;
function foc(){
if(this.value.length==0 || this.className=="hint"){
this.value="";
this.className=="real";
}
}
function blur(){
if(this.value.length==0){
this.className = "hint";
this.value="Enter";
}
}
function onchange(){
var text = document.getElementById("textbox1");
text.onfocus = foc;
text.onblur = blur;
}
</script>
</head>
<body>
<input type="text" id="textbox1" class="hint" value="Enter"/>
</body>
</html>
..........................................................................................................
The problem is in function foc(), i want that if onfocus event rises then class of the textbox should change to real...but that's not happening and creating all trouble.
I want that the hint text should appear in blue and input in black. Also if user purposely enters the hint text as input then script should judge on classes not on text values. Like here hint text or default text is Enter....even if user input is Enter then that text should not disappear onblur...
THNX.
|
|
|
|
|
greendragons wrote: want that the hint text should appear in blue and input in black.
Not possible in the same textbox at the same time
Basically you seem very confused as to how CSS and JavaScript actually work
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Then how this feature i have seen on many sites....there must be some way to create it...any ideas...
|
|
|
|
|
Just because you've seen something done doesn't mean it was done the way you think it was.
What you are asking for, applying two styles to the same textbox for two seperate pieces of text is not possible with HTML. With Flash or Silverlight it is.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Mark Nischalke wrote: What you are asking for, applying two styles to the same textbox for two seperate pieces of text is not possible with HTML.
Set the background of the text box to transparent. Line it up directly over a label (maybe in a user control) Format the text of the textbox one way and the text on the label another. A kluge, but it'd meet the design parameters as written.
|
|
|
|
|
If u don't mind please write the code...
Thnx.
|
|
|
|
|
|
greendragons wrote: If u don't mind please write the code...
I don't mind at all. As long as you don't mind depositing $100.00 in my bank account. I am a professional. I write code for money.
|
|
|
|
|
Ohhhhh i got it...sry i was little confused...Thnx..thtz quite tricky and defenitely will work...
|
|
|
|
|
the answer to the question you delighted is "z-index"
|
|
|
|
|
Oakman wrote: A kluge,
To say the least
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Use
<html>
<head>
<style>
.hint{color:blue;}
.real{color:black;}
</style>
<script type="text/javascript">
window.onload = onchange;
function foc(){
if(this.value.length==0 || this.className=="hint"){
this.value="";
document.getElementById('textbox1').className = 'real';
}
}
function blur(){
if(this.value.length==0){
document.getElementById('textbox1').className = 'hint';
this.value="Enter";
}
}
function onchange(){
var text = document.getElementById("textbox1");
text.onfocus = foc;
text.onblur = blur;
}
</script>
</head>
<body>
<input type="text" id="textbox1" class="hint" value="Enter"/>
</body>
</html>
|
|
|
|
|
Thtz great working and exactly i wanted to do...
But please can you explain how class changed....i was using this.className......
and u used document.getElementById("textbox1").className=......
Apparently both are same since the value of this is document.getElementById("textbox1").....
but in this way it's working.....how????
|
|
|
|
|
hello,
i need to develop websites regarding blogs using Joomla technology
But I'm not getting the proper component or tool to develop blog related websites.What component we require to develop .
plzz help
|
|
|
|
|
vinci007 wrote: i need to develop websites regarding blogs using Joomla technology
Maybe you should ask on the Joomla site.
|
|
|
|