- 浏览: 2113870 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
sunzeshan:
找了很久,用了这个插件解决问题啦。谢谢
eclipse jetty debug source not found -
xiaosong0112:
您好,请问为什么要这样设置呢,原理是什么?在网上很多转帖都没有 ...
maven的jetty插件提示No Transaction manager found导致启动慢的解决方法 -
eimhee:
tjzx 写道畅搜谷歌:http://dian168.cc/打 ...
Google 镜像站搜集 -
tjzx:
畅搜谷歌:http://dian168.cc/打开的是“最火源 ...
Google 镜像站搜集 -
eimhee:
finallygo 写道你这属于"头痛医头脚痛医脚& ...
解决linux下too many file问题
Hi I would like to show the error from server in a Ext.MessageBox but I don't know how I can fill the textArea using multiline, a liltle help please.
Using Ext.MessageBox.alert('Status', resp.responseText); appear the error but I can't close this windows becouse the error text is big and the close button disapear.
I am doing it:
function responseFailure(resp){
//alert(resp.responseText);
//debugger;
//Ext.MessageBox.alert('Status', resp.responseText);
Ext.MessageBox.show({
title: 'Error',
msg: 'Please send it support:',
width:300,
buttons: Ext.MessageBox.OK,
multiline: true,
textboxEl: resp.responseText
});
}
kind regards
Frank
Using Ext.MessageBox.alert('Status', resp.responseText); appear the error but I can't close this windows becouse the error text is big and the close button disapear.
I am doing it:
function responseFailure(resp){
//alert(resp.responseText);
//debugger;
//Ext.MessageBox.alert('Status', resp.responseText);
Ext.MessageBox.show({
title: 'Error',
msg: 'Please send it support:',
width:300,
buttons: Ext.MessageBox.OK,
multiline: true,
textboxEl: resp.responseText
});
}
kind regards
Frank
#2
03-01-2007, 09:28 PM
|
Using alpha2 rev6, I'm unable to reproduce this problem. Which one are you using?
|
#3
03-02-2007, 07:32 AM
|
Yes I am using alpha2 rev6, when I get a error from server (asp.net) it response with an aspx page, in my case I get the error from server in resp.responseText, it appear in the Ext.MessageBox.alert with yellow color in error ect.. like appear in an aspx page with error, but it has many text and disapear the close button, I would like show the error inside textArea in a multi-line prompt dialog, becouse it have scroll bar but I don't know how set the resp.responseText to textArea inside multi-line prompt dialog, I like the alert becouse it show the resp.responseText with color (like a html page), but don't have scroll bar and only has a button OK. Is there some dialog where I can show the error with scroll, and add for instance a button to send error for mail I mean (show the error and appear Send Error button)?
kind regards Frank |
#4
03-02-2007, 07:39 AM
|
Setting HTML inside a textarea will have the effect that the HTML is not shown rendered anymore. You better put the ASP error inside a div element, and then set the css property overflow:auto, so it will have a scrollbar.
Could you post a screenshot BTW, your description of the problem is very unclear. |
#5
03-02-2007, 02:02 PM
|
|
Quote:
|
#6
03-02-2007, 05:45 PM
|
more clear , I am doing it:
I send a xml to server, I parsed it and update the database, if there is an error in this proccess I catch the exception and send it to client, then I want to show it to user, but if I try with alert the exception from server has many information and the button close in the dialog go up and don't appear in the browse, so the doubt can I use some Ext.MessageBox dialog to show the client or I have to do my dialog? using a multi-line prompt dialog the error don't appear in html format but i can read it using scroll how I can add the error to textArea in multi-line prompt dialog? example the a exception send from server <html><head><title>Object reference not set to an instance of an object.</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style></head><body bgcolor="white"> <span><h1>Server Error in '/ASFA' Application.<hr color="silver" size="1" width="100%"></h1> <h2> Object reference not set to an instance of an object. </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: <table bgcolor="#ffffcc" width="100%"> <tbody><tr> <td> <code></code><pre> Line 42: public XmlToDb(string Id ) Line 43: { <font color="red">Line 44: Attributes.Add("throw an error"); </font>Line 45: Attributes = new ArrayList(); Line 46: Values = new ArrayList();</pre> </td> </tr> </tbody></table> Source File: c:\projectest\WebSite\XmlToDb\XmlToDb.cs Line: 44 Stack Trace: <table bgcolor="#ffffcc" width="100%"> <tbody><tr> <td> <code></code><pre> [NullReferenceException: Object reference not set to an instance of an object.] WebSite.XmlToDb..ctor(String Id) in c:\projectest\WebSite\XmlToDb\XmlToDb.cs:44 WebSite.HandlerXmlToDb.ProcessRequest(HttpContext context) in c:\projectest\WebSite\XmlToDb\HandlerXmlToDb.ashx.cs:67 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +179 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87 </pre> </td> </tr> </tbody></table> <hr color="silver" size="1" width="100%"> Version Information:Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032 </font> <!-- [NullReferenceException]: Object reference not set to an instance of an object. atWebSite.XmlToDb..ctor(String Id) in c:\projectest\WebSite\XmlToDb\XmlToDb.cs:line 44 atWebSite.HandlerXmlToDb.ProcessRequest(HttpContext context) in c:\projectest\WebSite\XmlToDb\HandlerXmlToDb.ashx.cs:line 67 at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --></body></html> kind regards Frank |
#7
03-02-2007, 06:37 PM
|
If you are getting back a full HTML page as the response, try displaying it in an iframe. If you inject XML containing an HTML element into a subelement of your page it can really confuse your browser.
|
#8
03-02-2007, 08:34 PM
|
Alright franklt69, I need you to go back and reread my previous reply. I specifically said that you weren't going to get things to work properly if you are injecting HTML that contains a doctype, html tag, head tag, or body tag into your dialog.
Rather than an alert, you're going to have to take that build a basic dialog with an iframe, take the response from the server, and inject that into the iframe's DOM. What might be easier is trimming down the response the server sends to something that's just an HTML fragment. |
#9
03-07-2007, 08:20 AM
|
Hi I need some help about how inject html into a Iframe
when in the server (asp.net) there is an error it response with a html like the code post above, then I am doing it function responseFailure(resp){ showError(resp.responseText); } showError: function(aError){ if(!dlgError){ // lazy initialize the dialog and only create it once dlgError = new Ext.LayoutDialog("dlg-error", { modal:true, width:800, height:400, shadow:true, minWidth:300, minHeight:300, proxyDrag:true, title: 'Error Windows', shadow:true, center:{alwaysShowTabs:true}, north: { split:false, initialSize: 25 }, center: { autoScroll:true, tabPosition: 'top', closeOnTab: true, alwaysShowTabs: false } }); dlgError.addKeyListener(27, dlgError.hide, dlgError); dlgError.addButton('Send', dlgError.hide, dlgError); dlgError.addButton('Dont Send', dlgError.hide, dlgError); var layout = dlgError.getLayout(); dlgError.beginUpdate(); debugger; var iframe = Ext.DomHelper.append(document.body, {tag: 'iframe', frameBorder: 0}); iframe.innerHTML = aError; feedPanel = new Ext.ContentPanel(iframe, {fitToFrame:true, autoScroll:true, closable:false}); layout.add('center', feedPanel); dlgError.endUpdate(); } dlgError.show(); } the doubt is how I can inject the html (aError) into an iframe ? kind regards Frank |
#10
03-07-2007, 10:34 AM
|
Why are you allowing the server exception to just dump back to a generic error page? You should catch the exception in your aspx page and build a simple reponse string from the exception properties (e.g. Message, Stacktrace, InnerException, etc). Then pass that back without all the html and use that as the content of your dialog body. The way you're doing it now, it appears that the error is not being caught and just output via the standard .Net error page.
__________________
Tim Ryan - Ext JS Support Team Read BEFORE posting a question / posting a Bug Use Google to Search - API / Forum API Doc (3.x | 2.x | 1.x) / FAQ / Wiki / Tutorials / 1.x->2.0 Migration Guide |
发表评论
-
jquery dual list 插件
2010-12-21 17:24 2354In my work, I came across the n ... -
Start PageIndexHistoryLast Change
2010-12-15 00:22 1007The specifications should provi ... -
ajax upload
2010-11-19 13:22 0ajax upload The following cri ... -
兼容IE和FF获取Referer的JS方法
2010-11-11 10:11 4464众所周知,我们web开发人员痛恨IE浏览器,因为IE不支持标准 ... -
jQuery优化
2010-09-16 08:30 5482之前,我们减少字节数和请求次数以及加载顺序以使页面加载的更快。 ... -
jQuery add table row
2010-08-23 13:39 0The approach you suggest is not ... -
Add and Remove items with jQuery
2010-08-23 13:25 0Add and Remove items with jQuer ... -
extjs和struts、json的整合
2009-08-13 09:52 4500使用extjs配合struts的MVC架构是目前流行的做法,两 ... -
extra 1px space in dialog handle style - Ext JS
2009-04-20 23:33 1564Im developing a new style and h ... -
Grid - Custom header renderer? - Ext JS
2009-04-20 23:33 2057Is it possible to create a cust ... -
Inputs to DatePicker - Ext JS
2009-04-20 23:33 2148I thought I had read that you c ... -
dateFormat with timezone - Ext JS
2009-04-20 23:33 3578If I create JSON data on server ... -
How to use Ext.each? - Ext JS
2009-04-20 23:33 4466I'm trying to use Ext.each. It ... -
afteredit event ... new value? - Ext JS
2009-04-20 23:33 1499the new value is not set before ... -
problem qith iframe's - Ext JS
2009-04-20 23:33 1123I want to have dialogs and wher ... -
[Grid] Ext.data documenation - Ext JS
2009-04-20 23:33 1454I'm porting my grids to use the ... -
Last column to auto-adjust - Ext JS
2009-04-20 23:33 2688I can't see that this is curren ... -
Tree non-async creation "bug" - Ext JS
2009-04-20 23:32 2383When building a tree without us ... -
Bug - reload method of AsyncTreeNode - Ext JS
2009-04-20 23:32 1995Happens when the tree config o ... -
Minor grid paging toolbar issues - Ext JS
2009-04-20 23:32 1506When a grid toolbar is displaye ...
相关推荐
If you are strongly opossed to this change, drop me a line and tell me why (I‘m in doubts).1.8.5- Greg Nixon added the priority property. The default priority for each msg created will be prNormal, ...
If you are having doubts learning the language, do not! C is actually easy to learn. Compared to C++, C is much simpler! You do not need to spend years to become a master of this language. Well start...
If you are having doubts learning the language, do not! C is actually easy to learn. Compared to C++, C is much simpler! You do not need to spend years to become a master of this language. Write ...
The only limit to our realization of tomorrow will be our doubts of today.从界面来看,主要被分为几个模块: sequence toolkit:序列操作 blast:序列比对 GO&KEGG:功能注释 graphics:绘图 others:大杂烩的...
There are many good books available in the market which independently teach Java, Web Servers, MVC based Frameworks, JSP, PL/SQL, AJAX, JavaScript, CSS, HTML5, UML, SDLC etc. This book covers all of ...
The purpose of this exercise is to practice using the CSS properties we have learned so far to build a website for iCarnegie Global Learning. This is part 3 of a 3-part exercise. In this exercise we ...
about what cloud computing is and where it’s headed, no one has doubts that it is real. In fact, we think that cloud computing, in all of its forms, is transforming the computing landscape. It ...
The text is devoted to the Software Analysis and Testing (SAT) ...only that I suspect there are many professionals out there who have similar doubts. And they are the intended audience of this project.
If you are having doubts learning the language, do not! C is actually easy to learn. Compared to C++, C is much simpler! You do not need to spend years to become a master of this language. Well start...
and gone, leaving JPA to be a standard that is accepted only with doubts, short of any surviving options. So far, there had been only few database abstraction frameworks or libraries, that truly ...
疑点 ###怀疑Android客户端
If you have doubts about this, please send an email to .这里存放了db的学习、工作中关于编程的经验文档。如果你对此有疑惑,请发邮件到 。一、 前言 本文档库始建于 2018-12-24,开始目的是做学习笔记。 如想...
Shadow-dom-in-depth:您需要了解的有关Shadow DOM的所有信息
From choosing the correct size and configurationto what you should actually monitor, including exporting and integrating your data with other systems, this book will leave you with no doubts about ...
He becomes anxious when he feels doubts expressed about the validity of a personality evaluation instrument that he has come to admire. It is an easy instrument to use; with the appropriate manual ...
we hope.And where we are met with cynicism and doubts and those who tell us that we can't, we will respond with that timeless creed that sums up the spirit of a people: Yes, we can. 当我们充满希望的...
He becomes anxious when he feels doubts expressed about the validity of a personality evaluation instrument that he has come to admire. It is an easy instrument to use; with the appropriate manual ...
tataCodeCollege 面向学生和教师的完整机构学术平台 ->行政环境: * Creates teacher and student account * Controls permissions * Initiates a chat with ...* Initiates a chat with teacher or adm for doubts
IAED_2015_1 在 FACIMP 的 IS 课程的算法和数据结构导论课程中产生的来源##Pascal 和 C。 ##结构化和程序化范式。 ##To Students 经常从这里更新您的存储库。 ##Doubts 可能出现的任何疑问都应在问题疑虑中解决。