473,774 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Phantom of the TEXTAREA

105 New Member
Ok, I've been spending hours trying to catch this "phantom" bug but just cant locate it.
This is the code
[php]
<?php


//this is an array containing the filed attribute
$field = array();

$field["NAME"] = 'Description';
$field["ID"] = 'Description';
$field["COLS"] = 3;
$field["ROWS"] = 4;
$field["CLASS"] = "dummy";
$field["DUMMY1"] = "dummy";
$field["DUMMY2"] = "dummy";
$field["DUMMY3"] = "dummy";
$field["DUMMY4"] = "dummy";

//I left some details out to make is easier to read, but I'm sure you get the picture
//now I print these attribuets
$holder_variabl e = NULL;
foreach ($field as $attribute => $value)
{
$holder_variabl e .= " $attribute='$va lue' ";
}

print $holder_variabl e;

//the eventual result should have been something like this :
// Name='Descripti on' ID='Description ' COLS='75' ROWS='20' CLASS='hidden' DUMMY1='dummy' DUMMY2='dummy' DUMMY3='dummy' DUMMY4='dummy'

//but what actually happens is this
//Name='Descripti on' ID='Description ' COLS='75' ROWS='20'

?>
[/php]
Can any of you good people out there shed any light on this matter?
Oh, and if its of any importance, the codes belong to a class member, running on php5
I'll be glad to share the whole class with you if you need more info
Sep 17 '07 #1
2 1382
Atli
5,058 Recognized Expert Expert
Hi Aktar.

I copied your code and ran it on my test server, which is PHP 5.1.6 btw.
I got these results:
Expand|Select|Wrap|Line Numbers
  1. NAME='Description' ID='Description' COLS='3' ROWS='4' CLASS='dummy' DUMMY1='dummy' DUMMY2='dummy' DUMMY3='dummy' DUMMY4='dummy'
  2.  
Isn't that what you expected?

The problem could be in the rest of the method... could you post the entire method this code belongs to?
Sep 17 '07 #2
aktar
105 New Member
Hi Aktar.

I copied your code and ran it on my test server, which is PHP 5.1.6 btw.
I got these results:
Expand|Select|Wrap|Line Numbers
  1. NAME='Description' ID='Description' COLS='3' ROWS='4' CLASS='dummy' DUMMY1='dummy' DUMMY2='dummy' DUMMY3='dummy' DUMMY4='dummy'
  2.  
Isn't that what you expected?

The problem could be in the rest of the method... could you post the entire method this code belongs to?

Yes I got the same output when I ran it as a seperate script. But the same thing didnt run in the class.. very strange

I have since re-structured the method and textarea output seems to print nicely as expected

I was actually hoping that its some kind of PHP bug or something and not the actual script so I can vindicate myself :D

Thanks for looking
Sep 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
16723
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go, then a generic element's font will do OK, too. What's the correct way to do this, please (so that it will also work for IE 6)? The motivation for this is that I have some text on the screen and I want to insert a textarea element between the...
1
3576
by: Volt | last post by:
is there any way to select and mark part of text in textarea by regular expression? i need to select the first string in textarea whitch is like xxxxx,xxx where x is any character
3
2359
by: memememe | last post by:
I see weak reference on the .net api, but I do not see soft or phantom, are they supported on .net?
0
1242
by: Rod Billett | last post by:
The included html contains 3 divs. One primary Div, with 2 nested divs. the second nested DIV contains an empty table. Problem 1: Phantom Space. When viewed within the browser, the div 'action panel' is spaced a picel or two lower than the div 'ItemsPanel' even though both are the same height. Oddly enough, if you remove the table (ID Removemetowork) this phantom space dissappears and everything is fine with the world Problem 2:...
4
4261
by: TJS | last post by:
can the rows and columns of a textarea element with an id be changed on the fly ? if so is there an example ?
9
1272
by: Dave | last post by:
Apologies if this has come up before, but I can't find it if it has. I am fairly new to .Net and am having problems with ghosts in the datagrid. Basically I have a find screen that accepts search criteria, then interrogates a database to find all matching records. These are put into a dataset, which has a dataview that is used as the datasource of my datagrid, which is read only. The idea is that the user selects which record they...
6
5991
by: wperry1 | last post by:
I am writing a small database utility to catalog all of my favorite ASM/JS/VBS... functions and scripts on an asp page. Everything is going smoothly except for one thing that I can't quite seem to think my way around. I am using a <textarea> to display the code but some of my scripts have <textarea> tags in them and when the </textarea> tag is entered, it closes my <textarea> and the rest of the code ends up outside of the textarea.
9
1596
by: TB | last post by:
Hi all: I realize that this is strictly speaking not an ASP.NET question, but since most of you people out there SQL gurus as well, I hope you will bear with me on this occasion: I would like to know how to create a "phantom" record when running a SELECT query. For example:
3
5672
by: FunkHouse9 | last post by:
I'm working on a form to collect data in a textarea which and am trying to keep returns and spaces. I have a couple of functions that I Frankensteined together to replace returns with <br> and to replace spaces with &nbsp;. The <br> part works well enough, but I keep getting "%20" instead of "&nbsp;" for the spaces. I understand that escape() changes " " to "%20", but I would think the ConvertSpaces function below would change the %20 to...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.