WOW>> awsome!! that worked...
all i have to do now is split the string!!

Thanks so much!

and thanks so much for the js resource and the awesomely fast reply!!!

This is great!!!

On 1/31/07, RobG <[EMAIL PROTECTED]> wrote:
>
>
>
>
> On Jan 31, 6:45 pm, Stripe-man <[EMAIL PROTECTED]> wrote:
> > 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();
>
> It is generally better to use an initialiser:
>
>   var delete_name_array = [];
>
>
> >
> > if ((formele.checked == true) && (id)) {
>
> A simpler and sufficient test is:
>
>   if (formele.checked && id) {
>
> Where is the value of 'id' set?
>
> >
> >       delete_name_array[i] = id;
>
> Where is the value of i set?  You might want:
>
>       delete_name_array.push(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
>
> You should be doing something like:
>
>   var n = encodeURIComponent(delete_name_array.join(','));
>   new_window('../popup.php?names=' + n, ... );
>
>
> >
> > even though i told it
> > if ((formele.checked == true) && (id))
> >
> > Im not sure why its doing that
>
> Probably because of the value of i, which I guess is being set as a
> counter in the loop so that you create a sparse array, hence the
> elisions.
>
> For straight javascript questions, use comp.lang.javascript:
>
> <URL: http://groups.google.com/group/comp.lang.javascript >
>
>
> --
> Rob
>
>
> >
>


-- 
"I have learned that you should'nt compare yourself to others - they are
more screwed up than you think." ...unknown

"In the 60's, people took acid to make the world weird.  Now the world is
weird and people take Prozac to make it normal." ..unknown
_____________________________
Terry Remsik
stripe-man.dyndns.org
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to