Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.fsmpi.rwth-aachen.de!uucp.gnuu.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <5682005.goIip4NAP1@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sun, 28 Jul 2013 18:15:09 +0200 User-Agent: KNode/4.10.5 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. MIME-Version: 1.0 Lines: 87 NNTP-Posting-Date: 28 Jul 2013 18:15:11 CEST NNTP-Posting-Host: 35d7a0d0.newsspool2.arcor-online.net X-Trace: DXC=BToDGG80eGg;iVb[J9ZZP`A9EHlD;3Ycb4Fo<]lROoRa8kF9fC[KCe`cf388o2NQe X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:20817 Mad Hatter wrote: ^^^^^^^^^^ Please get a real name. > First off I'm absolutely useless at javascript. Good, because there is no such programming language: > I like playing around with PHP. I had a working PHP script which had a > form which included a text box. I used the following script which I found > somewhere on the net a long time ago to insert text depending on what > button was pressed:- > > Always validate your generated markup: And the proper syntax is: > and an assortment of buttons along the lines of :- > height="15" alt="Italic" border="0" /> Italic There are even better ways, of course. Consider generated “button” elements, where no navigation will take place when there is insufficient client-side script support (as the buttons will not be generated then in the first place). > This worked fine when the form was the following type :- > >
> > I've just had to alter the form type to include file uploads so forms are > now :- > name='newtopic'> > > The text input box hasn't altered :- It should have been. > Variable expansion is pointless there. What is missing is escaping of output to prevent code injection: > Since I've altered to the ENCTYPE='multipart/form-data' form input my > buttons no longer work. Nothing at all. Can anyone tell me why and suggest > a fix please. Adding the “enctype” attribute alone does not cause this problem. There is relevant code that you are not showing. Please post the public URL of a reduced testcase. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.