Mohnish J. wrote in post #992221:
> Walter Davis wrote in post #992117:
>> On Apr 11, 2011, at 6:05 AM, Mohnish G j wrote:
>>
>>> choice on that ..:) .
>>> In case you aren't able to get a better understanding of what I have
>>> complete method is allowing me to modify the basic functionality to
>>> - Group Specific Profile Pic(s) starting
>>> displayed) 3(dummy value here)
>>> would look, Kindly register in www.diasp.org and search for any random
>>> <% for inv_group in @investor_group2 %>
>>> What I need is to implement is a **on click in Rails** which will
>>> If I can figure out how to reduce the formatting space between each of
>>> to
>>>
>>> Thank you..
>>>
>>
>>
>> Script.aculo.us Ajax.Autocompleter has a feature for just this
>> purpose. You can strip your entire onclick business back out, and use
>> just plain vanilla Autocompleter. All you need to do is change a tiny
>> thing in your Rails view that returns the autocomplete results.
>> Everything that you don't want to be populated into the result field
>> when a user clicks should be wrapped in a span.informal.
>>
>> <li><span class="informal">[image tag]</span>India<span
>> class="informal">Some other descriptive text.</span></li>
>>
>> If a user clicks on that option in the suggestion list, only the word
>> India will be entered into the text field that spawned the
>> autocompleter.
>>
>> So in your Rails template for the autocompleter results, just wrap
>> everything that you don't want to be entered in a span.informal, and
>> you can have at it. If you wanted fake columns in your results, you
>> could do:
>>
>> <li><span class="informal icon">[image tag]</span>India<span
>> class="informal description">Some other descriptive text.</span></li>
>>
>> and use more CSS on .icon and .description to make those "columns" a
>> particular width.
>>
>> Walter
>
> Hi Walter,
>
> Thanks a lot , your solution of using the span tag did exactly what I
> needed. I have to still play around with trying to fix the width wrt the
> fields using CSS. I shall post queries on this , if any.
>
> I have posted the same question on stackoverflow(
>
http://stackoverflow.com/questions/5595613/implementing-a-onclick-kind-of-functionality-and-formatting-wrt-rails-partial-vie
> ).
>
> If you have a profile there, kindly post your answer there so that I
> could accept the same. Or if you wouldn't want to do it, I with your
> permission would submit the same for it to be useful to anyone in the
> open source community....
>
>
> Thanks again..
Hi Walter,
I am a novice wrt sytlesheets and still don't have a good stronghold on
html concepts,
I tried some code below in my _index.html.erb :-
<div class="description">
<ul>
<%= javascript_include_tag :defaults, :cache => true %>
<%=stylesheet_link_tag "groups"%>
<% for inv_group in @investor_group2 %>
<%=image_tag "investor_groups/#{inv_group.title}.jpg" , :width =>
'40', :height => '22', :align => 'left' %><li><%=h
inv_group.title%>(<%=h inv_group.activated_members.size %>)</li>
<%end%>
</ul>
</div>
and In my groups.css I did something like:-
.description{
width: 40%
}
.icon{
width: 40%
}
.
This change in the code had an affect on the auto complete functionality
and now a particular group doesn't get highlighted on doing a mouse over
to it(Kindly refer:-
http://imagepaste.nullnetwork.net/viewimage.php?id=2054 ). I am not sure
where I am doing what wrong that the functionality is getting affected
as a result.
Kindly guide me to correct my mistake(s) on this
Thanks..
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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-talk?hl=en.