Link to home
Start Free TrialLog in
Avatar of Silas2
Silas2

asked on

<a href missunderstanding

I've got an <a href which is a grid row, embedded in a form, the form action is "admin/customer/list" the anchor renders as
<a href='Edit/8323' >Edit</a>

Open in new window


in fiddler, the postback url is 'admin/customer/edit/8323', how is this possible?
SOLUTION
Avatar of Dante Gagliardi
Dante Gagliardi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Silas2
Silas2

ASKER

Ok, but even after reading that link i'm not sure  why's it lopping off the 'list' bit? Why doesn't it go to 'admin/customer/list/Edit/xxx'? Does the lack of forward slash, in an embedded anchor take off the last segment off the form's postback url?
Is "/admin/customer/list" a valid page that you can navigate to? The browser expects it to be, and so it removes the last entry before adding any relative path to the link.

If you want to end up at "/admin/customer/list/Edit/xxx", you should try adding the whole link to the form action, and use a <button type="submit"> ... </button> instead of the anchor.
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial