Print Form in Dialog with HTML
In regards to the blog post about printing forms...
I was hoping to trigger the onlick open form in dialog with some HTML instead of using the form control configuration. Can this be done? Can you instruck me how.
My Attempt:
<a href="#" onclick="return fd.openFormInDialog(fd_AVConfCheckList_Display.aspx)"
<span class="ui-icon ui-icon-print floatRight"></span>
</a>
------------- OR -----------------------
<a href="#" onclick="printForm()"<span class="ui-icon ui-icon-print floatRight"></span></a>
printForm(){
return fd.openFormInDialog(fd_AVConfCheckList_Display.aspx)
};
I was hoping to trigger the onlick open form in dialog with some HTML instead of using the form control configuration. Can this be done? Can you instruck me how.
My Attempt:
<a href="#" onclick="return fd.openFormInDialog(fd_AVConfCheckList_Display.aspx)"
<span class="ui-icon ui-icon-print floatRight"></span>
</a>
------------- OR -----------------------
<a href="#" onclick="printForm()"<span class="ui-icon ui-icon-print floatRight"></span></a>
printForm(){
return fd.openFormInDialog(fd_AVConfCheckList_Display.aspx)
};
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi Matt,
Sure, just wrap the name of the form you want to open into quotes:
fd.openFormInDialog('fd_AVConfCheckList_Display.aspx')
Please, open the browser console and check whether you have other JS-errors.
Sure, just wrap the name of the form you want to open into quotes:
fd.openFormInDialog('fd_AVConfCheckList_Display.aspx')
Please, open the browser console and check whether you have other JS-errors.
Thank You. I got it to work using this code below...
HTML (working)
<a href="#" id="print"><span class="ui-icon ui-icon-print floatRight"></span></a>
JQuery (working)
$( "#print").click(function() {
fd.openFormInDialog('fd_AVConfCheckList_Display.aspx');
return false
});
But, i was hoping to also learn how to do it if i was to use this method... HTML (not working) <a href="#" onclick="printForm()"></a> JQuery (not working) function printForm(){ return fd.openFormInDialog('fd_AVConfCheckList_Display.aspx');
};
can you help me with the syntax as a learning experience?
HTML (working)
<a href="#" id="print"><span class="ui-icon ui-icon-print floatRight"></span></a>
JQuery (working)
$( "#print").click(function() {
fd.openFormInDialog('fd_AVConfCheckList_Display.aspx');
return false
});
But, i was hoping to also learn how to do it if i was to use this method... HTML (not working) <a href="#" onclick="printForm()"></a> JQuery (not working) function printForm(){ return fd.openFormInDialog('fd_AVConfCheckList_Display.aspx');
};
can you help me with the syntax as a learning experience?
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Please, try this:
<a onclick="fd.openFormInDialog('fd_AVConfCheckList_Display.aspx'); return false;" href="#">Open form</a>
<a onclick="fd.openFormInDialog('fd_AVConfCheckList_Display.aspx'); return false;" href="#">Open form</a>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 5 guests