|
mtfm -> RE: text box question (5/27/2008 17:28:22)
|
There's also a Javascript method available, too. I also substituted for the quote, but I put a - in place of it, because a single quote caused problems with the javascript. You could also replace it with nothing, just be removing the - from the code. Here's my code.
var variable_name = new_variable_name.replace (/"/g,'-');
You're basically taking your variable you should have already declared, manipulating it to remove the ' and declaring a new variable. Then when it comes time to insert the form result into your database, make sure that code calls the new variable name, and you're done. On a side note, if you are doing much in javascript look into what's called "regular expressions." This is an example of one, and it is much, much easier than explicitly stating the if/then paramaters.
|
|
|
|