Radio button w/ Script Wizard 
Author Message
 Radio button w/ Script Wizard

Hello,

Can anyone please help? I'm new to FrontPage & Scripting, and am having
problems getting my page working.  I have a page setup where it has a
menu that let's user chooses from 2 drop down menus and radio buttons.
I tried using the Script Wizard in Frontpage to create the event code
for the command button, but it's not working! Any ideas?? HELP!!

Effilyn Velasco



Sun, 23 Dec 2001 03:00:00 GMT  
 Radio button w/ Script Wizard
Hi Elizabeth,

Quote:

>Hello,

>Can anyone please help?

I'm afraid it's a bit hard to say what the problem is without more
information - such as what your code is, what it is supposed to do, what the
errors are, and so on. If you post again with some more information, people
might be able to help you.

Peter

--

Please don't send questions to me personally - post to the groups
JScript FAQ: http://www.netspace.net.au/~torrboy/code/jscriptfaq/



Sun, 30 Dec 2001 03:00:00 GMT  
 Radio button w/ Script Wizard
Sorry..
I have two pages, one is an html page (a form that passes the checkbox/radio
button value to asp page) and ASP page.
Here is what I have on my ASP page (using the Database Region Wizard):

SELECT commodity_web.RIVER, commodity_web.RIVERMI, commodity_web.NAVSTR,
commodity_web.CHAMBN, commodity_web.LATDEC, commodity_web.LONGDEC,
commodity_web.DISTRICT, Sum(commodity_web.TONS) AS SumOfTONS,
Sum(commodity_web.BARGES) AS SumOfBARGES, commodity_web.COMMCODE,
commodity_web.COMMDESC
FROM commodity_web
WHERE ((commodity_web.NAVSTR='%%LOCK_VAR%%') AND (
(commodity_web.COMMCODE='%%code%%') OR (commodity_web.COMMCODE='%%code%%') OR
(commodity_web.COMMCODE='%%code%%') OR
(commodity_web.COMMCODE='%%code%%') OR
(commodity_web.COMMCODE='%%code%%') OR
(commodity_web.COMMCODE='%%code%%') OR
(commodity_web.COMMCODE='%%code%%') OR
(commodity_web.COMMCODE='%%code%%') OR
(commodity_web.COMMCODE='%%code%%') OR
(commodity_web.COMMCODE='%%code%%')))
GROUP BY commodity_web.RIVER, commodity_web.RIVERMI, commodity_web.NAVSTR,
commodity_web.CHAMBN, commodity_web.LATDEC, commodity_web.LONGDEC,
commodity_web.DISTRICT, commodity_web.COMMCODE, commodity_web.COMMDESC
HAVING (((commodity_web.RIVER)='%%RIVER%%'))
ORDER BY commodity_web.COMMCODE;

And this is what I have on my html page:

<html>

<head>
<title>Ohio River Commodity Query</title>
<script LANGUAGE="JavaScript">

<!-- Begin
function checkChoice(field, i) {
if (i == 0) { // "All" checkbox selected.
if (field[0].checked == true) {
for (i = 1; i < field.length; i++)
field[i].checked = false;
   }

Quote:
}

else  {  // A checkbox other than "Any" selected.
if (field[i].checked == true) {
field[0].checked = false;
      }
   }
Quote:
}

//  End -->
</script>
</head>

<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000FF"
background="../images/yellowbk.gif">

<h5 align="left"><img src="../images/ndcbanr.gif" alt="ndcbanr.gif (16801
bytes)"
WIDTH="599" HEIGHT="92"></h5>

<p><font face="Arial" color="#0000FF"><u><small><small><strong>OHIO RIVER
COMMODITY QUERY</strong></small></small></u></font></p>

<form ACTION="ohio.asp" METHOD="POST" NAME="Tons&amp;BargesForm">
  <input type="hidden" name="LIFT" value="LIFT"><p><select SIZE="1"
