sunnuntai 4. marraskuuta 2007

perjantai 12. lokakuuta 2007

What is my current URL?

<script language="Javascript">
function x(){
var a;
a=window.location.href;
a=a.replace('file:///','');
//document.getElementById('MyLoc').innerHTML=a;
//document.write(a);
}
</script>
<!-- if used innerHTML
<body onload="x();">
<span id="MyLoc">!!!</span>
else
<body>
-->

tiistai 2. lokakuuta 2007

ingresII 2.6 import export

db dump :: INGRES :: EXPORT

c:\temp\copydb -uUSERNAME vnode::database
c:\temp\sql -uUSERNAME vnode::database copyout.log

copies to c:\temp -folder lots of ingres-tables / files.

db dump :: INGRES :: IMPORT

c:\temp\copydb -uUSERNAME vnode::database
c:\temp\sql -uUSERNAME vnode::database copyin.log

copies c:\temp -folder ingres-tables / files (*) back to db.
remember to check file folders in Copy.in -file to make sure they're ok.

keskiviikko 12. syyskuuta 2007

Loop through HTML tags and change theirs attributes with Javascript

Idea behind this is to get all images of current webpage and change the picture shown with Javascript.

<html>
<head>
<title>Looping through IMG-tags example</title>
<script type="text/javascript">
function getImages()
{
var images = document.getElementsByTagName("IMG");
var numOfImages = images.length;
var origImage;
for(i=0;i<numOfImages;i++)
{
origImage = images[i].src;
images[i].src="http://www.google.com/ig/images/igoogle_logo_sm.gif";
images[i].alt="Original image used is " + origImage;
}
}
window.onload = getImages;
</script>
</head>
<body>
<img src="http://www.lo.fi/goo.gif" height="55" width="166">
<img src="http://www.lo.fi/gaa.gif" height="55" width="166">
</body>
</html>

How to connect to Ingres 2 database, another way

sql vnode::databasename

Standard Ingres SQL style.
http://docs.ingres.com/connectivity/UsingNet

How to connect to Ingres 2 database

qbf vnode::databasename -t tablename

-t parameter can be used to connect directly to specific table.
F10 is general *back button*
TAB to move forward in columns.
CTRL+P to move previous column.

lauantai 8. syyskuuta 2007

asp test 2

<%=response.write("Hi!") %>