Forum Moderators: open

Message Too Old, No Replies

Special character

         

prasu2fun

9:26 am on Feb 11, 2011 (gmt 0)

10+ Year Member



how to pass the special character ampersand '&' from javascript to database?

For viewing in html i used & ,but it wont save data in database

Fotiman

2:17 pm on Feb 11, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Welcome to WebmasterWorld.
How are you trying to store it? You can't pass directly from JavaScript to a database. You would need some server side language (PHP, ASP, etc.) to take the value and store it in a database.

prasu2fun

4:09 am on Feb 15, 2011 (gmt 0)

10+ Year Member



No.Actualy the value we are selecting through the IPdropbox.Consider i need to select A & B,But this value is not storing in the database.Here i am attaching my html code

<td><select name="AMPERSAND" class="ipDrpBox" id="AMBERSAND">
<option value="AMPERSAND:A & B">A & B</option>
<option value="AMPERSAND:B & C">A & B</option>
</td>


The id all thing we are passing through the javascript to database.

Fotiman

5:20 am on Feb 15, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not familiar with IPdropbox. However, in the example you posted, you appear to have a typo in the id attribute of the select element ("AMBERSAND" vs. "AMPERSAND" as in the name attribute).