Today I had to create a function to concatenate two values from a text box and populate the output in another text box. This I did to inmprove the usability of the form for inputing the credit card data.
This is what I wrote
function conc()
{
var mon;
var yy;
yy=document.getElementById("Texty").value;
mon=document.getElementById("Textm").value;
document.getElementById("Texte").value=yy+mon;
}
Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts
Friday, October 26, 2007
Wednesday, July 25, 2007
document.getElementId() has no properties
Today I was getting this error, in Firefox even though the Javascript code that I wrote was working fine.
I had a feeling that my javascript code was not working, and concentrated to work on that.
But the error was not in the javascript code but in the xsl code.
To solve these kind of errors in FF give your elements IDs instead of names and reference them with
document.getElementById("id")
IE seems to be a bit relaxed even though you have a name defined and not the Id.
I had a feeling that my javascript code was not working, and concentrated to work on that.
But the error was not in the javascript code but in the xsl code.
To solve these kind of errors in FF give your elements IDs instead of names and reference them with
document.getElementById("id")
IE seems to be a bit relaxed even though you have a name defined and not the Id.
Monday, July 23, 2007
Convert VBscript to Javascript
I needed to convert some vbscript to javascript as firefox doesn't support vbscript. I found this online tool very helpful
Beware that this tool does not work in firefox though.
Beware that this tool does not work in firefox though.
Friday, July 20, 2007
Monday, April 30, 2007
Javascript and CSS Tutorial - How to make Sliding Panels
A step-by-step tutorial on how to create sliding panels using javascript and css. Included in the tutorial are good examples guiding you through each step.
read more
read more
Thursday, April 19, 2007
15 Javascript Snippets You Can't Live Without
"You either love Javascript or you hate it. Either way it can provide great functionality that users love. And it doesn't have to affect usability. Here are the top 15 Javascript snippets for making great sites that bit extra special."
read more
read more
Wednesday, March 28, 2007
Fade the Background Color of an Element using Javascript
This is probably the easiest way to fade the background color of an HTML element without having to use some huge DHTML library that has a bunch of things you don't need in it.
read more
read more
Thursday, October 26, 2006
Live HTML/CSS/Javascript Preview
Cool webpage that will allow you input/work on CSS/HTML/Javascript and see the results in a live preview window.
read more
read more
Tuesday, August 15, 2006
3 Easy Steps to Avoid JavaScript Memory Leaks
It doesn
’t take any special coding skills or expertise. By following the easy steps above, even a novice can write JavaScript code that is leak free.
read more
’t take any special coding skills or expertise. By following the easy steps above, even a novice can write JavaScript code that is leak free.
read more
Tuesday, May 09, 2006
Javascript Rotating Cube Animation Slideshow Effect
Using some pretty crazy math, Yusuke Kawasaki managed to put together quite a nifty javascript "rotating cube" animation effect. There is a demonstration on the site, along with source code and the explination of how it was created. Fascinating!
read more
read more
Monday, May 01, 2006
Free HTML Javascript tool for integrating RSS feeds into your website
A XML RSS free reader enables you to increase functionality to your website. Search engines look for fresh content and an up to date website is more likely to climb search engine rankings and get more visitors. The page is automatically updated on-the-fly, easily spidered by search engine robots, and easy to implement.
read more | digg story
read more | digg story
Tuesday, February 28, 2006
Capturing time spent on a form
There was a requirement to show the time taken to take the test in the test module. I started off with something like this.
I used the following code on the test page:
[code]
<body onload="" starttime =" new" onunload="endTime = new Date(); document.form1.timerField.value = endTime.getTime() - startTime.getTime()">
[/code]
But this was somehow not capturing the endTime.
So I had resorted to functions as follows using javascript.
var endtime
var starttime
var tdiff
function doStart() {
starttime = new Date();
document.form1.startTime.value = starttime.valueOf();
}
function doEnd() {
endtime=new Date()
document.form1.endTime.value = endtime.valueOf() ;
diff();
document.form1.submit;
}
function diff()
{
tdiff = endtime.valueOf() - starttime.valueOf();
document.form1.timerField.value = round_decimals((tdiff/60000),2) ;
}
This displays the time taken to complete the test on the results page by using the Request.Form("timerField")
I used the following code on the test page:
[code]
<body onload="" starttime =" new" onunload="endTime = new Date(); document.form1.timerField.value = endTime.getTime() - startTime.getTime()">
[/code]
But this was somehow not capturing the endTime.
So I had resorted to functions as follows using javascript.
var endtime
var starttime
var tdiff
function doStart() {
starttime = new Date();
document.form1.startTime.value = starttime.valueOf();
}
function doEnd() {
endtime=new Date()
document.form1.endTime.value = endtime.valueOf() ;
diff();
document.form1.submit;
}
function diff()
{
tdiff = endtime.valueOf() - starttime.valueOf();
document.form1.timerField.value = round_decimals((tdiff/60000),2) ;
}
This displays the time taken to complete the test on the results page by using the Request.Form("timerField")
Subscribe to:
Posts (Atom)
Power BI Kids competition 2026
Celebrating the next generation of data rockstars! 🚀✨ I am incredibly proud to share that we have officially wrapped up our 8-week #PowerB...
-
40 spectacular paper designs (using amazing colors & concepts) that need to look good and be informative in order to focus users’ attent...
-
From the past 3 days I have been working on resolving merged and hidden cells issues when an SSRS reports is exported to excel. ...
-
Challenge : Yesterday I was trying to download a parquet file from the Microsoft Lakehouse on to my laptop. So I was searching for the do...