【发布时间】:2015-07-26 08:09:39
【问题描述】:
我正在学习 PHP/JavaScript,我需要一些帮助:我的 HTML 和 PHP 编码:
<h1>ItemsAreSh1t V<?= ItemsAreSh1t_version ?></h1>
<form method="post">
<input type="checkbox" name="dorun" value="run" <?= isset($settings['dorun']) ? 'checked' : ''; ?>> Run<br>
Codes of the items:
Separate with | - ie. AJK|c1K|d01<br><textarea name="giftcodes" cols="50"><? = $settings['giftcodes']; ?></textarea><br/>
<input type="submit" name="save" value="Save Settings">
</form>
<form id="frmsearch" method="post" name="form_search" onsubmit="xmlhttpPost('index.php', 'form_search', 'searchresults', '', '<img src=\'img/indicator.white_1.gif\'>'); return false;">
<input type="hidden" name="formtype" value="search"> <b>Search:</b>
<input type="text" size=10 name="search">
<select name="type">
<option value="any">Any</option>
<option value="animal">Animal</option>
<option value="tree">Tree</option>
<option value="building">Building</option>
<option value="decoration">Ring/Deco</option>
<option value="vehicle">Vehicle</option>
</select>
<input type="hidden" name="userId" value="<?= $_SESSION['userId']; ?>">
<input type="submit" name="submit" value="Search"></form>
</div>
<div id="searchresults"></div>
并且还使用 JavaScript 来清除搜索结果:
<script type="text/javascript" src="/js/ajaxsbmt.js"></script>
<script type="text/javascript">
function ClearSearch(id){
obj = document.getElementById(id);
obj.innerHTML = "";
}
</script>
在 PHP 中清除搜索结果:
echo '<a href="#" onclick="ClearSearch(\'searchresults\');">Clear Search Results</a>'; #on click clear result
现在,我想在带有表格设计的弹出窗口中获取搜索结果...
【问题讨论】:
-
你能告诉我们你已经尝试了什么吗?
-
不知道......对不起!
-
@Juergen 正如我的朋友所说,请提供任何解决方案/建议。
-
我正在阅读和阅读现在
http://stackoverflow.com/questions/2109205/open-window-in-javascript-with-html-inserted但我不知道该怎么做,因为这种情况不同:( .