#4076 closed bug (notabug)
Response evaluation does not respect dataType option
Reported by: | warhammerkid | Owned by: | klaus.hartl |
---|---|---|---|
Priority: | minor | Milestone: | 1.6 |
Component: | ui.tabs | Version: | 1.6rc6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Steps to Reproduce:
- Initialize tabs with ajaxOption {dataType:"script"}
- Load tab which returns pure script
Expected Result: The script is run and it populates the tab
Actual Result: The script text is inserted into the tab body
Additional Information:
I noticed that in ticket #3085 you stated that the response should be HTML and that you wouldn't change handling of it, but I still feel that if the user sets the dataType option to, for example, "script", the handling of the response should be different. If the user sets the dataType ajax option to something other than HTML, it should be assumed that they had a good reason to do so, instead of saying that if they can't return HTML that's too bad. I don't really know how it would work for data types other than script, but for script, it's a simple matter of not running $(self._sanitizeSelector(a.hash)).html(r)
.
Change History (5)
comment:1 Changed 14 years ago by
Owner: | set to klaus.hartl |
---|---|
Status: | new → assigned |
comment:2 Changed 14 years ago by
Milestone: | TBD → 1.next |
---|
comment:3 Changed 13 years ago by
comment:4 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
As previously stated, we don't want to support this. If you really need to make this work, you should be able to do with with the available events.
comment:5 Changed 10 years ago by
Milestone: | 1.next → 1.6 |
---|
I have the same problem, but with xml dataType. The site returns a xml with metadata and a payload to elaborate on prelaod. I have explored the code and I have found that $(self._sanitizeSelector(a.hash)).html(r) it's runned before every callback method. In my opinion this is wrong. The possible solutions are two:
callbacks r = self._trigger('preload', null, [...]); $(self._sanitizeSelector(a.hash)).html(r);
I don't know which of the two is better, but I prefer the first.
Sorry for my bad english and thank for your great work.
Giuliano