I’m trying to use the jquery ui dialog box to output an iframe. It doesn’t seem to be working for me. I think I am making a syntax mistake somewhere- probably with quotation marks in the iframe. Any help would be much appreciated.
<a href='' onclick=\"open_course_article('$userid','$title', 'remove', '$sel_course');\">Remove from Course</a>
function open_course_article(userid,article,option,course) {
$('<iframe src="article_course.php?option="+option+"&userid="+userid+"&course="+course+"&article="+escape(article)"/>').dialog({
title: 'Add Article',
width: 600,
height: 400,
modal: true,
}).width(570).height(370);
}
You are mixing single quotes with double quotes for enclosing a string, which does not work in programming.
should be something more like: