Trying to open a form into an html file - php

I have this open source project, written in php, and I am trying to modify the code. I added some tabs and I want to load a form when a tab is selected. The project is OpenEMR.
<?php
if($focustype=='allergy'){
?>
<div id="container">
<ul class="tabNav">
<li class="current">Medical Implants</li>
</ul>
<div class="tabContainer">
<div class="tab current">
<p><a id="cod2" onclick="return loadFrame2('cod2','RBot','patient_file/encounter/load_form.php?formname=LBFclinicalPD')" href="" style="color: rgb(0, 0, 0);">Patient Clinical Data</a><p>
</div>
</div>
</div>
<?php
The problem is that it doesn't work. It seems to be loading for a second and then nothing.
Thank you in advance

Try this:
<a id="cod2" onclick="loadFrame2('cod2','RBot','patient_file/encounter/load_form.php?formname=LBFclinicalPD');return false;" href="#" style="color: rgb(0, 0, 0);">Patient Clinical Data</a>

Related

Ultimate Member login Shortcodes for dropdown login form not working

I create a drop down button for Wordpress plugin ultimate member login form. It's working correctly inside the content page, but when i paste these codes outside i mean in header.php it's not show login form.I'm also using restricted content code of ultimate member.Please any one help me.
Thanks in Advance.
Problem
Inside content page of wordpress working 100% correct
<div style="width:120px; background:lightgrey;" class="ld-en">
<div class="col-md-1"><h4>Hello</h4></div>
<div class="col-md-2">[um_loggedin show_lock=no] <h4 style="color:red;padding-left:15px;">{first_name} </h4>
[/um_loggedin]</div>
<div class="col-md-2">[um_loggedout] <div class="dropdown"> <button class="login-drop dropdown-toggle" id="menu1" type="button" data-toggle="dropdown"> Log In<span class="caret"></span></button>
<div class="dropdown-menu login-dropdown" role="menu" aria-labelledby="menu1"> [ultimatemember form_id=287]
<ul class="login-dropdown">
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="">Register</a></li>
</ul></div>
</div> [/um_loggedout]</div>
</div>
You have to use do_short_code() for each short code you have used in your file
check this out check how to use it
for example
<div style="width:120px; background:lightgrey;" class="ld-en">
<div class="col-md-1"><h4>Hello</h4></div>
<div class="col-md-2"><?php echo do_shortcode( '[um_loggedin show_lock=no]' ); ?> <h4 style="color:red;padding-left:15px;">{first_name} </h4>
<?php echo do_shortcode( '[/um_loggedin]') ?></div>

Wordpress changed a code introduced in the page editor

I copied the code below into the editor
<div class="services_container clearfix">
<a href="it" class="service service-it">
<div class="service_ttl">
IT support
</div>
<span>More</span>
</a>
<a href="legal" class="service service-legal">
<div class="service_ttl">
Legal support
</div>
<span>More</span>
</a>
But if I look in firebug, the code output looks like this
<div class="services_container clearfix">
<a class="service service-it" href="it/index.php">
<p></p>
<div class="service_ttl">IT support</div>
</a>
<p>
<a class="service service-it" href="it/index.php">
<span>More</span>
<br>
</a>
<br>
<a class="service service-legal" href="legal/index.php"></a>
</p>
<a class="service service-legal" href="legal/index.php">
<div class="service_ttl">Legal support</div>
</a>
<p>
<a class="service service-legal" href="legal/index.php">
<span>More</span>
That is tags is repeated two or three times and this breaks the page design.
Obviously I need in the writing settings disable option "WordPress should correct invalidly nested XHTML automatically".
But I don't have this option in the writing settings.
I have found and commented out all calls of force_balance_tags function.
Then I have deleted and recreated page, but it not helped.
I use Worpress 4.7.

Tabs - Content shown after clicking one of the tab (Bootstrap)

Well, as the title says, I am not able to display the content in the tabs.
What I am doing is I am fetching the data from MySQL table and displaying it in tabs (successfully fetched).
What I am facing the problem is when the page is done with loading, I have to click one of the tabs in order to display all the contents of the tabs.
Here's the code for the tabs:
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active">
Description
</li>
<li>
Terms and Conditions
</li>
<li>
Returns and Cancellation
</li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="description">
<p class="lead text-justify" style="margin: 10px 5px;">
<?php echo $descrip; ?>
</p>
</div>
<div class="tab-pane" id="terms">
<p class="lead text-justify" style="margin: 10px 5px;">
<?php echo $termsAndCond; ?>
</p>
</div>
<div class="tab-pane" id="returns">
<p class="lead text-justify" style="margin: 10px 5px;">
<?php echo $returnsAndCan; ?>
</p>
</div>
</div>
</div>
The data is displayed once clicked on either of the tabs from the code above. I don't know where I have made the mistake. Kindly help me out in rectifying it.
Thank You in advance.
Next to setting the Description tab active which you did by setting <li class="active"> you also have to set the Description tabs content active. I think you forgot to do this.
Add the class active to the first tab-pane, so change it from <div class="tab-pane" id="description"> into <div class="tab-pane active" id="description">.
See http://getbootstrap.com/javascript/#tabs for more documentation about Bootstraps tab component.

Page not loading after php include

I have a page which includes the menu bar (a php page). This works, but strangely the page doesn't load after the include.
Some code:
<div class="center">
<?php
include ('../menu.php')
?>
<div class="text" id="media">
Some text
</div>
When I add the
<div class="text" id="media">
Some text
</div>
to the menu.php it is showed, but not when it is on the parent page. Anybody has an idea? There isn't any warning or error showing.
<!-- begin menu -->
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<link rel="stylesheet" href="../../../../style/menu.css">
<div class="menu_b">
<div class="logo">
<img src="../../../../afbeeldingen/menu/logo.gif" width="375" title="Home" />
</div>
<div class="aangemeld">
</div>
<ul class="menu_tekst">
<li class="<?php echo $account_li;?>"><a class="nt" href="../../../../account.php">Account</a></li>
<li class="tussenstuk"></li>
<li class="<?php echo $contact_li;?>"><a class="nt href="../../../../contact.php">Contact</a></li>
<li class="tussenstuk"></li>
<li class="<?php echo $fotos_li;?>"><a class="nt" href="../../../../fotos.php">Foto's</a>
<ul class="sub_fotos sub">
<li class="space_left"> </li>
<li class="titel_blok_sub"><a class="nt" href="../../../../fotos/2013_2014.php">2013-2014</a></li>
<li class="titel_blok_sub"><a class="nt" href="../../../../fotos/kamp.php">Kampfoto's 2014</a></li>
</ul>
</li>
<li class="tussenstuk"></li>
<li class="nt"><a class="nt" href="../../../../winkelwagen.php">winkelwagen + besteld</a></li>
</ul>
</div>
<div class="onder_menu">
</div>
<div class="sub_menu">
</div>
<!-- einde menu -->
you forgot semicolon ;
include ('../menu.php');
You forgot a quotation mark:
<li class="<?php echo $contact_li;?>">
<a class="nt href="../../../../contact.php">Contact</a>
</li>
should be
<li class="<?php echo $contact_li;?>">
<a class="nt" href="../../../../contact.php">Contact</a>
</li>
Succes ermee
Above the div.center their was an other php include of a page that doesn't exist, after removing it, the page loaded. Didn't looked at it because it was above the menu.php which was loaded.
Try using require:
require('../menu.php');
I'm guessing that you have turned off display errors in your php.ini and that menu.php doesn't exist.
If you are not sure how to turn on error reporting in your development machine, add the following lines to your parent page;
<div class="center">
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include ('../menu.php');
?>
<div class="text" id="media">
Some text
</div>
This should then reveal why the page is not being included.
Take the parenthesis off the include statement. It should look like this:
include 'page.php';

How to add slider in the wordpress index.php file?

My javascript code for slider is as follows which is displayed in the
html format but not displayed when I integrated it into a theme.This code is in header.php.I have called all the requred js css and image files in it and that worked fine but the problem is in slider portion.
Code in header.php
<script type="text/javascript">
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
useCSS: Modernizr.touch
});
});
</script>
Code in index.php
<div class="flexslider">
<ul class="slides">
<li>
<div class="hero-unit">
<h1>Affordable Hosting Solution</h1>
<h3>Flathost is a bootstrap based responsive minimal, flat and afforable
hosting template with easy customization and great support</h3>
<div class="slider-actions text-center"> <a href="features.html" class="btn
btn-success btn-lg">Explore Features </a> <a href="pricing.html" class="btn
btn-primary btn-lg">Plans and Pricing </a> </div>
</div>
</li>
<li>
<div class="slide2">
<p><img src="<?php echo get_template_directory_uri(); ?
>/images/server1.png" alt="server" class="img-responsive center-block"></p>
<h1>Dedicated and VIP Hosting</h1>
</div>
</li>
<li>
<div class="slide3">
<p class="pull-left"><img src="<?php echo get_template_directory_uri(); ?
>/images/server2.png" alt="server" class="img-responsive"></p>
<h1>Managed Hosting</h1>
<h3>Flathost is a bootstrap based responsive minimal, flat and afforable
hosting template with easy customization and great support </h3>
</div>
</li>
</ul>
</div>
</div>
</div>
<?php echo do_shortcode('[thethe-image-slider name="flexslider"]'); ?>

Categories