PDA

View Full Version : Grid



alien3d
5 Jan 2007, 10:49 PM
I success try the yui-ext and it's cool effect.An intranet project.But i have one problem on grid
When you try to put like address in grid it will said error.I have tested at three browser the effect error are the same.
E.g

aaa
aaa
aaa

When pull data on the grid in will not shown.
Maybe end of this month official intranet to show to everyone how cool it is to combine with the yui-ext

brian.moeskau
5 Jan 2007, 10:57 PM
First off, this is not a bug -- please post help requests to the Help forum in the future.

Regarding your issue, you haven't given us much to go on here. Please post a live page or at least some code that shows what you're trying to do. Are you getting any errors?

Please take a look here and see if any of the advice helps:
http://jackslocum.com/manual/faq#how_do_i_figure_out_what_error_x_is_and_why_it_s_happening

alien3d
5 Jan 2007, 11:03 PM
Is said something about string.Are empty string cannot put in the text.My only choice now just using php to trim space.

brian.moeskau
5 Jan 2007, 11:08 PM
"Please post a live page or at least some code that shows what you're trying to do." No one will be able to help you without some idea of what you're doing.

Animal
6 Jan 2007, 1:25 AM
"It said something..." :?: :?: :?:

Are you serious? :roll:

JeffHowden
6 Jan 2007, 1:45 AM
aaa
aaa
aaa


JavaScript doesn't support spanning strings across multiple lines without breaking out of the string, using the concatenation operator (+), then starting a new string. For example:


myString = 'foo'
+ 'bar'
+ 'boo'
+ 'far'

That won't preserve the new lines in your original text though. To do that, you'll need to make your strings "JavaScript-safe" by replacing carriage returns with \r and linefeeds with \n. So, your example string would become:


\r\naaa\r\naaa\r\naaa\r\n

alien3d
7 Jan 2007, 7:37 PM
The solution i have been made for that problem are
<?
function parse_str($datafromgrid) {
$datafromgrid=urlencode($datafromgrid);
// encode to computer form
$datafromgrid=str_replace('%d%a,'+',$datafromgrid);
// replace the empty string into one space
$datafromgrid=urldecode($datafromgrid);
// decode back to proper javascript understand
return($datafromgrid);
}
?>
I have try trim but at last i create a php function to cover up javascript problem.Problem arise
when to add an address to a textarea and put into the grid