I have a dropdown box with two choices, and below the dropdown box are to textboxes. How can I display information above each box based on a selection from the dropdown box? -Thanks! -
<% if showccform="YES" then %>
-
<tr>
-
<td width="10%"> </td>
-
<td width="80%"><select size="1" name="cctype">
-
<%
-
'Open database get credit card types!
-
set rs=openrs("SELECT * FROM creditcard ORDER BY name")
-
if not rs.eof then
-
rs.movefirst
-
while not rs.eof
-
ccname=rs("name")
-
%>
-
<option class="formfield" value="<%=ccname%>"><%=ccname%>
-
</option>
-
<%
-
rs.movenext
-
wend
-
end if
-
rs.close
-
set rs=nothing
-
%>
-
<option class="formfield" selected value="<%=cctype%>"><%=cctype%>
-
</option>
-
</select></td>
-
<td width="10%"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="21"> </td>
-
<td class="formheadings" width="80%" height="21"></td>
-
<td width="10%" height="21"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="25"> </td>
-
<td width="80%" height="25">
-
<input class="formfield" type="text" name="ccardno" size="20" value="<%=ccardno%>"></td>
-
<td width="10%" height="25"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="21"> </td>
-
<td class="formheadings" width="80%" height="21"></td>
-
<td width="10%" height="21"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="25"> </td>
-
<td width="80%" height="25">
-
<input class="formfield" type="text" name="ccnoc" size="20" value="<%=fixhtmlform(ccnoc)%>"></td>
-
<td width="10%" height="25"> </td>
-
</tr>
-
13 2964
Hi tsubasa,
So are you saying that you when a user selects an option from the drop down list a message will appear above the textboxes and what that message says will depend on which option was selected?
Dr B
Hi tsubasa,
So are you saying that you when a user selects an option from the drop down list a message will appear above the textboxes and what that message says will depend on which option was selected?
Dr B
Yes that is correct. The choices are GCPC or GSA. See below.
If the pick is GCPC the displays would be AAC above the first box and Acess Code above the 2nd box.
If the pick is GSA the display would be BarCode above the first box and JON# above the 2nd box.
Tsu
Yes that is correct. The choices are GCPC or GSA. See below.
If the pick is GCPC the displays would be AAC above the first box and Acess Code above the 2nd box.
If the pick is GSA the display would be BarCode above the first box and JON# above the 2nd box.
Tsu
You would use javascript to call a function on the select's "onchange" event that changes the text of a control at that location.
I'm moving your thread to the javascript forum.
Jared
Since this thread is now in the JavaScript forum, can you post the client-side version of your code (view source in the browser).
The client side is above.
-Tsu
I can see ASP code in your first post. Nevertheless, have you tried what Jared aka. jhardman suggested above? Add a span or div to contain the messages. In your drop down box onchange call a function which sets these messages by first accessing the containers and then setting their innerHTML property.
I am still new to webpage programming so bare with me. I have added the drop down list with Div tags. Is this what you mean't, see line 624. -
<%
-
'************************************************************
-
%>
-
<!--#include file="../includes/no-cache.asp"-->
-
<!--#include file="../includes/setup.asp"-->
-
<!--#include file="../includes/functions.asp"-->
-
<%
-
cartid = Request.Cookies("cartid")
-
task=request("task")
-
customerid= Request.Cookies("customerid")
-
orderid=request.cookies("orderid")
-
cctype=request("cctype")
-
ccardno=request("ccardno")
-
expmonth=request("expmonth")
-
expyear=request("expyear")
-
cccode=request("cccode")
-
ccnoc=request("ccnoc")
-
method=request("method")
-
paymentdue=request.form("paymentdue")
-
-
'Get additional page setup info.
-
set rs=openrs("SELECT ccen, pbmen, gatewayen, downen, cvven FROM setup")
-
ccen=rs("ccen")
-
pbmen=rs("pbmen")
-
gatewayen=rs("gatewayen")
-
downen=rs("downen")
-
cvven=rs("cvven")
-
closers()
-
-
'Get additional page setup info.
-
set rs=openrs("SELECT gateway, authcccode, authver, authtest, ppipnen FROM gateway")
-
gatewayname=rs("gateway")
-
authcccode=rs("authcccode")
-
authver=rs("authver")
-
authtest=rs("authtest")
-
ppipnen=rs("ppipnen")
-
closers()
-
-
'Check to see if order number has been generated, if not send user back to checkout2.asp.
-
if orderid="" or isnull(orderid) then
-
pdredirect("checkout2.asp")
-
end if
-
-
'Get Cart contents
-
%>
-
<!--#include file="../includes/func-cartlist.asp"-->
-
<%
-
'Check for Inventory Errors
-
if inverror="Y" then
-
pdredirect(shopcarturl)
-
end if
-
-
if grandtotal>0 then
-
paymentdue="Y"
-
end if
-
if paymentdue="N" then
-
method="pbm"
-
task="post"
-
end if
-
-
'If form submitted for Payment Gateway.
-
if task="post" and instr(method,"gate")>0 then
-
'Save Pay by Mail information ---------------
-
Set rsmod = Server.CreateObject("ADODB.Recordset")
-
rsmod.Open "Select * From orders WHERE id=" & orderid, DB, 1, 3
-
-
if instr(method, ":PP:")>0 then gatewayname="PayPal"
-
if instr(method, ":2C:")>0 then gatewayname="2Checkout.com"
-
if instr(method, ":AN:")>0 then gatewayname="Authorize.net"
-
if instr(method, ":PF:")>0 then gatewayname="PayFlow"
-
if instr(method, ":WP:")>0 then gatewayname="WorldPay"
-
if instr(method, ":LP:")>0 then gatewayname="LinkPoint"
-
if instr(method, ":CG:")>0 then gatewayname="Payment Gateway"
-
-
rsmod("cctype") = gatewayname
-
rsmod("ccardno") = rc4("", rc4code)
-
rsmod("ccnoc") = ""
-
rsmod("cccode") = ""
-
rsmod("expmonth") = ""
-
rsmod("expyear") = ""
-
'Do not Update status if PayPal IPN is used.
-
if ppipnen="ON" and gatewayname="PayPal" then
-
else
-
rsmod("status") = "New"
-
end if
-
rsmod("downen") = downen
-
rsmod("giftamt")=giftamt
-
rsmod.Update
-
rsmod.Close
-
set rsmod=nothing
-
-
'Update Gift Cert.(upon redemption)
-
if ppipnen="ON" and gatewayname="PayPal" then
-
else
-
updategcstatus giftcode
-
end if
-
-
'Save cart details in the orderdetail table.
-
Set rsmod = Server.CreateObject("ADODB.Recordset")
-
rsmod.Open "Select * From orderdetail WHERE cartid='" & cartid & "'", DB, 1, 3
-
if not rsmod.eof then
-
rsmod.movefirst
-
while not rsmod.eof
-
rsmod("orderid") = orderid
-
rsmod("customerid") = customerid
-
'rsmod("cartid") = ""
-
-
'Update inventory for the item.
-
itemid=rsmod("itemno")
-
qty=rsmod("qty")
-
-
'Do not Update Inventory if PayPal IPN is used.
-
if ppipnen="ON" and gatewayname="PayPal" then
-
else
-
Set rsinv = Server.CreateObject("ADODB.Recordset")
-
rsinv.Open "Select * From items WHERE id=" & itemid, DB, 1, 3
-
if not rsinv.eof then
-
oldqty=rsinv("qty")
-
newqty=oldqty-qty
-
rsinv("qty")=newqty
-
rsinv.update
-
end if
-
rsinv.close
-
set rsinv=nothing
-
end if
-
-
'Update Gift Certificate
-
finalizegc orderid, rsmod("giftid")
-
-
'If item is a digital download, create and save key.
-
if rsmod("digital")="ON" then
-
'Create unique key for Download
-
Randomize
-
temp1 = replace(Time, " ", "")
-
temp1 = replace(temp1, ":", "")
-
temp2 = replace(date, " ", "")
-
temp2 = replace(temp2, "/", "")
-
key = temp2 & temp1 & Int((9999999999- 5 + 1) * Rnd + 5)
-
'Save Key
-
rsmod("digkey")=key
-
rsmod("downloads")=qty
-
rsmod("ip")=request.servervariables("REMOTE_ADDR")
-
end if
-
-
rsmod.Update
-
rsmod.movenext
-
wend
-
end if
-
rsmod.Close
-
set rsmod=nothing
-
-
'After data is saved, send user to Payment Gateway.
-
if instr(method,":CG:")>0 then
-
pdredirect("gateway_custom.asp")
-
else
-
pdredirect("gateway_out.asp")
-
end if
-
end if
-
-
-
'If form submitted for Pay by Mail.
-
if task="post" and method="pbm" then
-
'Save Pay by Mail information ---------------
-
Set rsmod = Server.CreateObject("ADODB.Recordset")
-
rsmod.Open "Select * From orders WHERE id=" & orderid, DB, 1, 3
-
rsmod("cctype") = getsystext("sys44")
-
rsmod("ccardno") = rc4("", rc4code)
-
rsmod("ccnoc") = ""
-
rsmod("jon_number") = ""
-
rsmod("expmonth") = ""
-
rsmod("expyear") = ""
-
rsmod("status") = "New"
-
rsmod("downen") = downen
-
rsmod("giftamt")=giftamt
-
rsmod.Update
-
rsmod.Close
-
set rsmod=nothing
-
-
'Update Gift Cert.(upon redemption)
-
updategcstatus giftcode
-
-
'Save cart details in the orderdetail table.
-
Set rsmod = Server.CreateObject("ADODB.Recordset")
-
rsmod.Open "Select * From orderdetail WHERE cartid='" & cartid & "'", DB, 1, 3
-
if not rsmod.eof then
-
rsmod.movefirst
-
while not rsmod.eof
-
rsmod("orderid") = orderid
-
rsmod("customerid") = customerid
-
'rsmod("cartid") = ""
-
'Update inventory for the item.
-
itemid=rsmod("itemno")
-
qty=rsmod("qty")
-
-
Set rsinv = Server.CreateObject("ADODB.Recordset")
-
rsinv.Open "Select * From items WHERE id=" & itemid, DB, 1, 3
-
if not rsinv.eof then
-
oldqty=rsinv("qty")
-
newqty=oldqty-qty
-
rsinv("qty")=newqty
-
rsinv.update
-
end if
-
rsinv.close
-
set rsinv=nothing
-
-
'Update Gift Certificate
-
finalizegc orderid, rsmod("giftid")
-
-
'If item is a digital download, create and save key.
-
if rsmod("digital")="ON" then
-
'Create unique key for Download
-
Randomize
-
temp1 = replace(Time, " ", "")
-
temp1 = replace(temp1, ":", "")
-
temp2 = replace(date, " ", "")
-
temp2 = replace(temp2, "/", "")
-
key = temp2 & temp1 & Int((9999999999- 5 + 1) * Rnd + 5)
-
'Save Key
-
rsmod("digkey")=key
-
rsmod("downloads")=qty
-
rsmod("ip")=request.servervariables("REMOTE_ADDR")
-
end if
-
-
rsmod.Update
-
rsmod.movenext
-
wend
-
end if
-
rsmod.Close
-
set rsmod=nothing
-
'After completed, send user to order thanks message.
-
if paymentdue="N" then
-
pdredirect("checkout5.asp")
-
else
-
pdredirect("checkout5.asp?method=pbm")
-
end if
-
end if
-
-
'If form submitted for Credit card payment.
-
if task="post" and method="cc" then
-
'Check for Form errors.
-
formerror=""
-
-
call checkForm(cctype,getsystext("sys47"),"T",1,50)
-
call checkForm(ccardno,getsystext("sys48"),"T",13,13)
-
call checkForm(ccnoc,getsystext("sys58"),"T",11,11)
-
-
expireson=expmonth & "/" & expyear
-
-
if authcccode="ON" and gatewayen="ON" then
-
call checkForm(cccode,getsystext("sys49"),"T",3,5)
-
end if
-
-
-
'Update Order with Payment details.
-
Set rsmod = Server.CreateObject("ADODB.Recordset")
-
rsmod.Open "Select * From orders WHERE id=" & orderid, DB, 1, 3
-
rsmod("cctype") = cctype
-
rsmod("ccardno") = rc4(ccardno, rc4code)
-
rsmod("ccnoc") = ccnoc
-
rsmod("cccode") = cccode
-
rsmod("status") = "New"
-
rsmod("ccapproval") = ccapproval
-
rsmod("downen") = downen
-
rsmod("giftamt")=giftamt
-
rsmod.Update
-
rsmod.Close
-
set rsmod=nothing
-
-
'Update Gift Cert.(upon redemption)
-
updategcstatus giftcode
-
-
'Save cart details in the orderdetail table.
-
Set rsmod = Server.CreateObject("ADODB.Recordset")
-
rsmod.Open "Select * From orderdetail WHERE cartid='" & cartid & "'", DB, 1, 3
-
if not rsmod.eof then
-
rsmod.movefirst
-
while not rsmod.eof
-
rsmod("orderid") = orderid
-
rsmod("customerid") = customerid
-
'rsmod("cartid") = ""
-
'Update inventory for the item.
-
itemid=rsmod("stocknumber")
-
qty=rsmod("qty")
-
-
Set rsinv = Server.CreateObject("ADODB.Recordset")
-
rsinv.Open "Select * From items WHERE id=" & itemid, DB, 1, 3
-
if not rsinv.eof then
-
oldqty=rsinv("qty")
-
newqty=oldqty-qty
-
rsinv("qty")=newqty
-
rsinv.update
-
end if
-
rsinv.close
-
set rsinv=nothing
-
-
'Update Gift Certificate
-
finalizegc orderid, rsmod("giftid")
-
-
'If item is a digital download, create and save key.
-
if rsmod("digital")="ON" then
-
'Create unique key for Download
-
Randomize
-
temp1 = replace(Time, " ", "")
-
temp1 = replace(temp1, ":", "")
-
temp2 = replace(date, " ", "")
-
temp2 = replace(temp2, "/", "")
-
key = temp2 & temp1 & Int((9999999999- 5 + 1) * Rnd + 5)
-
'Save Key
-
rsmod("digkey")=key
-
rsmod("downloads")=qty
-
rsmod("ip")=request.servervariables("REMOTE_ADDR")
-
end if
-
-
rsmod.Update
-
rsmod.movenext
-
wend
-
end if
-
rsmod.Close
-
set rsmod=nothing
-
pdredirect("checkout5.asp")
-
end if
-
-
'Determine which payment choice is checked.
-
pbbox=""
-
ccbox=""
-
if ccen="ON" or instr(gatewayname,":AN:")>0 then
-
ccbox="checked"
-
pbbox=""
-
else
-
pbbox="checked"
-
end if
-
-
'Check if Payment Gateway is enabled.
-
if ccen="ON" or instr(gatewayname,":AN:")>0 then
-
showccform="YES"
-
if instr(gatewayname,":AN:")>0 and authver="SIM" then
-
showccform="NO"
-
end if
-
if instr(gatewayname,":AN:")>0 and authver="AIM" then
-
showccform="YES"
-
if gatewayen="ON" and authtest="ON" then
-
ccardno="5424000000000015"
-
cctype="Authorize.NET Test"
-
expmonth="10"
-
expyear="2010"
-
ccnoc="Test Name"
-
cccode="541"
-
testmessage="<span class=errors><br>YOU ARE IN TEST MODE.<BR>The card number below is a test credit card, it is not a valid credit card and it will not be charged.<br></span>"
-
end if
-
end if
-
end if
-
-
'Testing
-
if demomode="yes" then
-
ccardno="5424000000000015"
-
cctype="MasterCard"
-
cccode="541"
-
end if
-
-
'Redirect to Waiting Message for Authorize.net Transactions.
-
if gatewayen="ON" and instr(gatewayname,":AN:")>0 and authver="AIM" then
-
checkouturl="checkout4a.asp"
-
else
-
checkouturl="checkout4.asp"
-
end if
-
-
zpage=pg9
-
%>
-
-
<!--#include file="../includes/top.asp"-->
-
<% getleftside(zpage)%>
-
<% getsecspace ()%>
-
<% getHeading "heads7", heads7, "", 2 %>
-
<table border="0" <%=getstyle("heads7")%> cellpadding="5" cellspacing="0" width="100%">
-
-
<form method="POST" action="<%=checkouturl%>" name="form" id="form">
-
</form>
-
<input type="hidden" name="task" value="post">
-
<tr>
-
<td class="messages" width="100%"><%=fixERR(formerror)%></td>
-
</tr>
-
<tr>
-
<td width="100%">
-
<table class="forms" border="0" cellpadding="0" cellspacing="0" width="100%">
-
<tr>
-
<td width="10%" height="10"> </td>
-
<td width="80%" height="10"> </td>
-
<td width="10%" height="10"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="10"> </td>
-
<td class="formheadings" width="80%" height="10"><%=getsystext("sys42")%></td>
-
<td width="10%" height="10"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="10"> </td>
-
<td width="80%" height="10"> </td>
-
<td width="10%" height="10"> </td>
-
</tr>
-
-
<tr>
-
<td width="10%" height="10"></td>
-
<td class="formordertotal" width="80%" height="10">
-
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber2">
-
<tr>
-
<td class="formordertotal"> <%=showCurr(grandtotal)%></td>
-
<td class="formordertotal"> </td>
-
<td><% showbutton "butts6", butts6, shopsslurl & "shop/orderreview.asp","" %></td>
-
</tr>
-
</table>
-
</td>
-
<td width="10%" height="10"></td>
-
</tr>
-
<% if paymentdue="Y" then %>
-
<tr>
-
<td width="10%" height="10"> </td>
-
<td width="80%" height="10"></td>
-
<td width="10%" height="10"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="10"> </td>
-
<td class="formheadings" width="80%" height="10"><%=getsystext("sys43")%><br>
-
<br>
-
</td>
-
<td width="10%" height="10"> </td>
-
</tr>
-
<tr>
-
<td width="10%" align="right" height="10"> </td>
-
<td width="80%">
-
-
<% if pbmen="ON" then %>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" valign="top">
-
<input class="formbox" type="radio" value="pbm" <%=pbbox%> name="method"></td>
-
<td class="formheadings" width="93%"><%=getsystext("sys44")%></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"></td>
-
</tr>
-
</table>
-
<% end if %>
-
-
<% if instr(gatewayname,":PP:")>0 and gatewayen="ON" then %>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" valign="top">
-
<input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:PP:"></td>
-
<td class="formheadings" width="93%"><%=getsystext("sys45")%></td>
-
</tr>
-
</table>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"><img border="0" src="img/pplogo.gif"></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"></td>
-
</tr>
-
</table>
-
<% end if %>
-
<% if instr(gatewayname,":2C:")>0 and gatewayen="ON" then %>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" valign="top">
-
<input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:2C:"></td>
-
<td class="formheadings" width="93%"><%=getsystext("sys53")%></td>
-
</tr>
-
</table>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"><img border="0" src="img/2checkoutlogo.gif"></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"></td>
-
</tr>
-
-
-
</table>
-
<% end if %>
-
<% if instr(gatewayname,":AN:")>0 and authver="SIM" and gatewayen="ON" then %>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" class="formheadings"> </td>
-
</tr>
-
<tr>
-
<td width="7%" valign="top">
-
<input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:AN:"></td>
-
<td class="formheadings" width="93%"><%=getsystext("sys54")%></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"><img border="0" src="img/authnetlogo.gif"></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"></td>
-
</tr>
-
-
</table>
-
<% end if %>
-
-
<% if instr(gatewayname,":PF:")>0 and gatewayen="ON" then %>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" class="formheadings"> </td>
-
</tr>
-
<tr>
-
<td width="7%" valign="top">
-
<input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:PF:"></td>
-
<td class="formheadings" width="93%"><%=getsystext("sys55")%></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"><img border="0" src="img/logo_verisign.gif"></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"></td>
-
</tr>
-
-
</table>
-
<% end if %>
-
-
-
<% if instr(gatewayname,":WP:")>0 and gatewayen="ON" then %>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" class="formheadings"> </td>
-
</tr>
-
<tr>
-
<td width="7%" valign="top">
-
<input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:WP:"></td>
-
<td class="formheadings" width="93%"><%=getsystext("sys56")%></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"><img border="0" src="img/worldpay-logo.gif"></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"></td>
-
</tr>
-
-
</table>
-
<% end if %>
-
<% if instr(gatewayname,":LP:")>0 and gatewayen="ON" then %>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" valign="top">
-
<input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:LP:"></td>
-
<td class="formheadings" width="93%"><%=getsystext("sys57")%></td>
-
</tr>
-
</table>
-
<!-- <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"><img border="0" src="img/none.gif"></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"></td>
-
</tr>
-
-
-
</table>-->
-
<% end if %>
-
<% if instr(gatewayname,":CG:")>0 and gatewayen="ON" then %>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" valign="top">
-
<input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:CG:"></td>
-
<td class="formheadings" width="93%"><%=getsystext("sys116")%></td>
-
</tr>
-
</table>
-
<!-- <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"><img border="0" src="img/none.gif"></td>
-
</tr>
-
<tr>
-
<td width="7%" class="formheadings"> </td>
-
<td width="93%" align="left"></td>
-
</tr>
-
-
-
</table>-->
-
<% end if %>
-
-
-
-
-
-
<% if showccform="YES" then %>
-
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
-
-
<tr>
-
<td width="7%" valign="top">
-
<input class="formbox" type="radio" name="method" <%=ccbox %> value="cc"></td>
-
<td class="formheadings" width="93%"><%=getsystext("sys46")%></td>
-
</tr>
-
</table>
-
<% end if %>
-
-
</td>
-
<td width="10%" height="10"> </td>
-
</tr>
-
<% if showccform="YES" then %>
-
<tr>
-
<td width="10%" height="21"> </td>
-
<td class="formheadings" width="80%" height="21"><%=getsystext("sys47")%></td>
-
<td width="10%" height="21"> </td>
-
</tr>
-
<tr>
-
<td width="10%"></td>
-
<td width="80%">
-
<div align="left">
-
<select name="cctype">
-
<option>GSA Card</option>
-
<option>GCPC Card</option>
-
</select></div>
-
</tr>
-
<tr>
-
<td width="10%" height="21"> </td>
-
<td class="formheadings" width="80%" height="21"><%=getsystext("sys48")%></td>
-
<td width="10%" height="21"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="25"> </td>
-
<td width="80%" height="25">
-
<input class="formfield" type="text" name="ccardno" size="20" value="<%=ccardno%>"></td>
-
<td width="10%" height="25"> </td>
-
</tr>
-
<% if authcccode="ON" or cvven="ON" then %>
-
<tr>
-
<td width="10%" height="21"> </td>
-
<td class="formheadings" width="80%" height="21"><%=getsystext("sys49")%></td>
-
<td width="10%" height="21"> </td>
-
</tr>
-
<% end if %>
-
<tr>
-
<td width="10%" height="21"> </td>
-
<td class="formheadings" width="80%" height="21"><%=getsystext("sys58")%></td>
-
<td width="10%" height="21"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="25"> </td>
-
<td width="80%" height="25">
-
<input class="formfield" type="text" name="ccnoc" size="20" value="<%=fixhtmlform(ccnoc)%>"></td>
-
<td width="10%" height="25"> </td>
-
</tr>
-
<tr>
-
<td width="10%" height="21"> </td>
-
<td width="80%" height="21"> </td>
-
<td width="10%" height="21"> </td>
-
</tr>
-
<% end if %>
-
<%else%>
-
<input type="hidden" name="paymentdue" value="N">
-
<tr>
-
<td width="10%" height="21"> </td>
-
<td width="80%" height="21"> </td>
-
<td width="10%" height="21"> </td>
-
</tr>
-
<% end if %>
-
<tr>
-
<td width="10%"> </td>
-
<td width="80%" height="10"> </td>
-
<td width="10%"> </td>
-
</tr>
-
<tr>
-
<td width="10%"> </td>
-
<td width="80%" align="center"><% showbutton "butts14",butts14,"","form" %></td>
-
<td width="10%"> </td>
-
</tr>
-
<tr>
-
<td width="10%"> </td>
-
<td width="80%" align="center" height="20"> </td>
-
<td width="10%"> </td>
-
</tr>
-
<% if hidebancorn=0 or isnull(hidebancorn) then %>
-
<tr>
-
<td width="10%" valign="bottom" align="left"><img border="0" src="img/bot_lolef.gif" width="15" height="15"></td>
-
<td width="80%" align="center" height="10"> </td>
-
<td width="10%" valign="bottom" align="right"><img border="0" src="img/bot_lorig.gif" width="15" height="15"></td>
-
</tr>
-
<% end if %>
-
</table>
-
</td>
-
</tr>
-
<tr>
-
<td width="100%" height="20"></td>
-
</tr>
-
</form>
-
</table>
-
-
<% getrightside(zpage)%><!--#include file="../includes/bottom.asp"-->
-
-
No, the div(s) should be just for the text that needs to be displayed/changed above the text boxes, so the div should be where you want the text messages to appear.
Then add an onchange event to the drop down box passing the value to the function: - <select ... onchange="changeText(this.value)">
You completely lost me. Here is what I will do. I will put back the original code for the ASP dropdown list and the textboxes. Understand that I am new to JavaSript so you will need to explain somethings with examples.
-Tsu
OK, I didn't realise. I haven't got time now, but I should have something for you later unless someone else can jump in before then.
If you can come up with something, cool! If not its no big deal. I can always make a few extra pages and just drive the user into the selection.
-Tsu
Where's the input boxes that need to have the messages above them?
1. Above those boxes, add a div: - <div id="msgdiv"></div>
-
...
-
<div id="msgdiv2"></div>
2. Add the onchange to the select on line 624/5 passing the selected value to a function: - <select name="cctype" onchange="changeMsg(this.value);">
3. Now define the function in script tags: - function changeMsg(val) {
-
// if the selected value equals the first value...
-
if (val == "...") { // change ... to whatever value you want to compare against
-
// set text in first div
-
document.getElementById("msgdiv").innerHTML = 'whatever';
-
// set text in second div
-
document.getElementById("msgdiv2").innerHTML = 'something else';
-
} else {
-
// repeat as above for the second set of message...
-
}
-
}
Ok, let me give this a try.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: thomas j |
last post by:
Hi,
I have a MySqlBase with a tabel named CARS and with 3 fields;
CarsType, CarsModel, CarsInfo.
Now I want to generate 2 dropdownboxes in PHP read from CARS.
First I will "load" CarsType into...
|
by: Adam |
last post by:
Hi,
How do i listen for windows messages in c# on
compact.net? I have a window containing an instantiation
of the HTML viewer control, which is a child of the main
form. As the compact...
|
by: Jim Heavey |
last post by:
Hello
I have a datagrid that has a footer that I have place a
dropdownbox on and loaded the values in the datalist in
the ItemCreated Event.
Everything is just as I expected when the grid is...
|
by: Sunil Sabir |
last post by:
Dear All,
I have a web form which has a link and a drop down box. when I press a
link
a pop up window opens. This window has a lot of TEXTBOXES and a Save
button. When I fill the TextBoxes and...
|
by: Lars Netzel |
last post by:
Hi
I'm having a DropDown box with 2 items... one with Value 1 and one with
Value 2.
If I load the page and it has Value 1 selected from page_load() and then
select Value 2 on the form.. .and...
|
by: Danny M |
last post by:
When i change the value in the dropdownbox.
The value changes.
When i check the datatable the value has changed
But when i want to save it to the database the record didnt got a
changed flag...
|
by: cartman83 |
last post by:
I've got a dropdownbox with a few values in it. There is one value that is selected in advance. But when I change the value in the dropdownbox to a larger amount and press "Search" the value that...
|
by: iniyan |
last post by:
hi guys need help again!!!! i want to retrieve data from the database table and put inside my drop down box.For example i want to view all my products example
F216,F217,F218 in my dropdown box.how...
|
by: bujjai |
last post by:
i am using dropdown box in gridview when form is loaded dropdownbox is dynamically bound .from the database... it should load the data how tell me
urgent
boss help me
|
by: CodeSeeker |
last post by:
I have an application, which uses pop3 to read the messages from the mailbox, and it has been working fine for so many year. We recently have started changing this application to use java mail IMAP 4...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |