Welcome Guest, Not a member yet? Register   Sign In
Problem with passing a URL as a variable to a controller
#1

[eluser]DrDave[/eluser]
I have searched all over for the answer to this but have only found about a thousand "how do I pass a variable in the url" type questions Smile

I am using jquery to grab a url from a form field and would like to be able to send it to a controller. I thought that using encodeURIComponent on the url before trying to pass it would work but I still get a 404 error.

It ends up looking like:

Code:
http://domain.com/controller/method/http% 3A % 2F % 2Fwww.url.com
which gives a 404, although
Code:
http://domain.com/controller/method/variable
doesn't. I added the spaces in the encoded url because I couldn't get it to stay encoded for the purposes of this post.

Is there something I can do to the url to allow it to be passed as a parameter to the controller?

Thanks in advance for any help!


Messages In This Thread
Problem with passing a URL as a variable to a controller - by El Forum - 07-21-2011, 03:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB