I already have the code ,Everything works fine but i want to store the data from a textarea without any formatting into the database.
Currrently it stores data with formatting like (\n)(\r)
i want to strip them off. and use one single line with spaces between words.
i used str_replace() but that does not seem to work.
Can someone helpme with this.
Thanks
User Profile
Collapse
-
How to Remove Carriage return and line feeds.
Hi.
I have form that has a text box. I want insert unformatted text into the database.
Even if the user gives an carriage return or New line feed in the database it should be stored as on single line without any formatting.
I just want to remove
New Line Feed(\n)
Carriage Return(\r)
spaces at the begin and end of the string.
Eg:
If i have
text1(enter key pressed)... -
How to disable enter key inside a text Area?
Hi
i have the following HTML code for the text Area how can i disable the enter key inside the text area.
<td colspan="7"><te xtarea cols="80" onkeypress="key handler<?php echo $x?>()" rows="5" name='ITEM_IN[<?php echo $x;?>][ITEM_NOTE]'><?php echo $_REQUEST['ITEM_IN'][$i]['ITEM_NOTE']);?></textarea></td>
Help will be greatly... -
Javascript function does not work in firefox
Hi,
This code works perfectly in IE but does not work in FireFox.
Also this function requires that the two values to be filled up to calculate the result or else it will display "NaN",How can i avoid displaying "NaN" is there any way i can display a alert saying two values are required?
Could someone please help me...Leave a comment:
-
Onblur does not work
Hi,
I have a javascript function that does a calculation and displays the result in the third function.The function is triggered by onblur function.It does not seem to work in IE nor Firefox.
Please help me.
[HTML]<script>
function probability()
{
var val1 = parseInt(docume nt.getElementBy Id('percentageg o').value);
var val2 = parseInt(docume nt.getElementBy Id('percentagew in').value);... -
Hi ,
Thanks for your replay,Below is the generated HTML code.
HTML FOR FIRST LINE ITEM
tr class="headerBG ">
<th class="bodyText White">% Go</th>
<th class="bodyText White">% Win</th>
<th class="bodyText White">Probabil ity</th>
...Leave a comment:
-
Calculating probability only works on the last box
I have a PHP and javascript code to take value from two text boxes and calculate on triggering the "OnBlur" function and display in the third box.
The code works fine with one line item,If i have more that one line item.i will be able too calculate the value only for the last line item added ,But if i change any of the values in the two boxes from which it takes values.The probablity will not be recalculated.
... -
How to calculate in multiple line items?
I have a javascript code to take value from two text boxes and calculate on triggering the "OnBlur" function and display in the third box.
The code works fine with one line item,If i have more that one line item.i will be able too calculate the value only for the last line item added ,But if i change any of the values in the two boxes from which it takes values.The probablity will not be recalculated.
Could...
No activity results to display
Show More
Leave a comment: