I know this is a JS question.. but i have a string being passed through the
url and it has a comma leading it... IE:
I have this function:
this is running through a for loop to get all the checked boxes in all forms
on the page.
var elete_name_array = new Array();
if ((formele.checked == true) && (id)) {
delete_name_array[i] = id;
}
//this is a pupup window function i have
new_window('../popup.php?names=' + delete_name_array);
when i view the url this is whats getting passed...
popup.php?string=,,,,,,,,,bob,mary,sue,bill,mike
even though i told it
if ((formele.checked == true) && (id))
Im not sure why its doing that
I would like to trim this value before it gets sent to the url...(all post
and pre commas)
can someone please tell me how to do this.. i tried googgling it.. not sure
why im not finding what im looking to do.
probably the bes thing is to be sure there is a checked value which that IF
statement should be doing in eitehr solution..
id still like to know how to trim these types of values that are statically
specified or a string of stripped chars via an array!
tks much guys... I hope i have provided enough info this time :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---