Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Send form using Jquery without a form

Let's say I have images that have a numeric id, when someone clicks the image I want to POST the id in variable iCFG. I'm forced to make a POST form otherwise I have to change lots of things to the GET method.

I don't want the result to be returned on the same page, but just open the page configuration(same as you would send an HTML form).

I've tried several solutions that didn't work out as I expected eg:
Code
    $(".selectinterface img").click(function(){
        $.post("configuration.php", { iCFG: $(this).attr('id') } );
    });

Any help would be greatly appreciated.
That should work unless you have an error. Did you try debugging it?
Thanks for your reply.

The example sends the post variable, but it doesn't change the browser location to configuration.php and that's the thing I want like I said.

Quote:I don't want the result to be returned on the same page, but just open the page configuration(same as you would send an HTML form).
I think this solves your problem: http://stackoverflow.com/questions/83896...ipt-jquery
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
Thanks a lot kript0x, exactly what I needed! ;)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Help] by RezyOct 15, 2016 09:37 AM 8 212 Oct 15, 2016 09:37 AM
Last Post: Rezy
by D Double EJul 9, 2012 01:00 PM 3 134 Jul 9, 2012 01:00 PM
Last Post: tinkerman2000
by DashPHPMay 11, 2012 12:43 PM 5 155 May 11, 2012 12:43 PM
Last Post: tinkerman2000