Aug 22, 2018, 12:35 AM
[CLOSED] Ext.net "questionaire" message box
Hi, I'm trying to implement a simple questionaire that occasionally pops up to some of our users, when certain criteria are met.
It should roughly behave like this:
Rather than dumbing everything in my message box down to HTML, it seems I should be able to use Ext.net controls, but can't seem to get that to work. Do I need to extend the Ext.Net message box?
We are trying to use something like Ext.Net message box, because it doesn't seem to trigger most browsers' pop-up blocker.
Thanks,
It should roughly behave like this:
[DirectMethod(IDMode = DirectMethodProxyIDMode.None, ShowMask = true)]
public void ShowQuestionaire()
{
var menuHtml = new StringBuilder();
menuHtml.AppendFormat("<p class='center'>Help Make XYZ Company Better</p>");
menuHtml.Append("<hr/>");
menuHtml.Append("<p class='center'>How likely are you to recommend XYZ Company to a friend or colleague?</p>");
menuHtml.Append("<input type='radio' name='ratingScore' id='1' value = '1' style = 'margin-right: 25'/> 1");
menuHtml.Append("<input type='radio' name='ratingScore' id='2' value = '2'/> 2");
menuHtml.Append("<input type='radio' name='ratingScore' id='3' value = '3'/> 3");
menuHtml.Append("<input type='radio' name='ratingScore' id='4' value = '4'/> 4");
menuHtml.Append("<input type='radio' name='ratingScore' id='5' value = '5'/> 5");
menuHtml.Append("<input type='radio' name='ratingScore' id='6' value = '6'/> 6");
menuHtml.Append("<input type='radio' name='ratingScore' id='7' value = '7'/> 7");
menuHtml.Append("<input type='radio' name='ratingScore' id='8' value = '8'/> 8");
menuHtml.Append("<input type='radio' name='ratingScore' id='9' value = '9'/> 9");
menuHtml.Append("<input type='radio' name='ratingScore' id='10' value = '10'/> 10");
//2 cell table, with left justified "Not Likely" in first col. and right justified "Very Likely" in last col
menuHtml.Append("<table width='100%'><tr><td width='50%' align='left'>Not Likely</td><td width='50%' align='right'>Very Likely</td></tr></table>");
menuHtml.Append("<p class='center'>Any comments or suggestions for us?</p>");
menuHtml.Append("<textarea rows = '4' cols = '60'></textarea>");
menuHtml.Append("<table width='100%'><tr><td align='right'><a href='dismiss.asp'>Dismiss until next quarter</a></td><td align='right'><button type = 'button' onclick = 'SomeFuncSubmit()'>Submit</button></td></tr></table>");
X.MessageBox.Alert(String.Empty, menuHtml.ToString()).Show();
}
Native Ext.Net message box offers some variations somewhat close to this, but doesn't quite work out. Rather than dumbing everything in my message box down to HTML, it seems I should be able to use Ext.net controls, but can't seem to get that to work. Do I need to extend the Ext.Net message box?
We are trying to use something like Ext.Net message box, because it doesn't seem to trigger most browsers' pop-up blocker.
Thanks,
Last edited by fabricio.murta; Sep 04, 2018 at 6:08 PM.