NAME="LOCK_VAR">
    <option selected value="Select a Lock:">Select a Lock:</option>
    <option value="52">52</option>
    <option value="BELLEVILLE">BELLEVILLE</option>
    <option value="CANNELTON">CANNELTON</option>
    <option value="CAPTAIN ANTHONY MELDAHL">CAPTAIN ANTHONY MELDAHL</option>
    <option value="DASHIELDS">DASHIELDS</option>
    <option value="EMSWORTH">EMSWORTH</option>
    <option value="GREENUP">GREENUP</option>
    <option value="HANNIBAL">HANNIBAL</option>
    <option value="JOHN T. MYERS">JOHN T. MYERS</option>
    <option value="MARKLAND">MARKLAND</option>
    <option value="MCALPINE">MCALPINE</option>
    <option value="MONTGOMERY">MONTGOMERY</option>
    <option value="NEW CUMBERLAND">NEW CUMBERLAND</option>
    <option value="NEWBURGH">NEWBURGH</option>
    <option value="PIKE ISLAND">PIKE ISLAND</option>
    <option value="RACINE">RACINE</option>
    <option value="ROBERT C. BYRD">ROBERT C. BYRD</option>
    <option value="SMITHLAND">SMITHLAND</option>
    <option value="WILLOW ISLAND">WILLOW ISLAND</option>
  </select> &nbsp;&nbsp;&nbsp;&nbsp;</p>
  <div align="left"><p><small><strong><small><font face="Arial">Select Commodity
Code
  Description: </font></small></strong></small></p>
  </div>
</form>

<form name="pickform" action="ohio.asp" method="GET">
  <table>
    <tr>
      <td><small><strong><small><font face="Arial"><input type="checkbox"
name="code" value="*"
      onclick="checkChoice(document.pickform.code, *)" checked>All Commodity
Codes&nbsp; <br>
      <input type="checkbox" name="code" value="01"
      onclick="checkChoice(document.pickform.code, 01)">Empty Barges <br>
      <input type="checkbox" name="code" value="10"
      onclick="checkChoice(document.pickform.code, 10)">Coal, Lignite &amp; Coal
Coke <br>
      <input type="checkbox" name="code" value="20"
      onclick="checkChoice(document.pickform.code, 20)">Petroleum &amp;
Petroleum Products <br>
      <input type="checkbox" name="code" value="30"
      onclick="checkChoice(document.pickform.code, 30)">Chemicals &amp; Related
Products <br>
      <input type="checkbox" name="code" value="40"
      onclick="checkChoice(document.pickform.code, 40)">Crude Materials,
Inedible, Except Fuels <br>
      <input type="checkbox" name="code" value="50"
      onclick="checkChoice(document.pickform.code, 50)">Primary Manufactured
Goods <br>
      <input type="checkbox" name="code" value="60"
      onclick="checkChoice(document.pickform.code, 60)">Food &amp; Farm Products
<br>
      <input type="checkbox" name="code" value="70"
      onclick="checkChoice(document.pickform.code, 70)">All Manufactured
Equipment and Machinery
      <br>
      <input type="checkbox" name="code" value="80"
      onclick="checkChoice(document.pickform.code, 80)">Waste Material; Garbage,
Landfill,
      Sewage Sludge &amp; Waste Water <br>
      <input type="checkbox" name="code" value="99"
      onclick="checkChoice(document.pickform.code, 99)">Commodity is Unknown or
Cannot be
      located on this list </font></small></strong></small><p><input
LANGUAGE="VBScript"
      TYPE="submit" VALUE="QUERY" NAME="btnJump"></td>
    </tr>
  </table>
</form>
<!-- Script Size:  1.78 KB -->

<hr>

<p><strong><font face="Arial">&nbsp; <a
href="../ndc/select_form.htm">HOME</a></font></strong></p>
</body>
</html>

The problem is when I hit the QUERY button to query the database, it doesn't
return any records.  It goes to the ASP page but it returns: No Records Return.
Am not sure if the problem is coming from the checkboxes I have or from the ASP
page.  Can anyone please help?

Quote:

> Hi Elizabeth,


> >Hello,

> >Can anyone please help?

> I'm afraid it's a bit hard to say what the problem is without more
> information - such as what your code is, what it is supposed to do, what the
> errors are, and so on. If you post again with some more information, people
> might be able to help you.

> Peter

> --

> Please don't send questions to me personally - post to the groups
> JScript FAQ: http://www.netspace.net.au/~torrboy/code/jscriptfaq/



Sun, 30 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Disable button and change button value at radio

2. Create radio button set using Push Buttons?

3. How to launch button in IEAK Customization Wizard?

4. How to launch button in IEAK Customization Wizard?

5. Accessing Radio Buttons

6. How to display bit data in radio buttons?

7. radio button control

8. Values from Radio buttons

9. verify that radio button is checked

10. JavaScript/radio buttons functionality issues...

11. hiding radio buttons

12. newbie: click image, make radio button checked.

 

 
Powered by phpBB® Forum Software