links working in Mozilla Firefox, but not in Internet Explorer - html

I seem to have problems with my links, they are not doing anything in Internet Explorer
<a style="text-decoration:none;" href="<?php echo base_url();?>index.php/person/create/<?php echo $this->uri->segment(4);?>" >
If I look at the source my link is href="http://localhost/index.php/person/create/2".
This is working in Mozilla but in IE the link is going nowhere.

It looks like you didn't mean to put index.php in your url - I doubt that you can traverse into /person/create/2 after index.php. Try removing that?

Try this:
<?php $url = $this->uri->segment(4); ?>
<a style="text-decoration:none;" href="<?php echo base_url("index.php/person/create/$url");?>">click</a>
If you have an index page specified in your 'config.php' you don't have to add /index.php/ to your url.
Hope it helps.

Related

Image files don't displayed in yii2

I need to help. I have some projects on yii2, but in each of them I can't to display images everything looks but it's still not working...
Also:
<img src="<?= \Yii::getAlias('#web/images/home.png') ?>" />
Seems you have wrong url for image try
use yii\helpers\Url;
<?php echo "<img src='". Url::base() . "/images/home.png' alt='your_alt' />" ;
try this
<img src="<?=Yii::$app->request->baseUrl?>/images/home.png" />

bad links mark pages in firefox

I have a problem with links in firefox. only happens in firefox and in chrome works well.
If I have a board and I link a document like this:
link
I have in the document:
<a name="mark"> </a>
Anyone know that in going from the front to the page does not take me to that part of the document? only works in firefox when already loaded page while chrome always work.
Use
<a id="mark"> </a>
instead.
Or you could link to a heading directly like:
<h1 id="mark">This is my heading</h1>
Use id <a id="mark" href="#"> </a>
Call by
link
(or)
link (if it is same page)

Image not loading - "Failed to load the given URL"

I have an issue with firefox, it doesn't load an image.All the other,Chrome, Opera and IE can load this but firefox fails, it does not display any picture and if i go check with firebug it displays the following error on the image link: "Failed to load the given URL". I did clear my cache, also, if i open the image link in another tab it works.
THe code:
<ul class="nav navbar-nav navbar-right">
<li>
<a style='padding:4px' href="<?php echo $login_url?>">
<img src="<?php echo base_url(); ?>img/facebook_log22.png" class='facebookLogin' />
</a>
</li>
</ul>
Also in style:
.facebookLogin
{
height:40px;
}
I'm using codeigniter(if u wonder about base_url() function) and bootstrap(but i don't think that matters so much.
Edit: I also see that it adds another class to the code...
Also,the error:
Ok,i finally know what the problem was,and it is called adblock plus.Damnit,totally forgot i have that installed on my firefox.
Thanks a lot guys.
If you are referencing image from domain, it will not work, unless you:
put http:// in front of your link: src="http://<?php echo base_url(); ?>/img/facebook_log22.png", or
create a relative link: src="/img/facebook_log22.png" .
I also ha a similar error , i opened it again with a different browser it was working .
right click >View Image > you must be able to see your image if the link is correct .
I once had a similar problem and after a frustrating time of checking and rechecking my path, I realized the problem was the images were uploaded as ".JPG" but my css had ".jpg" It was a capitalization issue.

Why is my HTML link not replacing the whole URL?

I have a search engine using PHP/MySQL. I use this code to display the results from MySQL:
echo "<table width='300px'>
<h4><a href='$url'><b>$title</b></a><br />
$desc<br>
<font color='red'>$url</font></table></h4>
";
}
?>
However, if I add a URL (for example www.google.com) and I click on the title, it links me to http://mysite.com/www.google.com, instead of http://www.google.com.
How can I solve this?
Your $url is "www.google.com", which is not a complete URL.
Consequently, your HTML looks like this (you should have posted the resulting HTML, really, as PHP has nothing to do with this):
<table width='300px'>
<h4><a href='www.google.com'><b>sometitle</b></a><br />
somedescription<br>
<font color='red'>www.google.com</font></table></h4>
www.google.com is not a full URL, and so your browser is treating it as a relative path, and thus prepending the current domain.
Your $url should be a full URL, like "http://www.google.com".
Prefix your URLs with http:// ie. http://www.google.com
You could do it this way:
<a href='http://$url'><b>$title</b></a><br />

Is there an easier way to add menu items to a wordpress navigation menu?

I'm new to Wordpress or CMS's for that matter but I'm used to the way Joomla's menus work. I have downloaded this Wordpress theme that had a navigation menu with 4 pages. So I thought I'd create a new page and select the main page as the parent. But after I go to the site the navigation doesn't show the link to the page.
So I took a look at the HTML for the menu in header_block.php and I copy and paste the about li entry and it works fine. So okay fine I can edit the menu by hand but I can't expect clients to do this. Is there an easier way of doing this? Something close to the way Joomla works? Thanks in advance.
<!-- Start Menu -->
<div class="Menu">
<ul>
<li><a href="<?php echo get_option('home'); ?>">
<?php _e('Home'); ?>
</a></li>
<li><a href="<?php echo get_option('home'); ?>?page_id=2">
<?php _e('About Us'); ?>
</a></li>
<li><a href="<?php echo get_option('home'); ?>?m=200808">
<?php _e('Archives'); ?>
</a></li>
<li><a href="<?php echo get_option('home'); ?>?page_id=38">
<?php _e('Contact Us'); ?>
</a></li>
<li><a href="<?php echo get_option('home'); ?>?page_id=2">
<?php _e('About Us'); ?>
</a></li>
</ul>
<div class="clr"></div>
</div>
<!-- End Menu -->
The wp_list_pages template tag Template Tags/wp list pages « WordPress Codex handles listing all published pages, and so will add a page to the menu of a page template when a client adds a page in the wordpress editor. Does the theme you downloaded use wp_list_pages? Or are the page URLs and CS hardcoded? Look at the wordpress default theme for an idea of how wp_list_pages is used.
While it's not officially out yet, something to look forward to in WordPress 3.0 is the new menu management system.