dongzecai0684 2016-06-15 05:16
浏览 80

日期选择器PhP / JQuery

I looked for answers, but I am a newbie to PhP/JQuery so the answers I found confused me further.

I have a wordpress website that contains a form with a date selector field I am trying to determine when the user selects a new date and save that date to a variable to be used somwhere else

On change doesn't work cause of the lack of focus etc...

I tried select, and that didn't do anything

In the process of trying to figur eout what I am doing wrong, I simplified the code where once it is selected it gives me a message box! the code is below: Any help is greatly appreciated!

$JScript ="<script>
jQuery('#wdform_2_element13').on('select',function() 
        {
            alert('Here');

        }
</script>"
  • 写回答

2条回答 默认 最新

  • dongqin8652 2016-06-15 06:36
    关注

    You can stop the process when your saving all your data from the form, and call a new function to save or do whatever you want to that variable.

    You can do that by pointing your form submissions to a specific file in the wp-admin directory called admin-post.php

    Take a look to this tutorial and I'm sure you will learn some basic knowledge about WP code and also the answer to your question:

    https://www.sitepoint.com/handling-post-requests-the-wordpress-way/

    评论

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services