I'm really actually just a html/css guy.
I want to insert a booking form on to my page but i got a custom link for adding the form. The link consist of just basic script and I'm told to just copy it onto my html file. The problem is i have to add it to a .php file and when i do and reload my page it shows a blank.
I have a basic div in my .php file and a div for calling an image, then my Script. Can you tell me where my problem is?
<div id="dine_oliver_cattermole" class="content_holder border"></div>
<div id="dine_oliver_cattermole" class="content_holder border">
<table class="chef_holder" width="100%">
<tr>
<td width="30%" align="left" class="dine_chef_photo"><img src="/wp-content/.." width="290" height="440" /></td>
<td width="40%" align="center" class="dine_chef_text">
<h2>The Tasting Room’s Guiding Principles:</h2>
<h3>-</h3>
<h3>Please allow 31⁄2 hours for this menu.</h3><br />
<p>We do not have a dress code, you dress for the experience you.</p>
<p>Only open for dinner Tuesday</p>
</td>
</tr>
</table>
</div>
<!-- Start Bookatable Code -->
<script type="text/javascript" src="http://ajax...."></script>
<script type="text/javascript" src="https://bda...."></script>
<a id="target" href="#">Book Online</a>
<script type="text/javascript">
$(function () {
$("#target").lbuiDirect({
connectionid : "LITH",
popupWindow : {enabled : true}
});
});
</script>
<!-- End Bookatable Code -->
Also got his code to use, but displaying blank.
<!-- Start Bookatable Code -->
<script type="text/javascript" src="https://bda....."></script>
<script type="text/javascript">
LBDirect_Embed({
connectionid : "ZA-RES-THELIVINGROOMATLEQUARTIERFRANCAIS_283714:67970"
});
</script>
<!-- End Bookatable Code
<div id="dine_oliver_cattermole" class="content_holder border"></div>
<div id="dine_oliver_cattermole" class="content_holder border">
<table class="chef_holder" width="100%">
<tr>
<td width="30%" align="left" class="dine_chef_photo"><img src="/wp-content/.." width="290" height="440" /></td>
<td width="40%" align="center" class="dine_chef_text">
<h2>The Tasting Room’s Guiding Principles:</h2>
<h3>-</h3>
<h3>Please allow 31⁄2 hours for this menu.</h3><br />
<p>We do not have a dress code, you dress for the experience you.</p>
<p>Only open for dinner Tuesday</p>
</td>
</tr>
-
Are you running your page on a server ?Relisora– Relisora2016年08月08日 08:55:49 +00:00Commented Aug 8, 2016 at 8:55
-
1If you're not using php just call it .html and it should be fineRoy– Roy2016年08月08日 08:55:52 +00:00Commented Aug 8, 2016 at 8:55
-
There's nothing there that requires it to be a php page. The only questions I would have are whether or not jQuery is included further up the page, and whether or not the 2 script URLs that we can see are truncated just in the question, or if they're like that in the page.Reinstate Monica Cellio– Reinstate Monica Cellio2016年08月08日 08:59:30 +00:00Commented Aug 8, 2016 at 8:59
-
yess im running the page on a server, working on staging site at the moment. all the files for website is .php , cant change the format.Ylama– Ylama2016年08月08日 09:01:46 +00:00Commented Aug 8, 2016 at 9:01
-
1Then you need to go back to that person and tell them they forgot to tell you something, or ask them for the docuemtation for this scriptRiggsFolly– RiggsFolly2016年08月08日 09:23:30 +00:00Commented Aug 8, 2016 at 9:23
1 Answer 1
@PalDev @Adder @RiggsFolly Thanks so much, at the end i as you mentioned it looks fine for a html file so i just used the html file coping it into this directory and on one of my page hooks I called the html using an iframe. It called the script succefully.
so my .html file helds the script:
<!-- Start Bookatable Code -->
<script type="text/javascript" src="https://bda.book..."></script>
<script type="text/javascript">
LBDirect_Embed({
connectionid : "ZA-RES-THELIVINGROOMATLEQUARTIERFRANCAIS_283714:67970"
});
</script>
<!-- End Bookatable Code -->
Then my page.php hooks the following page part_page-info.php which contains the iframe calling my .html file:
<td width="30%" align="right">
<iframe style="display: block; width: 100%; height: 404px;" src="/wp-content/theme/leeu/content/leeu-test/tasting-room/test.html"></iframe>
</td>
This then displays the JavaScript i was looking for.(im just mentioning i think i did not work because all the other pages im not mentioning thats also been called and hooked from page.php has JavaScript interrupting the Script im trying to use).This was my easy solution around it.