Welcome Guest, Not a member yet? Register   Sign In
better practice using link reference
#1

[eluser]ranjitbd[/eluser]
//this is a link
1.<a HREF="&lt;?=base_url()?&gt;miscellaneous/goToTmbd.html">Travelmartbd.com</a>

//this is the function
function goToTmbd()
{
echo "[removed]
var uri = 'http://www.travelmartbd.com';
[removed].href=uri;
[removed]";
}

//this is the same link
2.<a HREF="http://www.travelmartbd.com">Travelmartbd.com</a><br>

//which one is the better practice 1 or 2 ? and why ?
#2

[eluser]jedd[/eluser]
It's always good to re-read your post to make sure it came out as you expected.

The first link you've posted is savagely munged. Consequently I like the second approach .. but you don't appear to describe it.

Perhaps some words to describe the intent and nature of the distinctions would help.




Theme © iAndrew 2016 - Forum software by © MyBB