tommybfisher Posted July 2, 2011 Share Posted July 2, 2011 Hi, I want to be able to load a php include on a page when a link is rolled over, then remove it when rolled away. However, the code I am using does not do anything. Is this something that can be achieved by this method? <p><a href="" onmouseout="index.php?page=services" onmouseover="<?php include("includes/services.bespoke.php"); ?>">Bespoke database design</a></p> Quote Link to comment https://forums.phpfreaks.com/topic/240930-php-include-to-be-loaded-on-onmouseover/ Share on other sites More sharing options...
cs.punk Posted July 2, 2011 Share Posted July 2, 2011 What are you trying to do? Why would you need that file included only when moused overed anyway? Beside the fact it wouldn't work... Quote Link to comment https://forums.phpfreaks.com/topic/240930-php-include-to-be-loaded-on-onmouseover/#findComment-1237566 Share on other sites More sharing options...
gizmola Posted July 2, 2011 Share Posted July 2, 2011 No, that will not work. PHP is run server side. Javascript events happen in in the browser on your workstation. What are you trying to accomplish? Quote Link to comment https://forums.phpfreaks.com/topic/240930-php-include-to-be-loaded-on-onmouseover/#findComment-1237570 Share on other sites More sharing options...
tommybfisher Posted July 2, 2011 Author Share Posted July 2, 2011 Well I was aware of the server/client differences, however, I thought that as you can get php includes to load via a click of a mouse, I wanted to do the same via a rollover. I want to have a block of text displayed when the user rolls over each link in turn, the text changing for each link. I can see I am going about this the wrong way. Any ideas on what form the solution should be? Many thanks Quote Link to comment https://forums.phpfreaks.com/topic/240930-php-include-to-be-loaded-on-onmouseover/#findComment-1237573 Share on other sites More sharing options...
cyberRobot Posted July 2, 2011 Share Posted July 2, 2011 Well I was aware of the server/client differences, however, I thought that as you can get php includes to load via a click of a mouse, I wanted to do the same via a rollover. I want to have a block of text displayed when the user rolls over each link in turn, the text changing for each link. I can see I am going about this the wrong way. Any ideas on what form the solution should be? Many thanks You could look into using JavaScript to do what you want. I don't have any tutorial links handy, but you could try Google. Maybe search for "javascript show content onmouseover". Quote Link to comment https://forums.phpfreaks.com/topic/240930-php-include-to-be-loaded-on-onmouseover/#findComment-1237576 Share on other sites More sharing options...
gizmola Posted July 2, 2011 Share Posted July 2, 2011 You will get a lot of hits if you search for javascript tooltip. I recommend jquery based addons like http://craigsworks.com/projects/qtip2/ Check the demos and I'm sure you'll be very impressed at the capabilities and variety of different ways you can use it. Here's a whole list of similar packages to check out. http://www.webdesignbooth.com/15-jquery-plugins-to-create-an-user-friendly-tooltip/ Quote Link to comment https://forums.phpfreaks.com/topic/240930-php-include-to-be-loaded-on-onmouseover/#findComment-1237697 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.