473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DropDownBox messages

tsubasa
64
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!

Expand|Select|Wrap|Line Numbers
  1. <% if showccform="YES" then %>
  2.             <tr>
  3.               <td width="10%">&nbsp;</td>
  4.               <td width="80%"><select size="1" name="cctype">
  5.               <%
  6.               'Open database get credit card types!
  7.               set rs=openrs("SELECT * FROM creditcard ORDER BY name")
  8.               if not rs.eof then
  9.                 rs.movefirst
  10.                 while not rs.eof
  11.                 ccname=rs("name")
  12.               %>
  13.               <option class="formfield" value="<%=ccname%>"><%=ccname%>
  14.               </option>
  15.               <%
  16.                 rs.movenext
  17.                 wend
  18.               end if
  19.               rs.close
  20.               set rs=nothing
  21.               %>
  22.               <option class="formfield" selected value="<%=cctype%>"><%=cctype%>
  23.               </option>
  24.               </select></td>
  25.               <td width="10%">&nbsp;</td>
  26.             </tr>
  27.             <tr>
  28.               <td width="10%" height="21">&nbsp;</td>
  29.               <td class="formheadings" width="80%" height="21"></td>
  30.               <td width="10%" height="21">&nbsp;</td>
  31.             </tr>
  32.             <tr>
  33.               <td width="10%" height="25">&nbsp;</td>
  34.               <td width="80%" height="25">
  35.               <input class="formfield" type="text" name="ccardno" size="20" value="<%=ccardno%>"></td>
  36.               <td width="10%" height="25">&nbsp;</td>
  37.             </tr>
  38.             <tr>
  39.               <td width="10%" height="21">&nbsp;</td>
  40.               <td class="formheadings" width="80%" height="21"></td>
  41.               <td width="10%" height="21">&nbsp;</td>
  42.             </tr>
  43.             <tr>
  44.               <td width="10%" height="25">&nbsp;</td>
  45.               <td width="80%" height="25">
  46.               <input class="formfield" type="text" name="ccnoc" size="20" value="<%=fixhtmlform(ccnoc)%>"></td>
  47.                <td width="10%" height="25">&nbsp;</td>
  48.             </tr>
  49.  
Oct 29 '08 #1
13 2964
DrBunchman
979 Expert 512MB
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
Oct 29 '08 #2
tsubasa
64
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
Oct 29 '08 #3
jhardman
3,406 Expert 2GB
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
Oct 30 '08 #4
acoder
16,027 Expert Mod 8TB
Since this thread is now in the JavaScript forum, can you post the client-side version of your code (view source in the browser).
Oct 30 '08 #5
tsubasa
64
The client side is above.

