|
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.
|
|
|
|
|
I have never used Joomla, but these links might help you.
http://forum.joomla.org/viewtopic.php?t=121065
http://www.cheekygreenmonkey.com/Creating-A-Blog-Site-With-Joomla.html
|
|
|
|
|
|
Hi,
I want to create a digital signage system web based !
There should be something like a browser will download media files from the web server, save it onto client's machine and plays it in specific sequence.
Can a browser/client have access to download media files and save it to specific location using javascirpt/vbscript or any other way (no manual process it should be done automatically) and after that play those media files !
Thanks & Best Regards,
Divyesh Chapaneri
|
|
|
|
|
divyesh1432 wrote: Can a browser/client have access to download media files and save it to specific location using javascirpt/vbscript or any other way (no manual process it should be done automatically) and after that play those media files !
Nope.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
No Browser doesnt have access to file system.
What you can do is when you are making a playlist, store the ids in the browser cookie, and play them in browser based music player directly from the server based on the sequence made by the user.
This is just what esnips does.
|
|
|
|
|
hi,
You can try the above. additionally you can write a browser using browsers control in .net and you can use that for your purpose...
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
I think playing media files using flash players is the best way. You can also try out the recently introduced Silverlight players.
At least there should be a browser plugin involved to play a sound in browser.
|
|
|
|