भारत की संस्कृति के लिए... भाषा की उन्नति के लिए... साहित्य के प्रसार के लिए
"मीडियाविकि:Common.js" के अवतरणों में अंतर
Kavita Kosh से
Lalit Kumar (चर्चा | योगदान) |
Lalit Kumar (चर्चा | योगदान) |
||
पंक्ति 39: | पंक्ति 39: | ||
// This function opens a page based on the value of option selected by user from a SELECT html dropdown box | // This function opens a page based on the value of option selected by user from a SELECT html dropdown box | ||
− | function gotoPageOnSelect( | + | function gotoPageOnSelect(wrapperElement, selectElement){ |
− | var selectedOption=document.getElementById( | + | var wrapperElement=document.getElementById(wrapperElement); |
+ | var selectedOption=document.getElementById(selectElement).value; | ||
if (selectedOption!="") { | if (selectedOption!="") { | ||
var baseloc = "http://kavitakosh.org/kk/"; | var baseloc = "http://kavitakosh.org/kk/"; | ||
+ | wrapperElement.innerHTML="" | ||
+ | wrapperElement.innerHTML="लोडिंग... " + selectedOption; | ||
self.location.href=baseloc+selectedOption; | self.location.href=baseloc+selectedOption; | ||
} | } | ||
} | } |
14:23, 21 जून 2014 का अवतरण
if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/8/80/Button_upper_letter.png", "speedTip": "Insert Superscript", "tagOpen": "<sup>", "tagClose": "</sup>", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png", "speedTip": "Line break", "tagOpen": "<br />", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT [[", "tagClose": "]]", "sampleText": "Insert text"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://www.kavitakosh.org/kk/images/c/cd/Button_poem.png", "speedTip": "Poem tag", "tagOpen": "<poem>", "tagClose": "</poem>", "sampleText": "रचना यहाँ टाइप करें"}; } $(function() { //Call function to decide which lipi is to be used for displaying the page. This function is defined in kk-custom-js-function.js which is loaded in skin file decideLipi('globalWrapper'); }); // This function opens a page based on the value of option selected by user from a SELECT html dropdown box function gotoPageOnSelect(wrapperElement, selectElement){ var wrapperElement=document.getElementById(wrapperElement); var selectedOption=document.getElementById(selectElement).value; if (selectedOption!="") { var baseloc = "http://kavitakosh.org/kk/"; wrapperElement.innerHTML="" wrapperElement.innerHTML="लोडिंग... " + selectedOption; self.location.href=baseloc+selectedOption; } }