Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Replace commas in values in an array

Thread Tools

Replace commas in values in an array

Adrienne Boswell
Posts: n/a
Although this is a client side issue, I am also posting to asp.general
in case there is someway to do this only server side (which I would

Here's my form:

<form method="post" action="<%=request.servervariables("Script_name")
<% for i - 0 to 4%>
Header: <input type="text" name="header" id="header<%=i%>"
Description: <input type="text" name="description" id="description<%=i
%>" onblur="function(this)">
<% next%>
<input type="submit" value="Submit">

When the data gets returned it's something like:
header: "socks, shoes, pizza, cats, dogs"
description: "good for feet, wear with socks, cheese only, have lots
of hair, bark a lot"

Problem comes when the description or header have a comma. I need a
little javascript that will replace the comma with a semicolon client
side before it gets to
the server, preferably as they leave the field.

Any help with this would be much appreciated.

Adrienne Boswell at work
Please respond to the group so others can share

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Idiomatic Printing an array with commas Chuck Brotman Ruby 6 06-18-2010 03:08 AM
Find and replace with values from array with gsub Allan Ruby 5 03-03-2010 03:42 AM
replace spaces with commas? John Griffiths Ruby 7 11-05-2008 02:42 PM
Replace commas in values in an array Adrienne Boswell ASP General 12 04-10-2007 05:53 AM
replace double inverted commas into slash double inverted commas in string AviraM Java 2 09-28-2006 06:19 PM