I have an index page with a link to a JS file with many Insert.Top functions in it. I'd like to have just one function if at all possible. Here's an example of what I currently have:
On the index.php page:
<a News Div</a>
<a News Div</a>
ect...
JS File:
function newsNew() {
element = new Insertion.Top('left_column', '<?php include "news.php"?>');
startDragging();
updateRanking();
}
function articleNew() {
element = new Insertion.Top('left_column', '<?php include "article.php"?>');
startDragging();
updateRanking();
}
Is there a way I can have just one function and pass a variable for what PHP file I'd like to have included? Thanks!
_______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
