gringos
09-04-2008, 06:04 AM
UPDATE: Always seems to work right after I post...
BUT, with it doesn't work graphically unless I comment out jquery, but then the links do not work...
Is there a way I could just pull the loadContent function from jquery, any idea what it is?
Cheers.
________________
I am just running through a few CSS Javascript menu tutorials, this one I am having a bit of trouble with in a certain part of the test site:
http://www.phatfusion.net/imagemenu/
The menu as you can see is an image menu, and the links run via this javascript:
<script type="text/javascript">
window.addEvent('domready', function(){
var myMenu = new ImageMenu($$('#imageMenu a'),{
openWidth:310,
border:2,
<!-- The code below controls the link click -->
onOpen:function(e,i){
alert(e);
}
});
});
</script>
Bascially, the code I need to implement for a content switch is:
function loadContent (id) {
$("#contentArea").load("php/rpc.php?o=" + id + "");
}
Works fine with links that aren't encased in the image-menu div or ul:
<a href="javascript:loadContent(1)">link</a>
It just doesn't work with the photo-menu.
Some things that I have tried and didn't work are:
1.
<a href="javascript:loadContent(1)">link</a>
in the hope it would just work...
2.
<a href="1">link</a>
<script type="text/javascript">
window.addEvent('domready', function(){
var myMenu = new ImageMenu($$('#imageMenu a'),{
openWidth:310,
border:2,
<!-- The code below controls the link click -->
onOpen:function(e){
$("#contentArea").load("php/rpc.php?o=" + e + "");
}
});
});
</script>
I have included jquery.js also just in case that is what the loadContent is from. The php file is fine, I've tested a copy remotely. I am quite stuck, any ideas anyone? I know it is doable, has to be, just cannot figure it out for the life of me.
Thanks in advance,
Matt.
BUT, with it doesn't work graphically unless I comment out jquery, but then the links do not work...
Is there a way I could just pull the loadContent function from jquery, any idea what it is?
Cheers.
________________
I am just running through a few CSS Javascript menu tutorials, this one I am having a bit of trouble with in a certain part of the test site:
http://www.phatfusion.net/imagemenu/
The menu as you can see is an image menu, and the links run via this javascript:
<script type="text/javascript">
window.addEvent('domready', function(){
var myMenu = new ImageMenu($$('#imageMenu a'),{
openWidth:310,
border:2,
<!-- The code below controls the link click -->
onOpen:function(e,i){
alert(e);
}
});
});
</script>
Bascially, the code I need to implement for a content switch is:
function loadContent (id) {
$("#contentArea").load("php/rpc.php?o=" + id + "");
}
Works fine with links that aren't encased in the image-menu div or ul:
<a href="javascript:loadContent(1)">link</a>
It just doesn't work with the photo-menu.
Some things that I have tried and didn't work are:
1.
<a href="javascript:loadContent(1)">link</a>
in the hope it would just work...
2.
<a href="1">link</a>
<script type="text/javascript">
window.addEvent('domready', function(){
var myMenu = new ImageMenu($$('#imageMenu a'),{
openWidth:310,
border:2,
<!-- The code below controls the link click -->
onOpen:function(e){
$("#contentArea").load("php/rpc.php?o=" + e + "");
}
});
});
</script>
I have included jquery.js also just in case that is what the loadContent is from. The php file is fine, I've tested a copy remotely. I am quite stuck, any ideas anyone? I know it is doable, has to be, just cannot figure it out for the life of me.
Thanks in advance,
Matt.