 |
| HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 16th, 2005, 04:30 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Align text in textarea
|
|

May 17th, 2005, 10:54 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
|

May 19th, 2005, 06:36 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i am bringing the textarea's content back from XML. Its seems to move the content more to the centre of the textarea.
Code:
<textarea name="content<%=a%>" id="content<%=a%>" cols="100" rows="5" wrap="PHYSICAL" style="font-family:Verdana, Arial, Helvetica, sans-serif; text-align:left">
<%
if left(rulexml.selectnodes("rules").item(0).selectnodes("fare_rule_lines").item(a).selectnodes("content").item(0).text,15) <> "<table><tr><td>" then
response.write "<table border=1><tr><td>"
end if
%>
<%=fix_characters(rulexml.selectnodes("rules").item(0).selectnodes("fare_rule_lines").item(a).selectnodes("content").item(0).text)%>
<%
' if there is no end table tag then create one to end the table
if right(rulexml.selectnodes("rules").item(0).selectnodes("fare_rule_lines").item(a).selectnodes("content").item(0).text,18) <> "</td></tr></table>" then
response.write "</td></tr></table>"
end if
%>
</textarea>
www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt
|
|

May 20th, 2005, 06:28 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
|

May 20th, 2005, 06:59 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
The output of that script would be more useful. Do you write a table in the textarea? You can't do that.
(o<
//\ =^..^=
|
|

May 20th, 2005, 07:02 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
inside my textarea is:
<table><tr><td>AF</td><td>UK/CDG</td></tr><tr><td>(AF)</td><td>All flights must be booked under AF prefix</td></tr><tr><td>WORLDWIDE / NORTH ATLANTIC</td></tr><tr><td>(AF)</td><td>all flights to be booked under AF prefix</td></tr><tr><td>Code share flights (AF prefix)</td></tr><tr><td>Franchise Flights (AF prefix)</td></tr><tr><td>Exception</td></tr><tr><td>These cannot be combined with KLM flights.</td></tr><tr><td>KL</td><td>UK/AMS</td></tr><tr><td>(KL)</td><td>KLM & KLM Cityhopper UK</td></tr><tr><td>WORLDWIDE / TRANSATLANTIC</td></tr><tr><td>(KL)</td><td>KLM</td></tr><tr><td>Please note irrespective of the ticket stock used (057 or 074), AF/KL combinations are only permitted</td></tr><tr><td>when the operating or marketing carrier is Air France or KLM only. In this case only, AF and KL flight</td></tr><tr><td>prefixes must be used. Under no circumstances does the combination permit other partner airlines.</td></tr>
www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt
|
|

May 20th, 2005, 07:13 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Well, you can't do that. A textarea can only contain plain text, i.e. no tags.
Nevertheless, the text is left aligned for me. 
|
|

May 20th, 2005, 07:13 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
|

May 20th, 2005, 07:18 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
|
 |