Reputation: 15
I want to change the contents of a div When a user clicks on a link. To do that, I tried using the following code :
function openModal() {
el = document.getElementById("modal");
el.style.visibility = "visible";
}
function showContent(id) {
openModal();
$("#modal").load("modal/id.php");
return false;
}
However, it doesn't change "modal/id.php"
to "modal/something.php"
and, in place of that, opens a file named id.php
in the modal directory. How can I change that?
Upvotes: 0
Views: 72
Reputation: 213
Please provide the rest of your code. It sounds like it may just be an ID oversight.
Upvotes: 0
Reputation: 1909
Not sure to understand what's your question. Perhaps this's the answer.
PHP
echo "This other text is inside a PHP script";
HTML
Upvotes: 1