when I click on “Click Here” then a page must open inside
<script....>
$('yahoo').html('<a href=desc.php>');
</script>
<div id='yahoo'></div>
<div id='clickhere'>Click here</div>
Thanks
Dave
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you’re looking for AJAX to fetch the page for you. Something like this might work:
First you need to wrap the script inside
$(function() { ... })to execute your code on page load. This is equivalent to$(document).ready(function() { ... }).Next you have to bind a click event to the
#clickhereelement so you can actually do something when the user clicks on it.When the user clicks on the
#clickherediv, load() will fetch the contents of the given url inside the element you call it from. So, this snippet means that when the#clickherediv is clicked,desc.phpis loaded inside#yahoodiv.