使用这个开源文件: https://raw.github.com/openemr/openemr/master/interface/billing/sl_eob_search.php自动提交表单无法正常工作
我想要做的自动提交表单并没有响应。
我使用作为参考这个Auto populate form and auto submit with URL Parameters
这是我想做些什么 - 提交URL参数,但不工作。
修订
月1日我加入一个ID,<form>
,留在文本框不变“价值”,因为我通过URL传递这些价值。
<form method='post' action='sl_eob_search.php' id='search_invoice'
enctype='multipart/form-data'>
.
.
.
<td>
<input type='text' name='form_pid' size='10'
value='<?php echo $_POST['form_pid']; ?>'
title='<?php xl("Patient chart ID","e"); ?>'>
</td>
<td>
<?php xl('Encounter:','e'); ?>
</td>
<td>
<input type='text' name='form_encounter' size='10'
value='<?php echo $_POST['form_encounter']; ?>'
title='<?php xl("Encounter number","e"); ?>'>
</td>
.
.
.
<td>
<input type='submit' name='form_search' id='search'
value='<?php xl("Search","e"); ?>'>
</td>
.
.
.
</form>
提交按钮
我添加了一个 “id” 属性,以及</form>
后关闭:
<script type="text/javascript">
$(document).ready(function() {
$("#search").submit();
});
</script>
它没有工作...然后就去叫了形式id
:
document.forms['search_invoice'].submit();
没有任何反应。
,请复制粘贴,你正面临着错误的相关代码 – Roopendra
查看您接受问题的接受答案,在那里您可以看到您需要选择表单并调用sumbit。你尝试过吗?我一直无法在您链接的代码中找到它。告诉我们你做了什么,它是如何“不起作用”(它是否产生错误或什么?)。 – Theraot
修正了我的问题,没有错误,它只是不会显示任何内容 - 就像手动点击“搜索”一样 – user2031297