Submit form without page reloading

后端 未结 17 2852
无人及你
无人及你 2020-11-22 00:45

I have a classifieds website, and on the page where ads are showed, I am creating a \"Send a tip to a friend\" form...

So anybody who wants can send a tip of the ad

17条回答
  •  天命终不由人
    2020-11-22 01:11

    this is exactly how it CAN work without jQuery and AJAX and it's working very well using a simple iFrame. I LOVE IT, works in Opera10, FF3 and IE6. Thanks to some of the above posters pointing me the right direction, that's the only reason I am posting here:

    
    
     
    
    
    

    the php code generating the page that is being called above:

    if( $_GET['p'] == 'addProductToPage' ){  // hidden form processing
      if(!empty($_POST['iAddToPage'])) {
        //.. do something with it.. 
      }
      print('
        
            
                
            
        
      ');
    }
    

提交回复
热议问题