Message from discussion
multiple dynamic text fields
Received: by 10.68.230.165 with SMTP id sz5mr390467pbc.1.1331275385130;
Thu, 08 Mar 2012 22:43:05 -0800 (PST)
Path: h9ni5249pbe.0!nntp.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From: Jeff North <jnort...@yahoo.com.au>
Newsgroups: comp.lang.javascript
Subject: Re: multiple dynamic text fields
Date: Fri, 09 Mar 2012 17:38:23 +1100
Organization: A noiseless patient Spider
Lines: 65
Message-ID: <r89jl71j687lntrh7q2i2dg7uv4p0710fr@4ax.com>
References: <jivp14$brm$1@speranza.aioe.org> <k3b8l7pp4vorvia9lbtutsmbp780hpdra6@4ax.com> <jjasus$a5t$1@speranza.aioe.org>
Reply-To: jnort...@yahoo.com.au
Mime-Version: 1.0
Injection-Info: mx04.eternal-september.org; posting-host="D/l95vwJ9MoAcPIz7Naijw";
logging-data="22399"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX18tKHUafKcY+/0weoNzvcHk"
X-Newsreader: Forte Agent 6.00/32.1186
Cancel-Lock: sha1:PcfRiDacOf/wfhQFFVa+TVANUEM=
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
On Thu, 8 Mar 2012 18:14:52 +0000 (UTC), in comp.lang.javascript hipa
<hipa.inva...@telenet.be>
<jjasus$a5...@speranza.aioe.org> wrote:
>| Op Mon, 05 Mar 2012 14:33:29 +1100, schreef Jeff North:
>|
>| > On Sun, 4 Mar 2012 13:00:20 +0000 (UTC), in comp.lang.javascript hipa
>| > <hipa.inva...@telenet.be>
>| > <jivp14$br...@speranza.aioe.org> wrote:
>| >
>| >>| Hi
>| >>|
>| >>| I posted this question in comp.lang.php but I got redirected here. | I
>| >>have a page with an autocomplete text field. This works fine. But what |
>| >>I actually want is adding more text fields with the same autocomplete |
>| >>options. It must be an orderpage with multiple order lines. | If I
>| >>choose option 2 from the drop down, 2 text fields are chown. That is |
>| >>ok, but the autocomplete doesn't work.
>| >
>| > Maybe it doesn't work due to the attribute autocomplete='off'
>|
>| If I remove the autocomplete='off', the result is the same.
>|
>| >>| But if I manually type "getuser.php?q=2" in a browser I get a page
>| >>with 2 | text boxes where the autocomplete does work.
>| >
>| > Your are running the php code directly. It has no DTD and therefore the
>| > content is displayed in quirks mode. It is highly probable that the
>| > browser doesn't understand the autocomplete attribute but is using it's
>| > own autocomplete/autofill option.
>| >
>| > Browsers have had this option for years so it would be interesting to
>| > see if this attribute will override the browser setting (I doubt it
>| > though).
>|
>| Is have a DTD, but I didn't show it in this post. See the three dots
>| (...).
>| On the other hand, my autocomplete gets the results from a postgres
>| database. This does work...
>|
>| >>| I don't think I need to show here my complete autocomplete code
>| >>because I | think this is not the point here.
>| >>| When text boxes are generated dynamically is there an underlying id or
>| >>| something given to it? Hope someone can help.
>| >
>| > You need to specify this information when the element is created (see
>| > getuser.php for alteration).
>|
>| When I do it like this:
>|
>| for($i=1;$i<=$q;$i++){
>| echo "<input id='article" . $i . "' name='article" . $i . "'
>| type='text'>";
>| }
>|
>| The same happens. It does work if I manually type "getuser.php?q=2" in a
>| browser. But not when I open the page from the index page.
>|
In your getuser.php file remove all the fluff that is before <?php and
after ?>
See if that helps.
[snip]