views:

419

answers:

1

I found it very easy to implement modal windows that included an html or asp page in it with facebox but I wanted to give SimpleModal a try.

I was trying to learn how to use the Contact Form http://www.ericmmartin.com/simplemodal/ but realized it was only for php. I am a novice coder so please have some mercy. :) .

Anyhow what I was hoping to accomplish was to open up an asp page with a form in it. I tried to do this with facebox but the form was not submitting to the form page but rather to the parent window.

Is there a simple way way to do this? SimpleModal looks great but I found it so much harder to implement than facebox or thickbox. At least with facebox or thickbox I could load html or asp pages in the window. I do not see an easy option for SimpleModal on how to do that.

Thanks in advance.

+1  A: 

I'm sorry that you found SimpleModal difficult to use...my intention was for it to be simple ;)

If you want to use SimpleModal with asp, you should try using the appendTo option.

$(element).modal({appendTo:'form'});

To load external content into the dialog, you can do something like:

$.get("yourpage.html", function(data) {
    $(data).modal({appendTo:'form'});
});

I hope that helps.

-Eric

Eric Martin
Hello Eric, You have got the be the most affable coder to date. Thank you.I apologize I am not much of a coder so I am not really sure where to put that code.I do know how to add the script tags at the header to point to the jquery scripts as well as the css files.And with Facebox and Thickbox, I just add a rel="something" to the href.Please forgive my newbness but where do I place the above code?I know your simplemodal script must be special since I see it used in the Joomla app. Would love to find out for myself.Sincere thanks.
Tucker - thanks for the compliment ;) SimpleModal is more of a modal dialog framework, so it relies more on the developer to tell it what to do. You should be able to create a js file and include it in your page - the js file will include the necessary js. Have a look at the demos on my site to get some ideas of what to put in the file. If you need further assistance, don't hesitate to email me.-Eric
Eric Martin