...

View Full Version : Javasript Disappearing button?!!?



killerpm
12-10-2004, 03:56 PM
hi

i want the function "leapto " (Which is a yes & no buttons) to disappear according to this condition (Highlighted by red in the code)





html>
<head>
<script>
function leapTo (link)
{
var new_url=link;
if ( (new_url != "") && (new_url != null) )
window.location=new_url;
}
</SCRIPT>
</head>
<body background="back.png">
<br><br><br>

<%
set db=server.createobject("ADODB.connection")
db.open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="+server.mapPath ("db1.mdb"))
set record=server.createobject("adodb.recordset")

if request.form("addaccountid")<>"" then
record.open "select * from personal where accountid like '" & request.form("addaccountid") & "'",db,1,3
end if

Session("aid")=(request.form("addaccountid"))

if record.EOF then
Response.write("Invaild Account Id")
else
response.write("<p align=center>"&"<font size=6 face=Verdana>"&"Account Info."&"</font>"&"</p>")


response.write("<table width=400 border=1 align=center>")


response.write("<tr>")
response.write("<th>")
response.write("Account ID")
response.write("</th>")
response.write("<td>" & record("accountid") & "</td>")
response.write("</tr>")
.
.
.
.
response.write("</table>")
end if
%>

<CENTER>
<FORM name=frm method=post>
<TABLE BORDER=3 WIDTH=500>
<TD align="center" BGCOLOR=000080>

<INPUT TYPE="radio" NAME="Yes" onClick="leapTo('AmountOfCredit.asp')">
<FONT COLOR=00FFFF><B>YES</B></FONT>
<TD align="center" BGCOLOR=FF0000>
<INPUT TYPE="radio" NAME="No" onClick="leapTo('AddCredit.asp')">
<FONT COLOR=000000><B>NO</B></FONT>
</TABLE>
</FORM>
</CENTER>
</body>

</html>


So anybody has any idea a bout this move?!?! :)

A1ien51
12-11-2004, 12:38 AM
try adding a variable that gets set during you if/else statement

then when it is showing the radio buttons have an if statement and check for that variable, if true then show the radio buttons by writing out the code.

Eric



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum