Barry G. Sumpter
|
Posted: 05/24/2002, 11:24 PM |
|
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C20411.40A05640
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all,
OK, I've hacked a bit of code in my Bug Tracking app.
The default page shows a search form and a grid form of bugs.
I'd like to trap the after click on my grids hyperlink and check the =
status_id of the record.
However, I can't seem to figure out how. Perhaps you can't?
So I've hacked the the follwing check into my =
BugRecord.BeforeShow.ASP:
select case fldstatus_id
case 8 'Ready To Test
response.redirect "BugRecordReadyToTest.ASP"
end select
The BugRecordReadyToTest.ASP shows up properly but without the =
proper data.
=20
what I'd like to do is something like this:
response.redirect "BugRecordReadyToTest.ASP" & =
getparamaters()
Could someone please tell me how to pull the parameters list down =
and use it to send it with the redirect?
Thanks,
Barry G. Sumpter
------=_NextPart_000_0008_01C20411.40A05640
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> OK, I've hacked a =
bit of code in=20
my Bug Tracking app.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> The default page =
shows a search=20
form and a grid form of bugs.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> I'd like to trap the =
after click=20
on my grids hyperlink and check the status_id of the =
record.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
However, I=20
can't seem to figure out how. Perhaps you can't?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> So I've hacked the =
the follwing=20
check into my BugRecord.BeforeShow.ASP:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
select case fldstatus_id</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
case 8 'Ready To Test</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
=
response.redirect=20
"BugRecordReadyToTest.ASP"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
end select</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> The =
BugRecordReadyToTest.ASP=20
shows up properly but without the proper data.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2> what I'd like to do =
is something=20
like this:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2> =20
=
response.redirect=20
"BugRecordReadyToTest.ASP" & getparamaters()</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> Could someone please tell me how to pull the =
parameters=20
list down and use it to send it with the redirect?</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV> Barry G. =
Sumpter</DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C20411.40A05640--
|
|
|
Barry G. Sumpter
|
Posted: 05/26/2002, 1:56 AM |
|
This is a multi-part message in MIME format.
------=_NextPart_000_002D_01C204EF.9E9C3F50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Solution:
Select Case fldstatus_id
Case 8 'Ready To Test
response.redirect "BugRecordReadyToTest.asp?" & =
Request.QueryString
End Select
Hi Everyone,
Thanks for all the help on this one!
Hi Novices,
How I sorted this out:
On my Default Page (which is really my Bug Search/Grid Page)
| Edit Files ( on the tool bar ) | default.ASP
in the following subroutine:
Sub Bugs_Show()
I found the following
SetVar "TransitParams", "BugType_id=3D" & =
ToURL(GetParam("BugType_id")) & "&assigned_to=3D" & =
ToURL(GetParam("assigned_to")) & "&bug_name=3D" & =
ToURL(GetParam("bug_name")) & "&priority_id=3D" & =
ToURL(GetParam("priority_id")) & "&project_id=3D" & =
ToURL(GetParam("project_id")) & "&status_id=3D" & =
ToURL(GetParam("status_id")) & "&"
SetVar "FormParams", "BugType_id=3D" & =
ToURL(GetParam("BugType_id")) & "&assigned_to=3D" & =
ToURL(GetParam("assigned_to")) & "&bug_name=3D" & =
ToURL(GetParam("bug_name")) & "&priority_id=3D" & =
ToURL(GetParam("priority_id")) & "&project_id=3D" & =
ToURL(GetParam("project_id")) & "&status_id=3D" & =
ToURL(GetParam("status_id")) & "&"
Where this looks like the Bugs (grid) form uses the TransitParams =
variable to Transmit to the BugsRecord Form.
And the FormParams variable to receive from the search on the same page.
Both match my searchy criteria.
I noticed the ToURL function was being used to do something. I beleive =
to setup the parameters list to the hyperlinked page.
I also noticed that the ToURL function was NOT in the default.asp =
scripts.
On my search for the ToURL function I had moved to the top of the =
scripts listing and noticed the following line:
<!-- #INCLUDE FILE=3D"Common.asp" -->
So I used notepad to edit the Common.asp associated with this HelpDesk =
project.
Where I stumbled upon the following script:
'-------------------------------
' Obtain specific URL Parameter from URL string
'-------------------------------
function GetParam(ParamName)
if Request.QueryString(ParamName).Count > 0 then=20
Param =3D Request.QueryString(ParamName)
elseif Request.Form(ParamName).Count > 0 then
Param =3D Request.Form(ParamName)
else=20
Param =3D ""
end if
if Param =3D "" then
GetParam =3D Empty
else
GetParam =3D Param
end if
end function
Noticing the Request.QueryString Object and property
I looked up Request.QueryString on:
http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/iisref=
/html/psdk/asp/vbob53hj.asp
Where I deduced from the following line:
.......
If your application requires unparsed QueryString data, you can retrieve =
it by calling Request.QueryString without any parameters.
......
That the following script works as requested:
BugTracking Project | BugRecord Page | Bugs Form | Form Properties | =
Before Show.ASP
Select Case fldstatus_id
Case 8 'Ready To Test
response.redirect "BugRecordReadyToTest.asp?" & =
Request.QueryString
End Select
Which now redirects to my Ready to Test record editing page based upong =
the value of status_id.
What I learned on this exercise:
1) That I can review the ASP and HTML scripts generated by CC thru =
the CC interface.
2) That I can actually read and understand the scripts generated by =
CC. >8-0
3) The transitparams and formparams variables
4) The ToURL function
5) The Include statement - <!-- #INCLUDE FILE=3D"Common.asp" -->
6) Common.asp
7) The function GetParam(ParamName)
8) which uses the Request.QueryString =20
9) = http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/iisref=
/html/psdk/asp/vbob53hj.asp
10) Placing Response.Write "xxx event name xxx.ASP - fldstatus_id:" =
& fldstatus_id & "***"
into events helps to sort out the sequence of events and =
which event has access to the data in variables.
All in all a decent outcome.
Happy CodeCharging,
=20
Barry G. Sumpter
P.S. I'd still rather do this as a response on_click on the Bug Grids =
URL field.
Other wise I might have to create a fake page just for storing this =
select case fldstatus_id with no fields
and just redirect to another page no matter the value of =
fldstatus_id.
"Barry G. Sumpter" <bsumpter@Bigpond.net.au> wrote in message =
news:acnanb$571$1@news.codecharge.com...
Hi all,
OK, I've hacked a bit of code in my Bug Tracking app.
The default page shows a search form and a grid form of bugs.
I'd like to trap the after click on my grids hyperlink and check =
the status_id of the record.
However, I can't seem to figure out how. Perhaps you can't?
So I've hacked the the follwing check into my =
BugRecord.BeforeShow.ASP:
select case fldstatus_id
case 8 'Ready To Test
response.redirect "BugRecordReadyToTest.ASP"
end select
The BugRecordReadyToTest.ASP shows up properly but without the =
proper data.
=20
what I'd like to do is something like this:
response.redirect "BugRecordReadyToTest.ASP" & =
getparamaters()
Could someone please tell me how to pull the parameters list down =
and use it to send it with the redirect?
Thanks,
Barry G. Sumpter
------=_NextPart_000_002D_01C204EF.9E9C3F50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>Solution:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Select Case =
fldstatus_id<BR> Case=20
8 'Ready To =
Test<BR> =20
response.redirect "BugRecordReadyToTest.asp?" & =
Request.QueryString<BR>End=20
Select</FONT></DIV>
<DIV> </DIV></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Hi Everyone,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> Thanks for all the =
help on this=20
one! </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Hi Novices,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>How I sorted this out:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>On my Default Page (which is really my =
Bug=20
Search/Grid Page)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>| Edit Files ( on the tool =
bar )=20
| default.ASP</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>in the following =
subroutine:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> Sub =
Bugs_Show()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I found the following</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> SetVar=20
"TransitParams", "BugType_id=3D" & ToURL(GetParam("BugType_id")) =
&=20
"&assigned_to=3D" & ToURL(GetParam("assigned_to")) & =
"&bug_name=3D"=20
& ToURL(GetParam("bug_name")) & "&priority_id=3D" &=20
ToURL(GetParam("priority_id")) & "&project_id=3D" &=20
ToURL(GetParam("project_id")) & "&status_id=3D" &=20
ToURL(GetParam("status_id")) & "&"<BR> =
SetVar=20
"FormParams", "BugType_id=3D" & ToURL(GetParam("BugType_id")) &=20
"&assigned_to=3D" & ToURL(GetParam("assigned_to")) & =
"&bug_name=3D"=20
& ToURL(GetParam("bug_name")) & "&priority_id=3D" &=20
ToURL(GetParam("priority_id")) & "&project_id=3D" &=20
ToURL(GetParam("project_id")) & "&status_id=3D" &=20
ToURL(GetParam("status_id")) & "&"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Where this looks like the Bugs (grid) =
form uses the=20
TransitParams variable to Transmit to the BugsRecord Form.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>And the FormParams variable to receive =
from the=20
search on the same page.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Both match my searchy =
criteria.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I noticed the ToURL function was being =
used to do=20
something. I beleive to setup the parameters list to the =
hyperlinked=20
page.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I also noticed that the ToURL function =
was NOT in=20
the default.asp scripts.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>On my search for the ToURL function I =
had moved to=20
the top of the scripts listing and noticed the following =
line:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> <!-- #INCLUDE=20
FILE=3D"Common.asp" --></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>So I used notepad to edit the =
Common.asp associated=20
with this HelpDesk project.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Where I stumbled upon the following=20
script:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>'-------------------------------<BR>' =
Obtain=20
specific URL Parameter from URL=20
string<BR>'-------------------------------<BR>function=20
GetParam(ParamName)<BR> if Request.QueryString(ParamName).Count =
> 0=20
then <BR> Param =3D =
Request.QueryString(ParamName)<BR> =20
elseif Request.Form(ParamName).Count > 0 then<BR> =
Param =3D=20
Request.Form(ParamName)<BR> else <BR> Param =3D=20
""<BR> end if<BR> if Param =3D "" then<BR> =
GetParam=20
=3D Empty<BR> else<BR> GetParam =3D =
Param<BR> end=20
if<BR>end function<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Noticing the Request.QueryString Object =
and=20
property</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I looked up Request.QueryString =
on:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://msdn.microsoft.com/library/default.asp?url=3D/library/en-u=
s/iisref/html/psdk/asp/vbob53hj.asp">http://msdn.microsoft.com/library/de=
fault.asp?url=3D/library/en-us/iisref/html/psdk/asp/vbob53hj.asp</A></FON=
T></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Where I deduced from the following=20
line:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>......</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If your application requires unparsed=20
<B>QueryString</B> data, you can retrieve it by calling=20
<B>Request.QueryString</B> without any parameters.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>.....</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>That the following script works as=20
requested:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>BugTracking Project | BugRecord Page | =
Bugs Form |=20
Form Properties | Before Show.ASP</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Select Case =
fldstatus_id<BR> Case=20
8 'Ready To =
Test<BR> =20
response.redirect "BugRecordReadyToTest.asp?" & =
Request.QueryString<BR>End=20
Select</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Which now redirects to my Ready to Test =
record=20
editing page based upong the value of status_id.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>What I learned on this =
exercise:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> 1) That I can =
review the=20
ASP and HTML scripts generated by CC thru the CC interface.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 2) That I can =
actually=20
read and understand the scripts generated by CC. =
>8-0</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 3) The =
transitparams and=20
formparams variables</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 4) The ToURL=20
function</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 5) The Include =
statement - <FONT face=3DArial size=3D2><!-- #INCLUDE=20
FILE=3D"Common.asp" --></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 6) =
Common.asp</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 7) The =
function=20
GetParam(ParamName)<BR> 8) which uses the=20
Request.QueryString </FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 9) <FONT =
face=3DArial=20
size=3D2><A=20
href=3D"http://msdn.microsoft.com/library/default.asp?url=3D/library/en-u=
s/iisref/html/psdk/asp/vbob53hj.asp">http://msdn.microsoft.com/library/de=
fault.asp?url=3D/library/en-us/iisref/html/psdk/asp/vbob53hj.asp</A></FON=
T></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 10) Placing =
Response.Write "xxx=20
event name xxx.ASP - fldstatus_id:" & fldstatus_id & =
"***"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
into events helps to sort out the sequence of events =
and=20
which event has access to the data in variables.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> All in all a decent=20
outcome.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> Happy =
CodeCharging,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
Barry G.=20
Sumpter</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>P.S. I'd still rather do this as =
a response=20
on_click on the Bug Grids URL field.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> Other wise I might =
have to=20
create a fake page just for storing this select case fldstatus_id with =
no=20
fields</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> and just redirect to =
another=20
page no matter the value of fldstatus_id.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV>"Barry G. Sumpter" <<A=20
=
href=3D"mailto:bsumpter@Bigpond.net.au">bsumpter@Bigpond.net.au</A>> =
wrote in=20
message <A=20
=
href=3D"news:acnanb$571$1@news.codecharge.com">news:acnanb$571$1@news.cod=
echarge.com</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> OK, I've hacked a =
bit of code=20
in my Bug Tracking app.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> The default page =
shows a=20
search form and a grid form of bugs.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> I'd like to trap =
the after=20
click on my grids hyperlink and check the status_id of the=20
record.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
However, I=20
can't seem to figure out how. Perhaps you can't?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> So I've hacked the =
the=20
follwing check into my BugRecord.BeforeShow.ASP:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =
select case fldstatus_id</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
case 8 'Ready To =
Test</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
=
response.redirect=20
"BugRecordReadyToTest.ASP"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
end select</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> The =
BugRecordReadyToTest.ASP=20
shows up properly but without the proper data.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2> what I'd like to =
do is=20
something like this:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2> =
=
response.redirect=20
"BugRecordReadyToTest.ASP" & getparamaters()</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> Could someone please tell me how to pull the=20
parameters list down and use it to send it with the redirect?</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV> Barry G.=20
Sumpter</DIV></FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_002D_01C204EF.9E9C3F50--
|
|
|
|