我目前正在尝试将我的一个模板(test.blade.php)组合到一个新的视图页面,其中包含一个按钮,单击该按钮时将显示弹出窗体。但出于某些原因,当我这样做时,只有一些信息来自test.blade.php。即使按钮丢失了,但如果我将包含('测试')放在另一个位置,它将显示按钮,但显示的信息较少。
以下是代码:
evaltest.blade.php(div_show这将显示表格)
<html>
<head>
<title>Popup form </title>
<meta name="robots" content="noindex, nofollow">
<link href="{{ asset('css/elements.css') }}" rel="stylesheet">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-43981329-1']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<!-- body starts here -->
<body id ="bdy" style="overflow:hidden;">
<div id="abc">
<!-- Popup div starts here -->
<div id="popupContact">
<!-- contact us form -->
<form class="form-horizontal" method="post" action="{{ url('/evaltest/'.$data0->id) }}">
{{ csrf_field() }}
<img id ="close" src="{{ URL::to('/image') }}/3.png" onclick ="div_hide()">
<input type="hidden" name="user_id" value="{{$data0->id}}">
<div class="form-group">
<label class="col-md-2"><b>Recommendation:</b></label>
<div class="col-md-6">
<input type="radio" id ="recommendation" name="recommendation" value="Yes"> Yes<br>
<input type="radio" id ="recommendation" name="recommendation" value="No"> No<br>
</div>
</div>
<div class="form-group">
<div class="col-md-6-offset-2">
<input id= "submit" type="submit" href="javascript: check_empty()" class="btn btn-primary" value="Save">
</div>
</div>
</form>
</div>
<!-- Popup Div Ends Here -->
</div>
<!-- Display Popup Button -->
//this will show a few info but no button
@include('test')
<h1>Click Button to Evaluate</h1>
<button id="popup" onclick="div_show()">Popup</button>
<script src="{{ asset('/js/my_js.js') }}"></script>
//this will show even lesser info but button is shown
//@include('test')
</body>
</html>
test.blade.php(里面有更多信息,但我只把一些信息作为我获取信息的例子)
@foreach ($data as $object)
<b>Name: </b>{{ $object->Name }}<br><br>
<b>Alias: </b>{{ $object->Alias }}<br><br>
<b>Email: </b>{{$object->Email}}<br><br>
@endforeach
这是test.blade.php的截图,我希望它与evaltest.blade.php一起使用
正如你在test.blade.php中看到的那样,有一个滚动条包含其他类型的信息,它还包含许多其他信息,但evaltest.blade.php只显示了一些,但当我查看页面源代码时evaltest.blade.php,它显示所有数据都已加载
答案 0 :(得分:1)
问题必须出在您的elements.css
文件中。那里有一个修正高度或类似东西的风格规则。