From: mikezx10 on
I have a page that i need to sort if the user selects the sort radio
btn and then hit the link to reload the page.

I want to pass a 1 in the querystring for sort if the rb is checked
and no querystring if the rb isnt checked.

How can i do this?
also once the rb is selected when i click it a second time it doesnt
unselect

I just inherited a classic asp site and have 1 week experiance so all
the help u can give apreciated

Thanks!
<%@ Language=VBScript %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<%
dim sort, strSQL
sort=Request.QueryString("sort")

if sort=1 then
strSQL = strSQL & "ORDER BY Date Desc"
else
strSQL = strSQL & "ORDER BY fName"
end if
%>

<div id="SelFra" style="POSITION: absolute; WIDTH: 100%;">
<table width ="100%" border="0" cellspacing="0" align="center" >
<tr bgcolor="#aeaeae" >
<td style="width:200px;">&nbsp;&nbsp;
<input type="radio" name="rbSort" value="0"
<% IF sort=1 then Response.Write "Checked" end if %> /
>&nbsp;&nbsp;Sort by Account Size&nbsp;&nbsp;
</td>
<td>
<a href="Default22.asp?sort=1" >Image</a>
</td>
</tr>
</table>
</div>
</body>
</html>
From: Bob Barrows on
mikezx10(a)hotmail.com wrote:
> I have a page that i need to sort if the user selects the sort radio
> btn and then hit the link to reload the page.
>
This is an ASP newsgroup dealing with question about server-side scripting,
so finding someone to help with a client-side coding question would probably
be easier if you posted it to a client-side scripting newsgroup like
m.p.scripting.jscript or comp.lang.javascript

Incidently, I think the term you were looking for is "submit the form"
rather than "reload the page".


--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


From: mikezx10 on
This is asp 3.0 code, that is server side is it not?
what i am doing is changing the sql that will be executed if a radio
button is select.



On Mar 21, 10:22 am, "Bob Barrows" <reb01...(a)NOyahoo.SPAMcom> wrote:
> mikez...(a)hotmail.com wrote:
> > I have a page that i need to sort if the user selects the sort radio
> > btn and then hit the link to reload the page.
>
> This is an ASP newsgroup dealing with question about server-side scripting,
> so finding someone to help with a client-side coding question would probably
> be easier if you posted it to a client-side scripting newsgroup like
> m.p.scripting.jscript or comp.lang.javascript
>
> Incidently, I think the term you were looking for is "submit the form"
> rather than "reload the page".
>
> --
> Microsoft MVP - ASP/ASP.NET - 2004-2007
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"

From: Bob Barrows on
Some of it is. The part that you are asking about (using a radio button to
set the querystring portion of a querystring) will have to occur entirely on
the client. You would have the same question if your page's extension was
..htm and it did not contain any server-side code, would you not?

Think of it this way: ASP is server-side technology whose sole purpose is to
use information contained in the Request to generate html to be sent to the
client. You can see the generated html by using your browser to view the
source. Once the html is sent to the client, everything that occurs after
that point is client-side programming and out of scope of this newsgroup.

I am not intending this as a rebuke so there is no need for you to get
defensive. I am simply trying to help you get the answer to your question in
the most effective way possible.

mikezx10(a)hotmail.com wrote:
> This is asp 3.0 code, that is server side is it not?
> what i am doing is changing the sql that will be executed if a radio
> button is select.
>
>
>
> On Mar 21, 10:22 am, "Bob Barrows" <reb01...(a)NOyahoo.SPAMcom> wrote:
>> mikez...(a)hotmail.com wrote:
>>> I have a page that i need to sort if the user selects the sort radio
>>> btn and then hit the link to reload the page.
>>
>> This is an ASP newsgroup dealing with question about server-side
>> scripting, so finding someone to help with a client-side coding
>> question would probably be easier if you posted it to a client-side
>> scripting newsgroup like m.p.scripting.jscript or
>> comp.lang.javascript
>>
>> Incidently, I think the term you were looking for is "submit the
>> form" rather than "reload the page".
>>
>> --
>> Microsoft MVP - ASP/ASP.NET - 2004-2007
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


From: mikezx10 on
Ok read the whole thing, 1st thanks so much for the time to give such
a detailed comment.

I didnt know xhtml was the case and i cant really change every thing
being the person that created the page is still with the company and
it would be bad protocol.

i think what i really needed to do was check what radio button was
checked and then set the sql

I think if i redo the page with a check box not a radio button and
then at the begining check if the check box was checked that would be
the answer.

Sorry for the day 1 questions but how do u check if a check box is
cheched?