Search:
Type: Posts; User: scoper
Search :
Search took 0.01 seconds.
yep... see its easy really! :D
yeah, or it might be easier to call paddLeft in the redir function
like so:
function redir() {
var pgno = document.getElementById('pageno').value;
function padLeft(val) {
var output = val;
for (var i = val.length; i < 3; i++)
output = "0" + output;
return output;
}
offsetHeight is a good multi browser property
there is nothing wrong syntactically with the line... it might just be a bug in the editor :)
var timer = null;
function keyup2sec(){
timer = window.setTimeout(ajax(), 2000);
}
function clearIt() {
if (timer) {
window.clearTimeout(timer);
timer = null;
whats unsure about using the keyCode method?
the input size is easy... simply size="3"...
as far as the dynamic input validation is concerned... heres something i prepared earlier :p
function checkInput()
{
var code;
if...
if you start a timer on keyup which should call your function and clear the timer on keydown... that should do it...
This should help you get started...
JavaScript Timers -...
the main thing here is to ensure that the button you use isn't a submit button, but a standard one...
function redir() {
var pgno = document.getElementById('pageno').value;
...
he has overflow:auto in the code above so i guess hes using a scrollable container ;)
onblur is the best event to handle considering the behavior of onchange differs between browsers
Theres no real easy way of doing it, but you can get the viewable area of the div using offsetHeight, you probably already have the line-height from your css and any padding on the div... from there...
there is a property of document called forms which is an array of all the form elements in the page... you could find the relevant form and post it manually?
It seems that you have copied the aspx page but not the aspx.cs codebehind page.
window.frames['framename'].location = url
Is there a question in there?
Search google for "javascript image rollovers" theres lots of code around
it should be exactly the same code, only instead of handling onchange (as you would with a select) you handle onclick
im pretty sure that \D is the same as [^0-9] therefore if there is a decimal point in the string it will be replaced with an empty string.
You could handle the onsubmit of the form, if it fails validation return false
function Validate() {
if (...)
return true;
else
return false;
}
If you are only interested in displaying 1 of 2 pieces of text, then simply:
obj.innerHTML = Math.random() > .5 ? text1 : text2;
should do the trick
if you need more than two, then have a...
There is an error in the email test method, which is stopping the script and therefore not getting to the telephone test:
if (reg.test(value)) {
should be
If this is happening on pogo.com, then there is nothing you can do about it. It will be a problem in their script and they will have to sort it out.
You are setting the timeouts at the same time, you need to set them after the previous one has finished