-Tsu
Nov 4 '08 #6
acoder
16,027 Expert Mod 8TB
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.
Nov 4 '08 #7
tsubasa
64
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.
Expand|Select|Wrap|Line Numbers
  1. <%
  2. '************************************************************
  3. %>
  4. <!--#include file="../includes/no-cache.asp"-->
  5. <!--#include file="../includes/setup.asp"-->
  6. <!--#include file="../includes/functions.asp"-->
  7. <%
  8. cartid = Request.Cookies("cartid")
  9. task=request("task")
  10. customerid= Request.Cookies("customerid")
  11. orderid=request.cookies("orderid")
  12. cctype=request("cctype")
  13. ccardno=request("ccardno")
  14. expmonth=request("expmonth")
  15. expyear=request("expyear")
  16. cccode=request("cccode")
  17. ccnoc=request("ccnoc")
  18. method=request("method")
  19. paymentdue=request.form("paymentdue")
  20.  
  21. 'Get additional page setup info.
  22. set rs=openrs("SELECT ccen, pbmen, gatewayen, downen, cvven FROM setup")
  23.   ccen=rs("ccen")
  24.   pbmen=rs("pbmen")
  25.   gatewayen=rs("gatewayen")
  26.   downen=rs("downen")
  27.   cvven=rs("cvven")
  28. closers()
  29.  
  30. 'Get additional page setup info.
  31. set rs=openrs("SELECT gateway, authcccode, authver, authtest, ppipnen FROM gateway")
  32.   gatewayname=rs("gateway")
  33.   authcccode=rs("authcccode")
  34.   authver=rs("authver")
  35.   authtest=rs("authtest")
  36.   ppipnen=rs("ppipnen")
  37. closers()
  38.  
  39. 'Check to see if order number has been generated, if not send user back to checkout2.asp.
  40. if orderid="" or isnull(orderid) then
  41.   pdredirect("checkout2.asp")
  42. end if
  43.  
  44. 'Get Cart contents
  45. %>
  46. <!--#include file="../includes/func-cartlist.asp"-->
  47. <%
  48. 'Check for Inventory Errors
  49. if inverror="Y" then
  50.   pdredirect(shopcarturl)
  51. end if
  52.  
  53. if grandtotal>0 then
  54.   paymentdue="Y"
  55. end if
  56. if paymentdue="N" then
  57.   method="pbm"
  58.   task="post"
  59. end if
  60.  
  61. 'If form submitted for Payment Gateway.
  62. if task="post" and instr(method,"gate")>0 then
  63.   'Save Pay by Mail information ---------------
  64.   Set rsmod = Server.CreateObject("ADODB.Recordset")
  65.   rsmod.Open "Select * From orders WHERE id=" & orderid, DB, 1, 3
  66.  
  67.   if instr(method, ":PP:")>0 then gatewayname="PayPal"
  68.   if instr(method, ":2C:")>0 then gatewayname="2Checkout.com"
  69.   if instr(method, ":AN:")>0 then gatewayname="Authorize.net"
  70.   if instr(method, ":PF:")>0 then gatewayname="PayFlow"
  71.   if instr(method, ":WP:")>0 then gatewayname="WorldPay" 
  72.   if instr(method, ":LP:")>0 then gatewayname="LinkPoint"  
  73.   if instr(method, ":CG:")>0 then gatewayname="Payment Gateway"
  74.  
  75.   rsmod("cctype") = gatewayname
  76.   rsmod("ccardno") = rc4("", rc4code)
  77.   rsmod("ccnoc") = "" 
  78.   rsmod("cccode") = ""
  79.   rsmod("expmonth") = ""
  80.   rsmod("expyear") = ""
  81.   'Do not Update status if PayPal IPN is used.
  82.   if ppipnen="ON" and gatewayname="PayPal" then
  83.   else
  84.     rsmod("status") = "New"
  85.   end if
  86.   rsmod("downen") = downen
  87.   rsmod("giftamt")=giftamt
  88.   rsmod.Update
  89.   rsmod.Close
  90.   set rsmod=nothing
  91.  
  92.   'Update Gift Cert.(upon redemption)
  93.   if ppipnen="ON" and gatewayname="PayPal" then
  94.   else
  95.     updategcstatus giftcode 
  96.   end if    
  97.  
  98.   'Save cart details in the orderdetail table.
  99.   Set rsmod = Server.CreateObject("ADODB.Recordset")
  100.   rsmod.Open "Select * From orderdetail WHERE cartid='" & cartid & "'", DB, 1, 3
  101.   if not rsmod.eof then
  102.     rsmod.movefirst
  103.     while not rsmod.eof
  104.     rsmod("orderid") = orderid
  105.     rsmod("customerid") = customerid
  106.     'rsmod("cartid") = ""
  107.  
  108.     'Update inventory for the item.
  109.     itemid=rsmod("itemno")
  110.     qty=rsmod("qty")
  111.  
  112.     'Do not Update Inventory if PayPal IPN is used.
  113.     if ppipnen="ON" and gatewayname="PayPal" then
  114.     else
  115.       Set rsinv = Server.CreateObject("ADODB.Recordset")
  116.       rsinv.Open "Select * From items WHERE id=" & itemid, DB, 1, 3
  117.       if not rsinv.eof then
  118.         oldqty=rsinv("qty")
  119.         newqty=oldqty-qty
  120.         rsinv("qty")=newqty
  121.         rsinv.update
  122.       end if
  123.       rsinv.close
  124.       set rsinv=nothing
  125.     end if
  126.  
  127.     'Update Gift Certificate
  128.     finalizegc orderid, rsmod("giftid")
  129.  
  130.       'If item is a digital download, create and save key.
  131.       if rsmod("digital")="ON" then
  132.         'Create unique key for Download
  133.          Randomize
  134.          temp1 = replace(Time, " ", "")
  135.          temp1 = replace(temp1, ":", "")
  136.          temp2 = replace(date, " ", "")
  137.          temp2 = replace(temp2, "/", "")
  138.          key = temp2 & temp1 & Int((9999999999- 5 + 1) * Rnd + 5)
  139.          'Save Key
  140.          rsmod("digkey")=key
  141.          rsmod("downloads")=qty
  142.          rsmod("ip")=request.servervariables("REMOTE_ADDR")       
  143.       end if  
  144.  
  145.     rsmod.Update
  146.     rsmod.movenext
  147.     wend
  148.   end if
  149.   rsmod.Close
  150.   set rsmod=nothing
  151.  
  152.   'After data is saved, send user to Payment Gateway.
  153.   if instr(method,":CG:")>0 then
  154.     pdredirect("gateway_custom.asp")
  155.   else
  156.     pdredirect("gateway_out.asp")
  157.   end if
  158. end if
  159.  
  160.  
  161. 'If form submitted for Pay by Mail.
  162. if task="post" and method="pbm" then
  163.   'Save Pay by Mail information ---------------
  164.   Set rsmod = Server.CreateObject("ADODB.Recordset")
  165.   rsmod.Open "Select * From orders WHERE id=" & orderid, DB, 1, 3
  166.   rsmod("cctype") = getsystext("sys44") 
  167.   rsmod("ccardno") = rc4("", rc4code)
  168.   rsmod("ccnoc") = "" 
  169.   rsmod("jon_number") = ""
  170.   rsmod("expmonth") = ""
  171.   rsmod("expyear") = ""
  172.   rsmod("status") = "New"
  173.   rsmod("downen") = downen
  174.   rsmod("giftamt")=giftamt
  175.   rsmod.Update
  176.   rsmod.Close
  177.   set rsmod=nothing
  178.  
  179.   'Update Gift Cert.(upon redemption)
  180.   updategcstatus giftcode 
  181.  
  182.   'Save cart details in the orderdetail table.
  183.   Set rsmod = Server.CreateObject("ADODB.Recordset")
  184.   rsmod.Open "Select * From orderdetail WHERE cartid='" & cartid & "'", DB, 1, 3
  185.   if not rsmod.eof then
  186.     rsmod.movefirst
  187.     while not rsmod.eof
  188.     rsmod("orderid") = orderid
  189.     rsmod("customerid") = customerid
  190.     'rsmod("cartid") = ""
  191.     'Update inventory for the item.
  192.     itemid=rsmod("itemno")
  193.     qty=rsmod("qty")
  194.  
  195.     Set rsinv = Server.CreateObject("ADODB.Recordset")
  196.     rsinv.Open "Select * From items WHERE id=" & itemid, DB, 1, 3
  197.       if not rsinv.eof then
  198.         oldqty=rsinv("qty")
  199.         newqty=oldqty-qty
  200.         rsinv("qty")=newqty
  201.         rsinv.update
  202.       end if
  203.     rsinv.close
  204.     set rsinv=nothing
  205.  
  206.     'Update Gift Certificate
  207.     finalizegc orderid, rsmod("giftid")
  208.  
  209.       'If item is a digital download, create and save key.
  210.       if rsmod("digital")="ON" then
  211.         'Create unique key for Download
  212.          Randomize
  213.          temp1 = replace(Time, " ", "")
  214.          temp1 = replace(temp1, ":", "")
  215.          temp2 = replace(date, " ", "")
  216.          temp2 = replace(temp2, "/", "")
  217.          key = temp2 & temp1 & Int((9999999999- 5 + 1) * Rnd + 5)
  218.          'Save Key
  219.          rsmod("digkey")=key
  220.          rsmod("downloads")=qty
  221.          rsmod("ip")=request.servervariables("REMOTE_ADDR")       
  222.       end if      
  223.  
  224.     rsmod.Update
  225.     rsmod.movenext
  226.     wend
  227.   end if
  228.   rsmod.Close
  229.   set rsmod=nothing
  230.   'After completed, send user to order thanks message.
  231.   if paymentdue="N" then
  232.     pdredirect("checkout5.asp")
  233.   else
  234.     pdredirect("checkout5.asp?method=pbm")
  235.   end if
  236. end if
  237.  
  238. 'If form submitted for Credit card payment.
  239. if task="post" and method="cc" then
  240.   'Check for Form errors.
  241.   formerror=""
  242.  
  243.   call checkForm(cctype,getsystext("sys47"),"T",1,50)
  244.   call checkForm(ccardno,getsystext("sys48"),"T",13,13)
  245.   call checkForm(ccnoc,getsystext("sys58"),"T",11,11)
  246.  
  247.   expireson=expmonth & "/" & expyear
  248.  
  249.   if authcccode="ON" and gatewayen="ON"  then
  250.     call checkForm(cccode,getsystext("sys49"),"T",3,5)
  251.   end if
  252.  
  253.  
  254.     'Update Order with Payment details.
  255.     Set rsmod = Server.CreateObject("ADODB.Recordset")
  256.     rsmod.Open "Select * From orders WHERE id=" & orderid, DB, 1, 3
  257.     rsmod("cctype") = cctype 
  258.     rsmod("ccardno") = rc4(ccardno, rc4code)
  259.     rsmod("ccnoc") = ccnoc 
  260.     rsmod("cccode") = cccode
  261.     rsmod("status") = "New"
  262.     rsmod("ccapproval") = ccapproval
  263.     rsmod("downen") = downen
  264.     rsmod("giftamt")=giftamt   
  265.     rsmod.Update
  266.     rsmod.Close
  267.     set rsmod=nothing
  268.  
  269.     'Update Gift Cert.(upon redemption)
  270.     updategcstatus giftcode     
  271.  
  272.     'Save cart details in the orderdetail table.
  273.     Set rsmod = Server.CreateObject("ADODB.Recordset")
  274.     rsmod.Open "Select * From orderdetail WHERE cartid='" & cartid & "'", DB, 1, 3
  275.     if not rsmod.eof then
  276.       rsmod.movefirst
  277.       while not rsmod.eof
  278.       rsmod("orderid") = orderid
  279.       rsmod("customerid") = customerid
  280.       'rsmod("cartid") = ""
  281.       'Update inventory for the item.
  282.       itemid=rsmod("stocknumber")
  283.       qty=rsmod("qty")
  284.  
  285.       Set rsinv = Server.CreateObject("ADODB.Recordset")
  286.       rsinv.Open "Select * From items WHERE id=" & itemid, DB, 1, 3
  287.       if not rsinv.eof then
  288.         oldqty=rsinv("qty")
  289.         newqty=oldqty-qty
  290.         rsinv("qty")=newqty
  291.         rsinv.update
  292.       end if
  293.       rsinv.close
  294.       set rsinv=nothing
  295.  
  296.       'Update Gift Certificate
  297.        finalizegc orderid, rsmod("giftid")
  298.  
  299.       'If item is a digital download, create and save key.
  300.       if rsmod("digital")="ON" then
  301.         'Create unique key for Download
  302.          Randomize
  303.          temp1 = replace(Time, " ", "")
  304.          temp1 = replace(temp1, ":", "")
  305.          temp2 = replace(date, " ", "")
  306.          temp2 = replace(temp2, "/", "")
  307.          key = temp2 & temp1 & Int((9999999999- 5 + 1) * Rnd + 5)
  308.          'Save Key
  309.          rsmod("digkey")=key
  310.          rsmod("downloads")=qty
  311.          rsmod("ip")=request.servervariables("REMOTE_ADDR")       
  312.       end if  
  313.  
  314.       rsmod.Update
  315.       rsmod.movenext
  316.       wend
  317.     end if
  318.     rsmod.Close
  319.     set rsmod=nothing
  320.     pdredirect("checkout5.asp")
  321. end if
  322.  
  323. 'Determine which payment choice is checked.
  324. pbbox=""
  325. ccbox=""
  326. if ccen="ON" or instr(gatewayname,":AN:")>0 then 
  327.   ccbox="checked"
  328.   pbbox=""
  329. else
  330.   pbbox="checked"
  331. end if
  332.  
  333. 'Check if Payment Gateway is enabled.
  334. if ccen="ON" or instr(gatewayname,":AN:")>0 then
  335.   showccform="YES"
  336.   if instr(gatewayname,":AN:")>0 and authver="SIM" then
  337.     showccform="NO"
  338.   end if  
  339.   if instr(gatewayname,":AN:")>0 and authver="AIM" then
  340.     showccform="YES"
  341.     if gatewayen="ON" and authtest="ON" then
  342.       ccardno="5424000000000015"
  343.       cctype="Authorize.NET Test"
  344.       expmonth="10"
  345.       expyear="2010"
  346.       ccnoc="Test Name" 
  347.       cccode="541"
  348.       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>"
  349.     end if
  350.   end if
  351. end if 
  352.  
  353. 'Testing
  354. if demomode="yes" then
  355.   ccardno="5424000000000015"
  356.   cctype="MasterCard"
  357.   cccode="541"
  358. end if
  359.  
  360. 'Redirect to Waiting Message for Authorize.net Transactions.
  361. if gatewayen="ON" and instr(gatewayname,":AN:")>0 and authver="AIM" then
  362.   checkouturl="checkout4a.asp"
  363. else
  364.   checkouturl="checkout4.asp"
  365. end if
  366.  
  367. zpage=pg9
  368. %>
  369.  
  370. <!--#include file="../includes/top.asp"-->
  371. <% getleftside(zpage)%>    
  372.        <% getsecspace ()%>
  373.       <%  getHeading "heads7", heads7, "", 2 %>
  374.       <table border="0" <%=getstyle("heads7")%> cellpadding="5" cellspacing="0" width="100%">
  375.  
  376.       <form method="POST" action="<%=checkouturl%>" name="form" id="form">
  377.         </form>
  378.         <input type="hidden" name="task" value="post">
  379.         <tr>
  380.           <td class="messages" width="100%"><%=fixERR(formerror)%></td>
  381.         </tr>    
  382.         <tr>
  383.           <td width="100%">
  384.           <table class="forms" border="0" cellpadding="0" cellspacing="0" width="100%">
  385.             <tr>
  386.               <td width="10%" height="10">&nbsp;</td>
  387.               <td width="80%" height="10">&nbsp;</td>
  388.               <td width="10%" height="10">&nbsp;</td>
  389.             </tr>
  390.             <tr>
  391.               <td width="10%" height="10">&nbsp;</td>
  392.               <td class="formheadings" width="80%" height="10"><%=getsystext("sys42")%></td>
  393.               <td width="10%" height="10">&nbsp;</td>
  394.             </tr>
  395.             <tr>
  396.               <td width="10%" height="10">&nbsp;</td>
  397.               <td width="80%" height="10">&nbsp;</td>
  398.               <td width="10%" height="10">&nbsp;</td>
  399.             </tr>
  400.  
  401.             <tr>
  402.               <td width="10%" height="10"></td>
  403.               <td class="formordertotal" width="80%" height="10">
  404.               <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber2">
  405.                 <tr>
  406.                   <td class="formordertotal">&nbsp;&nbsp;<%=showCurr(grandtotal)%></td>
  407.                   <td class="formordertotal">&nbsp;&nbsp;</td>
  408.                   <td><% showbutton "butts6", butts6, shopsslurl & "shop/orderreview.asp","" %></td>
  409.                 </tr>
  410.               </table>
  411.               </td>
  412.               <td width="10%" height="10"></td>
  413.             </tr>    
  414.             <% if paymentdue="Y" then %>
  415.             <tr>
  416.               <td width="10%" height="10">&nbsp;</td>
  417.               <td  width="80%" height="10"></td>
  418.               <td width="10%" height="10">&nbsp;</td>
  419.             </tr>    
  420.             <tr>
  421.               <td width="10%" height="10">&nbsp;</td>
  422.               <td class="formheadings" width="80%" height="10"><%=getsystext("sys43")%><br>
  423.               <br>
  424.               </td>
  425.               <td width="10%" height="10">&nbsp;</td>
  426.             </tr>
  427.             <tr>
  428.               <td width="10%" align="right" height="10">&nbsp;</td>
  429.               <td width="80%">
  430.  
  431.               <% if pbmen="ON" then %>
  432.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  433.                 <tr>
  434.                   <td width="7%" valign="top">
  435.                   <input class="formbox" type="radio" value="pbm" <%=pbbox%> name="method"></td>
  436.                   <td class="formheadings" width="93%"><%=getsystext("sys44")%></td>
  437.                 </tr>
  438.                 <tr>
  439.                   <td width="7%" class="formheadings">&nbsp;</td>
  440.                   <td width="93%" align="left"></td>
  441.                 </tr>   
  442.               </table>
  443.               <% end if %>
  444.  
  445.               <% if instr(gatewayname,":PP:")>0 and gatewayen="ON" then %>
  446.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  447.                 <tr>
  448.                   <td width="7%" valign="top">
  449.                   <input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:PP:"></td>
  450.                   <td class="formheadings" width="93%"><%=getsystext("sys45")%></td>
  451.                 </tr>
  452.               </table>              
  453.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  454.                 <tr>
  455.                   <td width="7%" class="formheadings">&nbsp;</td>
  456.                   <td width="93%" align="left"><img border="0" src="img/pplogo.gif"></td>
  457.                 </tr>
  458.                 <tr>
  459.                   <td width="7%" class="formheadings">&nbsp;</td>
  460.                   <td width="93%" align="left"></td>
  461.                 </tr>                
  462.               </table>
  463.               <% end if %>
  464.               <% if instr(gatewayname,":2C:")>0 and gatewayen="ON" then %>
  465.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  466.                 <tr>
  467.                   <td width="7%" valign="top">
  468.                   <input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:2C:"></td>
  469.                   <td class="formheadings" width="93%"><%=getsystext("sys53")%></td>
  470.                 </tr>
  471.               </table>             
  472.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  473.                 <tr>
  474.                   <td width="7%" class="formheadings">&nbsp;</td>
  475.                   <td width="93%" align="left"><img border="0" src="img/2checkoutlogo.gif"></td>
  476.                 </tr>
  477.                 <tr>
  478.                   <td width="7%" class="formheadings">&nbsp;</td>
  479.                   <td width="93%" align="left"></td>
  480.                 </tr>                
  481.  
  482.  
  483.               </table>
  484.               <% end if %>
  485.               <% if instr(gatewayname,":AN:")>0 and authver="SIM" and gatewayen="ON" then %>
  486.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  487.                 <tr>
  488.                   <td width="7%" class="formheadings">&nbsp;</td>
  489.                   <td width="93%" class="formheadings">&nbsp;</td>
  490.                 </tr>
  491.                 <tr>
  492.                   <td width="7%" valign="top">
  493.                   <input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:AN:"></td>
  494.                   <td class="formheadings" width="93%"><%=getsystext("sys54")%></td>
  495.                 </tr>                
  496.                 <tr>
  497.                   <td width="7%" class="formheadings">&nbsp;</td>
  498.                   <td width="93%" align="left"><img border="0" src="img/authnetlogo.gif"></td>
  499.                 </tr>
  500.                                 <tr>
  501.                   <td width="7%" class="formheadings">&nbsp;</td>
  502.                   <td width="93%" align="left"></td>
  503.                 </tr>
  504.  
  505.               </table>
  506.               <% end if %>
  507.  
  508.               <% if instr(gatewayname,":PF:")>0 and gatewayen="ON" then %>
  509.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  510.                 <tr>
  511.                   <td width="7%" class="formheadings">&nbsp;</td>
  512.                   <td width="93%" class="formheadings">&nbsp;</td>
  513.                 </tr>
  514.                 <tr>
  515.                   <td width="7%" valign="top">
  516.                   <input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:PF:"></td>
  517.                   <td class="formheadings" width="93%"><%=getsystext("sys55")%></td>
  518.                 </tr>                
  519.                 <tr>
  520.                   <td width="7%" class="formheadings">&nbsp;</td>
  521.                   <td width="93%" align="left"><img border="0" src="img/logo_verisign.gif"></td>
  522.                 </tr>
  523.                                <tr>
  524.                   <td width="7%" class="formheadings">&nbsp;</td>
  525.                   <td width="93%" align="left"></td>
  526.                 </tr> 
  527.  
  528.               </table>
  529.               <% end if %>
  530.  
  531.  
  532.                <% if instr(gatewayname,":WP:")>0 and gatewayen="ON" then %>
  533.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  534.                 <tr>
  535.                   <td width="7%" class="formheadings">&nbsp;</td>
  536.                   <td width="93%" class="formheadings">&nbsp;</td>
  537.                 </tr>
  538.                 <tr>
  539.                   <td width="7%" valign="top">
  540.                   <input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:WP:"></td>
  541.                   <td class="formheadings" width="93%"><%=getsystext("sys56")%></td>
  542.                 </tr>                
  543.                 <tr>
  544.                   <td width="7%" class="formheadings">&nbsp;</td>
  545.                   <td width="93%" align="left"><img border="0" src="img/worldpay-logo.gif"></td>
  546.                 </tr>
  547.                                 <tr>
  548.                   <td width="7%" class="formheadings">&nbsp;</td>
  549.                   <td width="93%" align="left"></td>
  550.                 </tr>
  551.  
  552.               </table>
  553.               <% end if %>  
  554.               <% if instr(gatewayname,":LP:")>0 and gatewayen="ON" then %>
  555.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  556.                 <tr>
  557.                   <td width="7%" valign="top">
  558.                   <input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:LP:"></td>
  559.                   <td class="formheadings" width="93%"><%=getsystext("sys57")%></td>
  560.                 </tr>
  561.               </table>             
  562.              <!-- <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  563.                 <tr>
  564.                   <td width="7%" class="formheadings">&nbsp;</td>
  565.                   <td width="93%" align="left"><img border="0" src="img/none.gif"></td>
  566.                 </tr>
  567.                 <tr>
  568.                   <td width="7%" class="formheadings">&nbsp;</td>
  569.                   <td width="93%" align="left"></td>
  570.                 </tr>                
  571.  
  572.  
  573.               </table>-->
  574.               <% end if %>
  575.               <% if instr(gatewayname,":CG:")>0 and gatewayen="ON" then %>
  576.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  577.                 <tr>
  578.                   <td width="7%" valign="top">
  579.                   <input class="formbox" type="radio" name="method" <%=ccbox %> value="gate:CG:"></td>
  580.                   <td class="formheadings" width="93%"><%=getsystext("sys116")%></td>
  581.                 </tr>
  582.               </table>             
  583.              <!-- <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  584.                 <tr>
  585.                   <td width="7%" class="formheadings">&nbsp;</td>
  586.                   <td width="93%" align="left"><img border="0" src="img/none.gif"></td>
  587.                 </tr>
  588.                 <tr>
  589.                   <td width="7%" class="formheadings">&nbsp;</td>
  590.                   <td width="93%" align="left"></td>
  591.                 </tr>                
  592.  
  593.  
  594.               </table>-->
  595.               <% end if %>              
  596.  
  597.  
  598.  
  599.  
  600.  
  601.                <% if showccform="YES" then %>
  602.               <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  603.  
  604.                 <tr>
  605.                   <td width="7%" valign="top">
  606.                   <input class="formbox" type="radio" name="method" <%=ccbox %> value="cc"></td>
  607.                   <td class="formheadings" width="93%"><%=getsystext("sys46")%></td>
  608.                 </tr>                
  609.               </table>
  610.               <% end if %>               
  611.  
  612.               </td>
  613.               <td width="10%" height="10">&nbsp;</td>
  614.             </tr>
  615.             <% if showccform="YES" then %>
  616.             <tr>
  617.               <td width="10%" height="21">&nbsp;</td>
  618.               <td class="formheadings" width="80%" height="21"><%=getsystext("sys47")%></td>
  619.               <td width="10%" height="21">&nbsp;</td>
  620.             </tr>
  621.             <tr>
  622.               <td width="10%"></td>
  623.               <td width="80%">
  624.               <div align="left">
  625.               <select name="cctype">
  626.               <option>GSA Card</option>
  627.               <option>GCPC Card</option>
  628.               </select></div>
  629.            </tr>
  630.             <tr>
  631.               <td width="10%" height="21">&nbsp;</td>
  632.               <td class="formheadings" width="80%" height="21"><%=getsystext("sys48")%></td>
  633.               <td width="10%" height="21">&nbsp;</td>
  634.             </tr>
  635.             <tr>
  636.               <td width="10%" height="25">&nbsp;</td>
  637.               <td width="80%" height="25">
  638.               <input class="formfield" type="text" name="ccardno" size="20" value="<%=ccardno%>"></td>
  639.               <td width="10%" height="25">&nbsp;</td>
  640.             </tr>
  641.             <% if authcccode="ON" or cvven="ON" then %>
  642.             <tr>
  643.               <td width="10%" height="21">&nbsp;</td>
  644.               <td class="formheadings" width="80%" height="21"><%=getsystext("sys49")%></td>
  645.               <td width="10%" height="21">&nbsp;</td>
  646.             </tr>
  647.             <% end if %>
  648.             <tr>
  649.               <td width="10%" height="21">&nbsp;</td>
  650.               <td class="formheadings" width="80%" height="21"><%=getsystext("sys58")%></td>
  651.               <td width="10%" height="21">&nbsp;</td>
  652.             </tr>
  653.             <tr>
  654.               <td width="10%" height="25">&nbsp;</td>
  655.               <td width="80%" height="25">
  656.               <input class="formfield" type="text" name="ccnoc" size="20" value="<%=fixhtmlform(ccnoc)%>"></td>
  657.               <td width="10%" height="25">&nbsp;</td>
  658.             </tr>
  659.             <tr>
  660.               <td width="10%" height="21">&nbsp;</td>
  661.               <td width="80%" height="21">&nbsp;</td>
  662.               <td width="10%" height="21">&nbsp;</td>
  663.             </tr>
  664.             <% end if %>
  665.             <%else%>
  666.             <input type="hidden" name="paymentdue" value="N">
  667.             <tr>
  668.               <td width="10%" height="21">&nbsp;</td>
  669.               <td width="80%" height="21">&nbsp;</td>
  670.               <td width="10%" height="21">&nbsp;</td>
  671.             </tr>
  672.             <% end if %>
  673.             <tr>
  674.               <td width="10%">&nbsp;</td>
  675.               <td width="80%" height="10">&nbsp;</td>
  676.               <td width="10%">&nbsp;</td>
  677.             </tr>
  678.             <tr>
  679.               <td width="10%">&nbsp;</td>
  680.               <td width="80%" align="center"><% showbutton "butts14",butts14,"","form" %></td>
  681.               <td width="10%">&nbsp;</td>
  682.             </tr>
  683.             <tr>
  684.               <td width="10%">&nbsp;</td>
  685.               <td width="80%" align="center" height="20">&nbsp;</td>
  686.               <td width="10%">&nbsp;</td>
  687.             </tr>
  688.             <% if hidebancorn=0 or isnull(hidebancorn) then %>
  689.             <tr>
  690.               <td width="10%" valign="bottom" align="left"><img border="0" src="img/bot_lolef.gif" width="15" height="15"></td>
  691.               <td width="80%" align="center" height="10">&nbsp;</td>
  692.               <td width="10%" valign="bottom"  align="right"><img border="0" src="img/bot_lorig.gif" width="15" height="15"></td>
  693.             </tr>
  694.             <% end if %>
  695.           </table>
  696.           </td>
  697.         </tr>
  698.       <tr>
  699.         <td width="100%" height="20"></td>
  700.       </tr>      
  701.       </form>
  702.     </table>
  703.  
  704. <% getrightside(zpage)%><!--#include file="../includes/bottom.asp"-->
  705.  
  706.  
