convert javascript code to php - El Forum - 08-31-2009
[eluser]ranjitbd[/eluser]
//this is the link
Code: <a href="<?=base_url()?>">Travelmartbd.com</a>
//this is the function
<?php
class Miscellaneous extends Controller {
function goToTmbd()
{
echo “[removed]
var uri = ‘http://www.travelmartbd.com’;
[removed].href=uri;
[removed]”;
}
}
?>
//i want to write this function without javascript.i want to do it through raw php
within goToTmbd() method.
convert javascript code to php - El Forum - 08-31-2009
[eluser]ranjitbd[/eluser]
Code: //this is the link
<a href="<?=base_url()?>">Travelmartbd.com</a>
//this is the function
<?php
class Miscellaneous extends Controller {
function goToTmbd()
{
echo “[removed] // here the code was [removed]
var uri = ‘http://www.travelmartbd.com’;
[removed].href=uri; // here the code was [removed]
[removed]”; // here the code was [removed]
}
}
?>
//i want to write this function without javascript.i want to do it through raw php
within goToTmbd() method.
convert javascript code to php - El Forum - 08-31-2009
[eluser]ranjitbd[/eluser]
Code: //this is the link
<a href="<?=base_url()?>">Travelmartbd.com</a>
//this is the function
<?php
class Miscellaneous extends Controller {
function goToTmbd()
{
echo “[removed] // here the code was script tag
var uri = ‘http://www.travelmartbd.com’;
[removed].href=uri; // here the code was window·location
[removed]”; // here the code was end of script tag
}
}
?>
//i want to write this function without javascript.i want to do it through raw php
within goToTmbd() method.
|