I will keep searching for you but how about making sure there are no blanks in the first place. If you're interested, you can use this option. Will keep searching my library for more options:
[HTML]
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="Input">
<p>
Name: <input name="name" size="15"/><br/>
Age: <input name="age" size="15" format="*N"/><br/>
Sex: <input name="sex" size="15"/>
</p>
</card>
</wml>
http://www.w3schools.com/wap/tag_input.asp
[/HTML]
In a bit!
I found what I wanted to get you:
HTML/JavaScript
[HTML]
<?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">
<head>
<title>Find a Movie</title>
</head>
<body>
<xml id="dsovideo" src="video-year.xml"></xml>
<p align="center">
<a href="index.htm"><img border="0" src="logo.gif" alt="Home" /></a></p>
<p></p>
<p style="font-size:24px; color: #336666; font-weight:900">Find a Movie by Title</p>
<p>Movie Title:<input type="text" id="searchtext" size="20" onKeyPress="keyPressed()">
<button onClick="findMovie()">search</button>
</p>
<hr size="5" color="#cccccc"/>
<div id="searchresult">
Results:
</div>
<script type="text/javascript">
<!--hide from old browsers
function keyPressed(k) {
var hitEnter=event.keyCode
if (hitEnter==13) findMovie()
}
function findMovie() {
searchstring = searchtext.value.toUpperCase()
if (searchstring=="") {
searchresult.innerHTML = "<b><Please enter a movie title in the text box.></b>"
return
}
dsovideo.recordset.moveFirst()
var outputresult=""
while (!dsovideo.recordset.EOF) {
namestring = dsovideo.recordset("Title").value
if (namestring.toUpperCase().indexOf(searchstring)>=0 )
outputresult += "<b>" + dsovideo.recordset("Title")+"</b> ("+dsovideo.recordset("Year")+")</p>"
+ "<p style='margin-left:25px'><b>Rating: </b>"+dsovideo.recordset("Rating")+"</p>"
+ "<p style='margin-left:25px'><b>Starring: </b>"
+ dsovideo.recordset("Actor_Male") +", "
+ dsovideo.recordset("Actor_Female")
+ "<br /></p>"
dsovideo.recordset.moveNext()
}
if (outputresult=="")
searchresult.innerHTML = "<Sorry, this movie title is currently not available.>"
else
searchresult.innerHTML = outputresult
}
//-->
</script>
<hr size="5" color="#cccccc" />
<p></p>
<b><font size="-1">Please send any comments to <a href="mailto:you@thisOrthat.com">you@thisOrthat.co m</a>.</font></b>
</body>
</html>
[/HTML]
XML
[HTML]
<?xml version="1.0"?>
<!-- File Name: video.xml -->
<?xml-stylesheet type="text/xsl" href="video-year.xsl"?>
<video>
<movie>
<Year>1996</Year>
<Title>Mission: Impossible</Title>
<Director>Brian De Palma</Director>
<Type>Action</Type>
<Actor_Male>Tom Cruise</Actor_Male>
<Actor_Female>Emmanuelle Beart</Actor_Female>
<Time>110</Time>
<Rating>PG-13</Rating>
</movie>
<movie>
<Year>2000</Year>
<Title>Cast Away</Title>
<Director>Robert Zemeckis</Director>
<Type>Adventure</Type>
<Actor_Male>Tom Hanks</Actor_Male>
<Actor_Female>Helen Hunt</Actor_Female>
<Time>143</Time>
<Rating>PG-13</Rating>
</movie>
<movie>
<Year>2004</Year>
<Title>Pirates of the Caribbean</Title>
<Director>Gore Verbinski</Director>
<Type>Adventure</Type>
<Actor_Male>Johnny Depp</Actor_Male>
<Actor_Female>Keira Knightley</Actor_Female>
<Time>143</Time>
<Rating>PG-13</Rating>
</movie>
<movie>
<Year>2001</Year>
<Title>The Mummy Returns</Title>
<Director>Stephen Sommers</Director>
<Type>Adventure</Type>
<Actor_Male>Brendan Fraser</Actor_Male>
<Actor_Female>Rachel Weisz</Actor_Female>
<Time>129</Time>
<Rating>PG-13</Rating>
</movie>
<movie>
<Year>2004</Year>
<Title>Bourne Supremacy</Title>
<Director>Paul Greengrass</Director>
<Type>Adventure</Type>
<Actor_Male>Matt Damon</Actor_Male>
<Actor_Female>Franka Potente</Actor_Female>
<Time>139</Time>
<Rating>PG-13</Rating>
</movie>
<movie>
<Year>1999</Year>
<Title>Being John Malkovich</Title>
<Director>Spike Jonze</Director>
<Type>Comedy</Type>
<Actor_Male>John Malkovich</Actor_Male>
<Actor_Female>Catherine Keener</Actor_Female>
<Time>112</Time>
<Rating>R</Rating>
</movie>
<movie>
<Year>2004</Year>
<Title>Home on the Range</Title>
<Director>Will Finn</Director>
<Type>Comedy</Type>
<Actor_Male>G.W. Bailey</Actor_Male>
<Actor_Female>Roseanne</Actor_Female>
<Time>76</Time>
<Rating>PG</Rating>
</movie>
<movie>
<Year>2001</Year>
<Title>Shrek</Title>
<Director>Andrew Adamson</Director>
<Type>Comedy</Type>
<Actor_Male>Mike Myers</Actor_Male>
<Actor_Female>Cameron Diaz</Actor_Female>
<Time>89</Time>
<Rating>PG</Rating>
</movie>
</video>
[/HTML]
XSL
[HTML]
<?xml version="1.0"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<center>
<a href="index.htm"><img border="0" src="logo.gif"></img></a>
<h2>Bell Video - Browse by Year</h2>
</center>
<xsl:for-each select="video/movie">
<xsl:sort select="Year" data-type="number" />
<p>
<span style="font-style:italic; font-weight: 900; color: #ff6633">
<xsl:value-of select="Year" />
</span>
<xsl:text> </xsl:text>
<span style="font-variant:small-caps; font-weight:bold">
<xsl:value-of select="Title" />
</span>
</p>
<p style="margin-left: 3%">
<span style="font-weight:bold">Starring </span>
<xsl:value-of select="Actor_Male"/> and <xsl:value-of select="Actor_Female"/>.
This movie has a rating of
<span style="font-style:italic; font-weight: bold; color:#009999">
<xsl:value-of select="Rating"/>
</span>
</p>
</xsl:for-each>
</xsl:template>
</xsl:transform>
[/HTML]
Submitted this for school projects and I know it works. Try it, you should have no null returned...
Please let us know if that works nonetheless.
In a bit!