Nov 17 '08 #8
acoder
16,027 Expert Mod 8TB
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:
Expand|Select|Wrap|Line Numbers
  1. <select ... onchange="changeText(this.value)">
Nov 17 '08 #9
tsubasa
64
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
Nov 17 '08 #10
acoder
16,027 Expert Mod 8TB
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.
Nov 17 '08 #11
tsubasa
64
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
Nov 18 '08 #12
acoder
16,027 Expert Mod 8TB
Where's the input boxes that need to have the messages above them?

1. Above those boxes, add a div:
Expand|Select|Wrap|Line Numbers
  1. <div id="msgdiv"></div>
  2. ...
  3. <div id="msgdiv2"></div>
2. Add the onchange to the select on line 624/5 passing the selected value to a function:
Expand|Select|Wrap|Line Numbers
  1. <select name="cctype" onchange="changeMsg(this.value);">
3. Now define the function in script tags:
Expand|Select|Wrap|Line Numbers
  1. function changeMsg(val) {
  2.     // if the selected value equals the first value...
  3.     if (val == "...") { // change ... to whatever value you want to compare against
  4.         // set text in first div
  5.         document.getElementById("msgdiv").innerHTML = 'whatever';
  6.         // set text in second div
  7.         document.getElementById("msgdiv2").innerHTML = 'something else';
  8.     } else {
  9.         // repeat as above for the second set of message...
  10.     }
  11. }
Nov 18 '08 #13
tsubasa
64
Ok, let me give this a try.
Nov 19 '08 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

6
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...
5
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...
1
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...
0
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...
2
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...
0
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...
0
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...
1
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...
1
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
1
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...
0
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
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...
0
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...
1
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)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.