Archive for the 'Scripts' Category

Alert in Javascript

This lesson will help the beginners to handle alerts in JavaScripts
<html>
<head>
<script language=”javascript”>
<!–
function f1()
 {
 alert(“Skill Hut”); // Message ‘Skill Hut’ will be displayed
 }
–>
</SCRIPT>
</head>
<body color=white>
Move your mouse over <a href=”” onMouseover=”f1()”>here</a>
</body>
</html>

XML and Database

XML interaction with multiple database. Here we have taken two databases – Oracle (Remote) and Access (Local)
<% @Language=VBScript %
<?xml version=’1.0′?>
<?xml-stylesheet type=”text/xsl” href=”Fstyle1.xsl”?>
<people>
<%
set con=server.CreateObject(“adodb.connection”)
con.Open “dsn=asu;uid=asu;pwd=asu”
set rs = server.CreateObject(“adodb.recordset”)
set rs = server.Execute(“Select *From Emp”)
%>
<student>
<name><%=rs(0)%></name>
<roll><%=rs(1)%></roll>
</student>
<%
rs.Movenext
loop
%>
</people>
 

Creating a file in XML

An example of how to create a basic XML file
<?xml version=’1.0′?>
<details>
<company>
     <name>Lakme</name>
     <products>Cosmetic</products>
</company>
<company>
     <name>Data</name>
     <products>Spices</products>
 
</company>
<company>
     <name>Ranbaxy</name>
     <products>Medicine</products>
 
</company>
</details>