Difference between revisions of "Talk:Ajax form example"

From Organic Design wiki
(bug fix)
(Code inconsistency)
Line 5: Line 5:
 
::::Ok, it's not working when I change computer - another damn bug needing to be fixed :-( --[[User:Nad|Nad]] 19:51, 24 July 2007 (NZST)
 
::::Ok, it's not working when I change computer - another damn bug needing to be fixed :-( --[[User:Nad|Nad]] 19:51, 24 July 2007 (NZST)
 
:::::Found the problem - had to disable all caching for requests which use ''content'' and not ''title'' --[[User:Nad|Nad]] 20:19, 24 July 2007 (NZST)
 
:::::Found the problem - had to disable all caching for requests which use ''content'' and not ''title'' --[[User:Nad|Nad]] 20:19, 24 July 2007 (NZST)
 +
 +
== Code inconsistency ==
 +
 +
Note the difference and why I fixed it. This is the code on the page:
 +
 +
<pre>
 +
{{#form:style=width:400px|
 +
{{#input:type = hidden | name = content | value = <nowiki> {{#dpl:category={{#request:cat}}}} </nowiki> }}
 +
{{#input:type  = select
 +
| name  = cat
 +
| *Select category {{#dpl: namespace = Category | mode = userformat | listseparators = ,\n*%TITLE%,, }}
 +
}}
 +
{{#input: type = ajax | value = List members | update = listcat-result}}
 +
<div id="listcat-result">''No results to display...''</div>
 +
}}
 +
</pre>
 +
 +
This is what you claim is the same code (it's not the same formatting and uses <code>& lt;</code> (no space but won't render as text without it) instead of <tt><</tt>):
 +
 +
<pre style=background:none;font-size:8pt;padding:20px>
 +
{{#form:
 +
 +
{{#input: type  = hidden
 +
| name  = content
 +
| value  = &lt;nowiki> {{#dpl:category={{#request:cat}}}} &lt;/nowiki>
 +
}}
 +
 +
{{#input: type  = select
 +
| name  = cat
 +
| *Select category {{#dpl: namespace = Category | mode = userformat | listseparators = ,\n*%TITLE%,, }}
 +
}}
 +
 +
{{#input: type  = ajax
 +
| value  = List members
 +
| update = listcat-result
 +
}}
 +
}}
 +
 +
<div id="listcat-result">''No results to display...''</div>
 +
</pre>
 +
 +
Note the <tt><nowiki>}}</nowiki></tt> is ''before'' the <tt><nowiki><div></nowiki></tt> in the second code but ''after'' the <tt><nowiki><div></nowiki></tt> in the first code...
 +
-[[User:Eep²|Eep²]] 13:50, 19 August 2007 (NZST)

Revision as of 01:50, 19 August 2007

Submit button appears to be broken --Sven 11:37, 26 June 2007 (NZST)

Still...almost a month later Some organic design, eh? -Eep² 16:19, 24 July 2007 (NZST)
It's not like I'm paid to sit here doing this shit all day ya know! --Nad 19:31, 24 July 2007 (NZST)
What do you mean anyway - this example is working fine? I thought it was only the Ajax links example that wasn't working?! --Nad 19:43, 24 July 2007 (NZST)
Ok, it's not working when I change computer - another damn bug needing to be fixed :-( --Nad 19:51, 24 July 2007 (NZST)
Found the problem - had to disable all caching for requests which use content and not title --Nad 20:19, 24 July 2007 (NZST)

Code inconsistency

Note the difference and why I fixed it. This is the code on the page:

{{#form:style=width:400px|
	{{#input:type = hidden | name = content | value =  {{#dpl:category={{#request:cat}}}}  }}
	{{#input:type  = select
		| name  = cat
		| *Select category {{#dpl: namespace = Category | mode = userformat | listseparators = ,\n*%TITLE%,, }}
		}}
	{{#input: type = ajax | value = List members | update = listcat-result}}
<div id="listcat-result">''No results to display...''</div>
}}

This is what you claim is the same code (it's not the same formatting and uses & lt; (no space but won't render as text without it) instead of <):

{{#form:

	{{#input: type   = hidden
		| name   = content
		| value  = <nowiki> {{#dpl:category={{#request:cat}}}} </nowiki>
	}}

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

	{{#input: type   = ajax
		| value  = List members
		| update = listcat-result
	}}
}}

<div id="listcat-result">''No results to display...''</div>

Note the }} is before the <div> in the second code but after the <div> in the first code... -Eep² 13:50, 19 August 2007 (NZST)