Dear all
I have database of website link, it list out in main file ,when i try to click that link it get to redirect on that database link.
my code is:
file: test.php
<?php
// getting from database
echo '<li onclick=\"window.location='.$result->website.'\">
<a href="#">'.$result->option.'</a></li>';
?>
The Main.html calls that test.php
while ajax
$.post("test.php", {queryString: ""+inputString+""}, function(data){
});
how to do it?
any idea Is it possible with serverside script? whats wrong with my php code?
Your code does not work for invalid URLs. http://www.google.com is not an URL, just a domain name. So skip the silly Javascript links, instead use:
And your Javascript success function seems somewhat empty, so instead use .load() like: