Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php |
— | — | @@ -321,16 +321,11 @@ |
322 | 322 | // Javascript code for the dynamic parts of the page |
323 | 323 | $javascript_text = <<<END |
324 | 324 | <script type="text/javascript"> |
325 | | -jQuery.noConflict(); |
326 | | -function xmlhttpPost(strURL) { |
327 | | - jQuery.ajax({ url: strURL, data: getquerystring(), context: document.body, success: function(data){ |
328 | | - document.getElementById("other_options").innerHTML = data; |
| 325 | +function updateOtherOptions(strURL) { |
| 326 | + jQuery.ajax({ url: strURL, context: document.body, success: function(data){ |
| 327 | + jQuery("#other_options").html(data); |
329 | 328 | }}); |
330 | 329 | } |
331 | | -function getquerystring() { |
332 | | - var format_selector = document.getElementById('formatSelector'); |
333 | | - return format_selector.value; |
334 | | -} |
335 | 330 | |
336 | 331 | // code for handling adding and removing the "sort" inputs |
337 | 332 | var num_elements = {$this->m_num_sort_values}; |
— | — | @@ -558,7 +553,7 @@ |
559 | 554 | } |
560 | 555 | |
561 | 556 | $result .= "<br /><br />\n<p>" . wfMsg( 'smw_ask_format_as' ) . ' <input type="hidden" name="eq" value="yes"/>' . "\n" . |
562 | | - '<select id="formatSelector" name="p[format]" onChange="JavaScript:xmlhttpPost(\'' . $url . '\')">' . "\n" . |
| 557 | + '<select id="formatSelector" name="p[format]" onChange="JavaScript:updateOtherOptions(\'' . $url . '\')">' . "\n" . |
563 | 558 | ' <option value="broadtable"' . ( $this->m_params['format'] == 'broadtable' ? ' selected' : '' ) . '>' . |
564 | 559 | $printer->getName() . ' (' . wfMsg( 'smw_ask_defaultformat' ) . ')</option>' . "\n"; |
565 | 560 | |