Forums
This topic is locked
MX / ASPVBScript Update Record Server Behaviour
27 Jul 2005 18:54:16 Emma Gale posted:
Couple of weeks ago I had a problem with my GO TO PAGE server behaviours passing more than the requried URL variables to the next pages. This has been solved. Now I have realised that if I use the UDATE RECORD server behaviour this is also passing variables. I puzzled out what needed to be changed in the GO TO PAGE behaviour but im having a problem this time becuase it is not very straight forward. www.s114085044.websitehome.co.uk/RiskRegister/logon.asp
username: manager password: manager department code: 382
If you go to risks and select the first risk and then select "view actions". Choose the first action on that list which takes you into the detail page where you can modify the current data and press the submit button. What is passed back to the list of actions in the URL, is the department, risk id and action id. I want only the department and risk ID to be saved in the URL at this point so that when you select a different action on the action list only the department ID and risk id are in the URL.
I think there are two places which might be the culprit and it is more likely the second:
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"

If (Request.QueryString <> ""

MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
or
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> ""

If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> ""

MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
I think that it has something to do with the second and third "MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString" above because I think the URL variables are being added to the URL plus next variable. I have fiddled withe the code though and Im not having much luck. Im not a competent programmer by the way.
I hope the above is clear and would be really grateul if someone could take a look and help me get this problem solved.
With best wishes
emma
Replies
Replied 28 Jul 2005 01:39:54
28 Jul 2005 01:39:54 Rene Bandsma replied:
Most of the time it is not neccesary to create an GO TO (DETAIL) page because you can also hand code this by inserting the Id in your hyperlink.
<pre id=code><font face=courier size=2 id=code>
mysite.asp?Id=<%=RecordSet1.Fields.Item("Id"
.Value%>
</font id=code></pre id=code>
<hr><b>DMXZone support manager</b><br><a href="www.kousman.nl">Kousman web resellers</a>
<pre id=code><font face=courier size=2 id=code>
mysite.asp?Id=<%=RecordSet1.Fields.Item("Id"

</font id=code></pre id=code>
<hr><b>DMXZone support manager</b><br><a href="www.kousman.nl">Kousman web resellers</a>
Replied 03 Aug 2005 17:32:27
03 Aug 2005 17:32:27 Emma Gale replied:
Thank you for your reply. That was what i found was wrong with the origional GO TO PAGE code. I tweaked this and it allowed me just to include the variables i want.
Unfortunately I need the UPDATE Record server behaviour because I do not know how to code this myself and it seems to be here that the duplicate variable is being carried over.
I look forward to anyone being able to help me.
Kind regards
Emma
Unfortunately I need the UPDATE Record server behaviour because I do not know how to code this myself and it seems to be here that the duplicate variable is being carried over.
I look forward to anyone being able to help me.
Kind regards
Emma