×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    Select Category Example: Difference between revisions

    Content added Content deleted
    imported>mutante
    mNo edit summary
    imported>DrOwl
    (Article category updated from form)
     
    (7 intermediate revisions by 5 users not shown)
    Line 1: Line 1:
    {{#form:
    {{#form:

    {{#input:type=hidden|name=title|value={{FULLPAGENAMEE}}}}
    {{#input:type=hidden|name=title|value={{FULLPAGENAMEE}}}}
    {{#input:type=hidden|name=summary|value=Article category updated from form}}
    {{#input:type=hidden|name=summary|value=Article category updated from form}}
    Line 6: Line 5:
    {{#input:type=hidden|name=regexp|id=setcat-regexp}}
    {{#input:type=hidden|name=regexp|id=setcat-regexp}}
    {{#input:type=hidden|name=content|id=setcat-content}}
    {{#input:type=hidden|name=content|id=setcat-content}}

    {{#input: type = select
    {{#input: type = select
    | *Select category{{#dpl: namespace = Category | mode = userformat | listseparators = ,\n*%TITLE%,, }}
    | *Select category{{#dpl: namespace = Category | mode = userformat | listseparators = ,\n*%TITLE%,, }}
    Line 13: Line 11:
    document.getElementById('setcat-content').setAttribute('value','['+'[Category:'+this.value+']'+']');
    document.getElementById('setcat-content').setAttribute('value','['+'[Category:'+this.value+']'+']');
    }}
    }}

    {{#input:type=submit|value=Categorise!}}
    {{#input:type=submit|value=Categorise!}}
    }}
    }}
    Line 21: Line 18:
    [[Category:Apache]]
    [[Category:Apache]]
    [[Category:Autonomy]]
    [[Category:Autonomy]]
    [[Category:Artists]]
    [[Category:Authors]]
    [[Category:Agriculture]]
    [[Category:Music]]
    [[Category:3D]]
    [[Category:Audio]]
    [[Category:Aliens]]

    Latest revision as of 08:20, 13 June 2011

    {{#form: {{#input:type=hidden|name=title|value=Select_Category_Example}} {{#input:type=hidden|name=summary|value=Article category updated from form}} {{#input:type=hidden|name=caction|value=append}} {{#input:type=hidden|name=regexp|id=setcat-regexp}} {{#input:type=hidden|name=content|id=setcat-content}}

    {{#input: type   = select
    

    | *Select category{{#dpl: namespace = Category | mode = userformat | listseparators = ,\n*%TITLE%,, }}

                   | onChange = 
                           document.getElementById('setcat-regexp').setAttribute('value','\\[\\[Category:'+this.value+'.*?\\]\\]');
                           document.getElementById('setcat-content').setAttribute('value','['+'[Category:'+this.value+']'+']');
           }}
    

    {{#input:type=submit|value=Categorise!}} }}

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.