Why not do it yourself?
for(var i in document) {
document.write("document."+i);
if(typeof(document[i]=="function") document.write("()");
}
You might also want to consider buying the JavaScript Bible.
Hope that helps!
Happy coding! :)
Use this function:
function validInput(val,evt) {
var e=new Object();
e.which=(evt)?evt.which:event.keyCode;
return (e.which>=48||e.which<=57);
}
In conjuction with this onkeydown event handler:
onkeydown="return validInput(this.value,event);"
Hope that helps!
Happy coding! :)
Wouldn't it be easier to just use CSS?
<style type="text/css">
#fullscreen {
position: absolute;
left: 0px; top: 0px;
width: 100%; height: 100%;
}
</style>
Then, just assign the ID of the layer to fullscreen.
Hope that helps!
Happy coding! :)
You cannot do this with JavaScript (or any other client-side language). You must use a server-side language. I recommend you use PHP or ColdFusion.
Hope that helps!
Happy coding! :)
I have an error in my previous post. Change this line:
e.hit=(evt)?e.target:event.srcElement;
...to this:
e.hit=(evt)?evt.target:event.srcElement;
Hope that helps!
Happy coding! :)
You could use CSS along with a JavaScript function. For example, here's the CSS:
p:first-line {
display: block ! important;
}
p {
display: none;
}
Then, use this JavaScript code:
function chgShow(evt) {
var e=new Object();
e.hit=(evt)?e.target:event.srcElement...
As a reference to my previous post, the code was incorrect (I just wasn't thinking). Here is the correct code.
function center(obj) {
var x=screen.availWidth/2-obj.offsetWidth;
var y=screen.availHeight/2-obj.offsetHeight;
obj.style.left=x; obj.style.top=y;
}
Hope that helps!
Happy coding! :)
That script will only work in IE4+. I'm pretty sure you'd have to use different images in NN4. To make it compatible with IE5.5+, NN6+, and Mozilla 1.0+, use SVG. Unfortunately, your users will have to download the SVG viewer plug-in to view it.
Hope that helps!
Happy coding! :)
function center(el) {
var x=screen.availWidth-el.offsetWidth;
var y=screen.availHeight-el.offsetHeight;
el.style.left=x; el.style.y=y;
}
Hope that helps!
Happy coding! :)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.