Re: how to make getJson parameter dynamic

2011-06-03 Thread Romi
lee carroll: Sorry for this. i did this because i was not getting any
response. anyway thanks for letting me know and now i found the solution of
the above problem :)
now i am facing a very strange problem related to jquery can you please help
me out.

$(document).ready(function(){
 $(#c2).click(function(){
var q=getquerystring() ;

   
$.getJSON(http://192.168.1.9:8983/solr/db/select/?wt=jsonq=+q+json.wrf=?;,
function(result){
$.each(result.response.docs, function(i,item){
alert(result.response.docs);
alert(item.UID_PK);
});
});
});
});


when i use $(#c2).click(function() then it does not enter in $.getJSON()
and when i remove $(#c2).click(function() from the code it run fine. Why
is so please explain. because i want to get data from a text box on
onclickevent and then display response.



-
Thanks  Regards
Romi
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-make-getJson-parameter-dynamic-tp3014941p3018732.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to make getJson parameter dynamic

2011-06-03 Thread Erick Erickson
Romi:

Please review:
http://wiki.apache.org/solr/UsingMailingLists

This is the Solr forum. jQuery questions are best directed at a
jQuery-specific forum.

Best
Erick

On Fri, Jun 3, 2011 at 2:27 AM, Romi romijain3...@gmail.com wrote:
 lee carroll: Sorry for this. i did this because i was not getting any
 response. anyway thanks for letting me know and now i found the solution of
 the above problem :)
 now i am facing a very strange problem related to jquery can you please help
 me out.

 $(document).ready(function(){
         $(#c2).click(function(){
            var q=getquerystring() ;


 $.getJSON(http://192.168.1.9:8983/solr/db/select/?wt=jsonq=+q+json.wrf=?;,
 function(result){
                $.each(result.response.docs, function(i,item){
                    alert(result.response.docs);
                    alert(item.UID_PK);
                });
            });
        });
        });


 when i use $(#c2).click(function() then it does not enter in $.getJSON()
 and when i remove $(#c2).click(function() from the code it run fine. Why
 is so please explain. because i want to get data from a text box on
 onclickevent and then display response.



 -
 Thanks  Regards
 Romi
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/how-to-make-getJson-parameter-dynamic-tp3014941p3018732.html
 Sent from the Solr - User mailing list archive at Nabble.com.



how to make getJson parameter dynamic

2011-06-02 Thread Romi
 
$.getJSON(http://192.168.1.9:8983/solr/db/select/?q=diamondwt=jsonjson.wrf=?;,
function(result){

 alert(hello + result.response.docs[0].name);
});
});

using this i am parsing solr json response, but as you can see it is hard
coded (q=diamond) how can i make it user's choice. i mean user can pass the
query at run time for example using a text box.

-
Thanks  Regards
Romi
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-make-getJson-parameter-dynamic-tp3014941p3014941.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to make getJson parameter dynamic

2011-06-02 Thread lee carroll
Hi Romi, this is the third thread you have created on this subject.
Its not good and will get you ignored by many people who could help.

The question relates to js rather than SOLR now. See any good js
manual or site for how to assign values to a variable and then
concatanate these into a string.

lee c

On 2 June 2011 13:40, Romi romijain3...@gmail.com wrote:
  $.getJSON(http://192.168.1.9:8983/solr/db/select/?q=diamondwt=jsonjson.wrf=?;,
 function(result){

  alert(hello + result.response.docs[0].name);
 });
 });

 using this i am parsing solr json response, but as you can see it is hard
 coded (q=diamond) how can i make it user's choice. i mean user can pass the
 query at run time for example using a text box.

 -
 Thanks  Regards
 Romi
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/how-to-make-getJson-parameter-dynamic-tp3014941p3014941.html
 Sent from the Solr - User mailing list archive at Nabble.com.