I have an ASP page and a CREGReports002. vbs file coded to export data to
excel. I do this by building variables in a stored procedure. The ASP page
has text boxes, list boxes, and radio buttons. I also placed two buttons on
the form. One submits the form to redirect to the Crystal Web Viewer
(genCREGReports .ASP). The other one executes VB code in a vbs document that
spawns some more code to run a stored procedure with the values from the ASP
page entries that where entered into the text boxes, list boxes, and radio
buttons and the launches ExcelOut.asp to export the data. All data is
captured except for the radio buttons. How do I capture the radio button
setting without submitting the form? What is the syntax to capture the value
from the radio button?
Below is some of the code from the two documents.
<script language="vbscr ipt" type="text/vbscript"
src="VBScript/CREGReports002. vbs"></script>
<%
'Build url to pass to the next page to spawn the Crystal Report ActiveX Viewer
urlOut = ""
urlOut=urlOut & "../genCREGReports. ASP?"
urlOut=urlOut & "cmbReports =" & ReportNum 'ReportProc(obj Conn)
urlOut=urlOut & "&ReportNam e=" & ReportName 'ReportProc(obj Conn)
urlOut=urlOut & "&ReportPro c=" & ReportProcName 'ReportProc(obj Conn)
urlOut=urlOut & "&txtSOEID= " & SOEID
'Build url to pass to the export page.
urlOut2 = ""
urlOut2=urlOut2 & "ExcelOut.a sp?"
urlOut2=urlOut2 & "cmbReports =" & ReportNum 'ReportProc(obj Conn)
urlOut2=urlOut2 & "&ReportNam e=" & ReportName 'ReportProc(obj Conn)
urlOut2=urlOut2 & "&ReportPro c=" & ReportProcName 'ReportProc(obj Conn)
urlOut2=urlOut2 & "&txtSOEID= " & SOEID
urlOut2=urlOut2 & "&RadioButton2= " & Request.Form("R adioButton2") & " "
%>
<form name="form1" method="post" action="<%=urlO ut %>" id="Form1" />
<input name="Export" type="button" class="ButtonSt yle3" value="Export"
tabindex="18" onclick="Export Report('<%=urlO ut2 %>')" />
***** What is in VBScript/CREGReports002. vbs****
Sub ExportReport(ur lIn)
Dim url,w1,h1
Dim TempRadioButton 1
'TempRadioButto n1 = Request.Form("R adioButton1")
'TempRadioButto n1 =
form1.elements. item(document.f orm1.RadioButto n1).value
'TempRadioButto n1 = document.form1. RadioButton1
' If Request.form("R adioButton1")=" 1" Then
' TempRadioButton 1 = 1
' Else
' TempRadioButton 1 = 2
' End If
'
' MsgBox (TempRadioButto n1)
url=url & urlIn
url=url & "&txtAsOfDa te=" & form1.txtAsOfDa te.value
url=url & "&cmbCloser =" & form1.cmbCloser .value
url=url & "&cmbActionType =" & form1.cmbAction Type.value
url=url & "&cmbOffice =" & form1.cmbOffice .value
url=url & "&cmbOffice r=" & form1.cmbOffice r.value
url=url & "&cmbRegion =" & form1.cmbRegion .value
url=url & "&cmbUnderwrite r=" & form1.cmbUnderw riter.value
url=url & "&cmbField1 =" & form1.cmbField1 .value
url=url & "&cmbField2 =" & form1.cmbField2 .value
url=url & "&cmbField3 =" & form1.cmbField3 .value
url=url & "&cmbField4 =" & form1.cmbField4 .value
' url=url & "&RadioButton1= " & document.form1. RadioButton1
'url=url & "&RadioButton2= " & form1.RadioButt on2.value
'url=url & "&RadioButton3= " & form1.RadioButt on3.value
'url=url & "&RadioButton4= " & form1.RadioButt on4.value
'url = "ExcelOut.a sp"
MsgBox url
w1 = screen.availWid th-5
h1 = screen.availHei ght-5
Dim sName,sFeatures
sName = " "
sFeatures = "top=0, left=0, height=" & h1 & ", width=" & w1
&",scrollbars=1 "
'Window.navigat e url ,sName, sFeatures
End Sub
Hope this is clear enough to help me out.
--
Jim Quast 1 4325
On Wed, 10 Nov 2004 12:19:06 -0800, Jim Quast
<Ji******@discu ssions.microsof t.com> wrote: How do I capture the radio button setting without submitting the form?
In ASP you can't. Until you submit, nothing is sent to the server to
be processed. Probably can do it multiple ways in client-side code,
try a client-side group such as a Javascript group.
What is the syntax to capture the value from the radio button?
Again, client side, unless you mean get the radio button response from
the from, which would depend on you using a POST or GET. In which
case you'd use Request.Form or Request.Queryst ring respectively.
Jeff This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: JR |
last post by:
Hi. I hope someone out there who is more versed with JavaScript than
I can help me with the following annoying problem. Here's the
problem.
I have a form with the following layout:
Column A Column B Column C
data 4 radio buttons more data
.... ... ...
.... ... ...
|
by: Jared |
last post by:
Radio Button or Check Box and Event Procedures
I need to insert either radio buttons or check boxes onto my form. I'm
not sure which to use, or if there are other options. I am using the
buttons to: if one is clicked, its corresponding information will
become available on another document, if it's not clicked no
information will be provided. If multiple buttons are clicked their
information will available on the same document.
I'm not...
|
by: tshad |
last post by:
I have 2 radio buttons:
<asp:RadioButton ID="radDetail" GroupName="detailSummary"
Text="Detail" checkedChanged="RadDetail_Clicked" runat="server" />
<asp:RadioButton ID="radSummary" GroupName="detailSummary"
Text="Summary" checkedChanged="RadSummary_Clicked" runat="server" />
</p>
I want to have RadDetail_Click or RadSummary_Click executed as soon as the
radio button is clicked.
|
by: Shadow Lynx |
last post by:
In standard HTML, the <INPUT type="radio" name="x" /control only
allows one radio button to be checked at a time. When more than one
are set as checked="true" then only the last one rendered appears as
checked. I would assume that asp:RadioButton objects that share the
same GroupName would not allow more than one Radio Button to be checked
(similar to the Radio Button List) but it seems to not be the case. If
I set one Radio Button's...
|
by: Shane |
last post by:
I think that I found a bug in the Radio Button, and I wanted to give
everybody a "Heads Up". I spent three days doing trial and error until
I found a work around.
I created a user control with a text box and two radio buttons. The
text box has the TabStop = True, and both radio buttons have TabStop =
False. The radio buttons are set to false so that a Tab (or captured
Enter) may tab to the next control. The appropriate radio button is...
| |
by: IchBin |
last post by:
I am trying to set the state of a radio button. I do not see what I am
doing wrong. Sorry, I am new at this.. I need another set of eyes to
look at this snip of code. I am trying to set the radio button with this
link of code:
echo 'SCRIPT language=JavaScript
setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //?
<snip of code>
|
by: IchBin |
last post by:
I am trying to programmatically set a radio button in a table of radio
buttons. I have two problems with the code below:
1 - I can not prepare the <Formstatement to be printed by php.
(syntax of the hyphens, quotes) my fault!
2 - If I delete the <Formand </Formstatements I can build the table
of radio buttons correctly, HTML wise. The fifth radio button has
'checked=True'. The problem is even though I set radio button 5 to be...
|
by: teddysnips |
last post by:
Back in the dim mists of antiquity I used to program in VBA for
Microsoft Access (hey, don't knock it - very useful tool for the right
application).
This had a really handy control in the toolbox called an Option
Group. It could contain any number of radio buttons (which Access
called Option Buttons), each of which had a "value" property. The
Option Group as a whole had a property equal to the value of the
selected radio button. Thus...
|
by: liltwese |
last post by:
Hi, i'm new to VB. I have a problem with de-selecting radio buttons in group box containers. I've tried to set focus to other objects under Sub New (initialization) but it didn't work. The rdo buttons were still selected.
I've tried setting this: rdoName.Checked = False, as well, that didn't work. For some reason the top radio button in the group box is always selected!
I've also tried setting the rdoName.AutoCheck = False. That works....
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |