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/

    评论

报告相同问题?

悬赏问题

  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计