Use hidden iframe to submit data

喜你入骨 提交于 2019-12-01 20:26:33

You'll need to set the target to the iframe you want to submit it to.

<form action='...' name='theform' target='theiframe'>
  . 
  .
  .
  <iframe name='theiframe' src='...'> 
  </iframe>
</form>

This forum post has some details : http://forums.powweb.com/showthread.php?t=77213

Hm, which way do you want to sent the data using your iframe? I think you're limited to either GET or POST there, too. Means, if your data is too large, the iframe won't help sending your data.

What server backend do you use? You might be able to configure the maximum size of request data (post / get).

Please have a look at this message for more information about this.

In my eyes, using the hidden Iframe method is very old school, almost like before the great days of Ajax methods.

You can use jquery Ajax call and serialize your full form passing all variables. Remember to check your request size in your config, in case it post reaches maximum size.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!