My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>
Dictionary v3.2 by Dinesh Uthayakumar
</title>
<script type="text/javascript">
//<![CDATA[
function doSearch()
{
var URL;
var option = document.getElementById("siteOption1");
if( option.checked == true )
{
URL = "http://google.com/search?hl=en&q=define%3A";
URL += document.getElementById("txtQuery").value;
}
else if(document.getElementById("siteOption2").checked)
{
URL = "http://www.askoxford.com/results/?view=dict&freesearch=";
URL += document.getElementById("txtQuery").value+"&branch=13842570&textsearchtype=exact";
}
else if(document.getElementById("siteOption4").checked)
{
URL = "http://en.wikipedia.org/wiki/";
URL += document.getElementById("txtQuery").value;
}
else
{
URL = "http://www.merriam-webster.com/dictionary/";
URL += document.getElementById("txtQuery").value;
}
document.getElementById("resultIFRAME").src = URL;
}

function queryString(paramentername)
{
qs = window.location.search.substring(1);
parameterArray = qs.split("&");
for (i=0;i<parameterArray.length;i++)
{
parameter = parameterArray[i].split("=");
if (parameter[0] == paramentername) {
return parameter[1];
}
}
}

function keypressed(event)
{
if( event.keyCode=='13')
doSearch();
}

function setDimension()
{
var iframeId = document.getElementById("resultIFRAME");
iframeId.width = window.innerWidth-10;
iframeId.height = window.innerHeight-100;
}

//]]>

</script>
</head>
<body onkeypress="keypressed(event);" >
<p>
<a href="http://validator.w3.org/check?uri=referer">
<img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" border="0"/></a>
</p>
<p>
<input type="text" id="txtQuery" name="query" onblur="doSearch()"/>
<input type="radio" name="siteOption" id="siteOption4" value="4" onclick="doSearch()" checked="checked" />Wikipedia
<input type="radio" name="siteOption" id="siteOption2" value="2" onclick="doSearch()" />Oxford Dictionary
<input type="radio" name="siteOption" id="siteOption3" value="3" onclick="doSearch()" />Merriam-Webster
<input type="radio" name="siteOption" id="siteOption1" value="1" onclick="doSearch()" />Google
</p>
<iframe id="resultIFRAME" src ="" frameborder="0" scrolling="auto" height="768px" width="90%" >
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
Show details Hide details

Change log

r14 by udinesh5 on Oct 23, 2009   Diff
previous version did not work with IE7
Go to: 
Project members, sign in to write a code review

Older revisions

r13 by udinesh5 on Oct 23, 2009   Diff
Version 3.1, removed the debugger
statement
r12 by udinesh5 on Oct 23, 2009   Diff
Version 3.0 and W3C compliant
r11 by udinesh5 on Oct 23, 2009   Diff
Version 2.0
All revisions of this file

File info

Size: 2682 bytes, 87 lines
Hosted by Google Code