473,382 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Phantom of the TEXTAREA

105 100+
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_variable = NULL;
foreach ($field as $attribute => $value)
{
$holder_variable .= " $attribute='$value' ";
}

print $holder_variable;

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

//but what actually happens is this
//Name='Description' 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 1364
Atli
5,058 Expert 4TB
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 100+
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
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,...
1
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
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
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...
4
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
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...
6
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...
9
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...
3
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.