Difference between revisions of "User:Nad"

From FollowTheScore
Jump to: navigation, search
(New page: Category:Examples {{news|title=Ajax links|img=|msg= Here's another example of using SimpleForms ajax inputs. This example shows how to use inputs with the...)
 
m
Line 1: Line 1:
[[Category:Examples]]
 
{{news|title=Ajax links|img=|msg=
 
Here's another example of using [[MW:Extension:Simple Forms|SimpleForms]] ajax inputs. This example shows how to use inputs with the ''link'' parameter which renders the input as a normal hyperlink which is independent of any form. The link parameter is set to either a URL or an article title. The first two example links below use an article title, the first exists and the second doesn't. The third example has ''link'' set to a relative URL and sends content to be rendered directly without any associated article title.
 
 
Click the links in the second column to dynamically load the result into the third column:
 
 
<table border cellpadding=5 cellspacing=0 width=100% style=text-align:center>
 
<table border cellpadding=5 cellspacing=0 width=100% style=text-align:center>
 
<tr><th>Wikitext</th><th>Rendered&nbsp;link</th><th width=100%>Response</th></tr>
 
<tr><th>Wikitext</th><th>Rendered&nbsp;link</th><th width=100%>Response</th></tr>
Line 38: Line 33:
 
</tr>
 
</tr>
 
</table>
 
</table>
}}
 

Revision as of 23:25, 26 July 2007

WikitextRendered linkResponse
{{#input: type   = ajax
	| update = example1
	| link   = foo
	| ONE
}}
{{#input:type=ajax|update=example1|link=foo|ONE}}
this is a div with id set to example1
{{#input: type   = ajax
	| update = example2
	| link   = no-such-article
	| TWO
}}
{{#input:type=ajax|update=example2|link=no-such-article|TWO}}
this is a div with id set to example2
{{#input: type   = ajax
	| update = example3
	| link   = /wiki/index.php?content=<nowiki>[[foo]]</nowik1>
	| THREE
}}
{{#input:type=ajax|update=example3|link=/wiki/index.php?content=[[foo]]|THREE}}
this is a div with id set to example3