1) Script Title: Ajax Tabs Content script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tent/index.htm
3) Describe problem:
I call a php script to delete a forum message (in the same tab):
I click on link, php script deletes message and shows confirmation:PHP Code:<a href="javascript:linkjax('forum.php?do=delete&mid=<?=$i['id']?>', 'aca', 0)">
Click here to delete message
</a>
Then I want automatically to return to the list of messages. Without ajax I used the script below.PHP Code:<?php
echo "Message deleted. Please wait...";
?>
I tried to configure this script to load the content of first tab (list of messages), but no success - it doesn't load anything (just hangs) or loads the whole website in one tab.PHP Code:<script type="text/javascript">
<!--
var URL = "messages.php"
var speed = 1000
function reload(){
location = URL
}
setTimeout("reload()",speed);
//-->
</script>
<?php
The only solution is to show a link where to click to return to the messages index.
But I don't like this. It's very annoying if you need to click somewhere after each deleted message.PHP Code:<a href="javascript:linkjax('messages.php', 'aca', 0)">
Return to the messages index
</a>
Is there any way how to reload (refresh) tab content automatically?
Thank you.



Reply With Quote
Bookmarks