I've hit something of a snag, and rather than revert to using a form, I'd like to see if I can make this work. I'm using an onclick event to add a value to a database, part of which is a url. Here's my code;
<a onclick="$(this).load(encodeURI('a_addprice.cfm?productid=#productid#&price=#price#&stockstatus=#stockstatus#&deeplink=#deeplink#&provider=#provider#&supplier_name=#supplier_name#&itemref=#itemref#&storeid=#storeid#'));">Add</a>
(the hashtags are related to my backend language, Coldfusion - for those that are unaware)
In plain HTML, this is how it would look;
<a onclick="$(this).load(encodeURI('a_addprice.cfm?productid=1&price=10.99&stockstatus=In Stock&deeplink=http://www.supplier.com/?product=1&something=2&provider=providername&supplier_name=supplier_name&itemref=ABC1&storeid=123'));">Add</a>
The problem I'm having is with this part (deeplink);
http://www.supplier.com/?product=1&something=2
When the action is performed, it's ignoring everything in the URL past ?product=1. Of course, this makes sense because of the way the URL is structured - if it didn't, it would also be adding '&provider=... etc as part of the deeplink too.
What I'd like to know is whether there is a way I can still use this method, perhaps isolating the deeplink aspect so its included in full.
The page this is included on has around 100 rows like this, so I'm basically trying to avoid having 100 forms, together with all the extra hidden variables each form would need.