I would like to add a button into my fancybox which will call a server method.
could you please help me?
I’m using fancyBox2.
thanks
I would like to add a button into my fancybox which will call a
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s quite simple actually. It’s a plain server call. Lets imagine you want to interrogate the following url (which renders some json) : http://echo.jsontest.com/key/value/one/two
Then you just need to bind the server call on the click event of your button. Something like this:
Or a plain ajax call, if you request something else than json : http://api.jquery.com/jQuery.ajax/
You can find a functional sample here : http://jsfiddle.net/xavier_seignard/2MDpe/2/
I think you’ll have all the keys you need.
Regards