Here is My JavaScript.
function thisimg(id,recordid)
{
var newid = "addlink_"+id;
var countid = "count_"+id;
var url = "../updateclick.php";
$.post(url,{dbid:recordid},function(data) { document.getElementById(countid).innerHTML = data; });
var url =document.getElementById(newid).value;
window.open (url,"mywindow","status=1");
}
Here Is My PHP echo
echo "<div class='title box' onclick='thisimg(".$counter.",".$row['id'].")'><div style='float:left'><img src='".$imgpath."' alt='SimCity Social $name' title='$caption' height='50' width='50' /></div> <div class='click' style='float:right;'><b>Clicks <br/> <div id='count_".$counter."'> ".$click." </div> <input type='hidden' id='addlink_".$counter."' value='".$app_link."' rel='nofollow'</b></div><div style='float:left; width:100px; overflow:hidden; white-space: pre;'> <b> ".$name."</b><br/>".$beforetime."</div></div>";
I want to Modify this code to add check box inside the Title Box and and modify the JavaScript auto function to open checked title Box ‘$app_link’ URL in new window for 10 sec and close it. every checked box URL open one by one for 10 sec. Please give some suggestion or sample code to start with.
Please help.
Thank You For Reading..
Note, you have a title and a box class (two separate classes for the same tag), space is the separator for the class attribute of an html tag.
This is a checkbox:
Create your own checkbox and put it inside the other tag, that’s the first step. The other needs were not understandable for me but I think I can give you useful hints.
Use jQuery, that’s the second step.
Use a class for your tag with the applink, I’ll call this class “app-link” for now, this is the third step.
I assume that the parent of all your checkboxes in this issue will be of type of box and the jQuery code is here:
Use the (untested) code above, this is the fourth step.
Finally you should make your window opening, this link might help you:
http://www.webdeveloper.com/forum/showthread.php?t=169300
Best regards,
Lajos Árpád.