I am trying to use SimpleModal to create the modal windows on my site. Please everyone forget the previous posts as I have scrapped that code. I have not learned Javascript or Jquery yet so this is so confusing to me. I am a php guy and cant seem to figure out what is going on with this code. It says that it is a simple plugin that creates a modal window. First off, where do I put this code:
$("myElement").addEvent("click", function(){
var SM = new SimpleModal({"width":600});
SM.addButton("Action button", "btn primary", function(){
this.hide();
});
SM.addButton("Cancel", "btn");
SM.show({
"model":"modal-ajax",
"title":"Title",
"param":{
"url":"file-content.php",
"onRequestComplete": function(){ /* Action on request complete */ }
}
});
});
next is says to use this link:
<a id="myElement" href="javascript;">Open Modal</a>
When I try to do this it says that the url /javascript does not exist on this server. So what am I doing wrong? Does the javascript go in the head of the page its being called or right before the link that is being clicked? I am getting frusterated as I have coded my entire forum with php, html, and css and I would like to implement some modal windows for certain functions such as registration, forgoten passwords and such. If someone could please help me out that would save me so much time. If anyone is familiar with http://simplemodal.plasm.it/ that is where I got the code that I am using.