Re: A two flavored post

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12:58 PM -0400 10/5/07, Daniel Brown wrote:

<?
$s = $_GET['s'];
?>
<script language="JavaScript">
function writeHREF(value,title) {
        var url = "http://www.crusar.org/test.php";;
        var currentTime = new Date();
        var month = currentTime.getMonth();
        var day = currentTime.getDate();
        var year = currentTime.getFullYear();
        var jsvalue = month + '/' + day + '/' + year;
        document.write('<a href="' + url + '?s=' + value + '&jsvalue='
+ jsvalue + '">' + title + '</a>');
}
</script>

This is where your JS link will appear, Tedd:
<script language="JavaScript">
        writeHREF('<?=$s;?>','Test Link');
</script>


Daniel

That's slick.

I solved the problem by using:

<a href="img.php?i=<?php echo($value);?>" onclick="window.location = this.getAttribute( 'href' ) + '&s=' + s; return false;">

But, I am sure I will be using your's sometime soon.

Thanks,

tedd



--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux