-
lost in frames
now the button works but when the text box is entered it doesn't do what it is supposed to do it just came back to same page like nothing happened.I wonder why when it's the same function called.
please help me!TIA
HTML Code:
<input type="text" id="srctxt" style="width:8em; height:18px" maxlength="15" onKeypress="finder('<%=olduser%>');">
<input type="button" id="btnfind" style="height:17px;cursor:hand" value="Search" class="btnblack" onClick="finder('<%=olduser%>');" >
Code:
function finder(user){
//alert(user);
var e = window.event.keyCode
if (e == 13|| e == 0) {
var srch = document.getElementById("srctxt").value;
var stype = document.getElementById("srchtype").value;
var s = srch.indexOf('&');
var x = srch.indexOf('#');
if (s>0) {var srch = srch.replace(/&/g,'%26')};
if (x>0) {var srch = srch.replace(/#/g,'%23')};
if (stype=='Client'){parent.frames[2].location.href='ProjectIndex.asp?Proj='+srch+'&user='+user;
if (stype=='Client'){parent.frames[2].location.href='ClientIndex.asp?ID='+srch+'&user='+user};
if (stype=='User'){parent.frames[2].location.href='User.asp?user='+user+'&userx='+srch+'&grp=N'};
}
}