Problem with href in a button input control

Results 1 to 2 of 2

Thread: Problem with href in a button input control

  1. #1
    Join Date
    Dec 1969

    Default Problem with href in a button input control

    ive run into a weird problem... this is the code i used in a confirmation page after editing a database record:<BR><BR>&#060;%URL = "..search_results.asp" & session("Search")%&#062;<BR>&#060;a href="&#060;%=URL%&#062;"&#062;Return to the search results page&#060;/a&#062;<BR><BR>the session variable "Search" contains the querystring required to display the search results<BR>currently the possible path is this:<BR><BR>search -&#062; search results -&#062; record edit page -&#062; edit confirm page -&#062; search results<BR><BR>since the record edit page has a cancel button, the logical page to display would be the search results with the same querystring used in the original search...i cant use the "back" option since the record edit page validates the edition when you post, so it can loop on itself until the record edition is correct...<BR>so i used this code for the cancel button:<BR><BR>&#060;%URL = "..search_results.asp" & session("Search")%&#062;<BR>&#060;input type="button" name="redirect" value="Cancel" onClick="location.href=&#039;&#060;%=URL%&#062;&#0 39;"&#062;<BR><BR>this is pretty much the same code as the first one, except the url comes up as:<BR><BR>"inventory/newEDR/..search_results.asp?EquipmentType=1&SerialNo=&Use rName=0&hidEqType=Blackberry&hidUserName=All"<BR>< BR>it doesnt go back to the parent directory even with the "..\" part...even though it works in the anchor from the edit confirm page<BR>is there a different syntax to go back to the parent directory in a location.href than in a regular anchor&#039;s href?

  2. #2
    Join Date
    Dec 1969

    Default RE: Problem with href in a button input control

    "" should be "../search"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts