Hi all Dnn Experts,
I am looking for a solution, please help me, I am quite new to DNN and facing some issues.
I've a Website which i need to migrate in DNN, for that I had converted some of my existing page to user control and installed as a module.
Problem arise when the CSS class and JavaScript come into picture, because .ascx page don't have any header section, then how can i register my css class and where i put my Java Script code.
I've found several solutions for css, like create a module.css in the same folder where module resides and DNN will load the style sheet automatically.
But it doesn't seem to work, Please help me on this, I've my own module and how can i put css on this module.
Another issue regarding Javascript/Jquery, I am using Jquery for different purpose like calling a page method, and some are for document.ready function like:
$(document).ready(function() {
$("*[id^=EditFeeds_]").hide();
$("[id$='errorLabel']").innerHTML = "";
});
and also
<script type="text/javascript">
$(document).ready(function() {
try {
$.ajax({
type: "POST",
url: "newsDemo.aspx/preRender",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: ajaxCallSucceed,
failure: ajaxCallFailed
});
}
catch (e) {
window. 'Data can not be inserted, please verify inputs');
}
});
function ajaxCallSucceed(response) {
$('#ResultDiv').html(response.d);
$('*[id^=ItemDiv_]').slideUp();
$('div').filter(function() { return this.id.match("ItemDiv_\\d_1"); }).slideDown();
// $("toggle_ItemDiv_1").attr("src", "images/tall-up-arrow.gif");
// document.getElementById('toggle_ItemDiv_1').src = ""
return false;
}
function ajaxCallFailed(error) {
window. 'Data can not be inserted, please verify inputs');
}
</script>
Please tell me how can i add such functionality i dnn module, because jquery fires on document.ready event and execute before control lod.
Please help me, I am in a very bad situation and need your help, Please describe your solution little because bit more, I am new in dnn.
Please help, and let me know if any clarification reqired.
Thanks
Appwriters