basically the script below has a form, and when the user submits, the javascript checks the value of the form and removes everything but the file name, makes a fake loading page, and then shows the file name.

"" would become "home.php"
"" would become "search.php"
this works in every browser, (yes including ie), except firefox. anyone se anything wrong?

<script type="text/javascript">
function getfilename() {
var url = document.getElementById('urlinsert').value;
var lastSlash = url.lastIndexOf("/");
var firstQuestionMark = url.indexOf("?");
if(firstQuestionMark == -1)
firstQuestionMark = url.length;
var fileName = url.substring(lastSlash + 1, firstQuestionMark);
content.innerHTML = '<br /><div id="loading"><img src="loading.gif" /></div><div id="download" style="display:none;">download: <a href="' + fileName + '">' + fileName + '</a><br /></div><br />';
setTimeout("document.getElementById('loading').style.display = 'none';", 3000);
setTimeout("document.getElementById('download').style.display = 'inline';", 3100);
 <input type="text" id="urlinsert" value="paste rapidshare url here" onKeyPress="return disableEnterKey(event)" onFocus="if (this.value == 'paste rapidshare url here') {this.value = '';}" onBlur="if (this.value == '') {this.value = 'paste rapidshare url here';}"></input>
<a href="#" onClick="getfilename()" class="submit" style="cursor:pointer">submit</a>