Cross Domain get data through doamin

8 views
Skip to first unread message

sugam prakash

unread,
Feb 19, 2014, 3:06:17 AM2/19/14
to xamp...@googlegroups.com
Hello Friends,

Now i am trying.

http://pastebin.com/41V00mEY

function getCategory(pincode){
      var URL = 'http://www.popcracker.com/pincode-api/pincode.php?';
      $.ajax({
        url:URL,
        data:{'id':id},
        dataType:'json',
        type:'POST',
        beforeSend:function(){  $('#'+divId+'_loader').html('<img src="loading.gif">');},

        success:function(data){
          var pincode=getParameterByName('pincode');
function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); }
complete:function(){
         
          setTimeout(function(){
              $('#'+divId+'_loader').html('');
          },1000)
        },
        error: function(xhr,status,error) { alert('Error: ' + status) ; }
      });
    }
    getCategory(0,'main_cat_div','maincat');

    $('#maincatId').live('change',function(){
      $('#sub_cat2_div').html();
      var id = $(this).val();
      getCategory(id,'sub_cat_div','subcat1');
    });

    $('#subcat1Id').live('change',function(){
      var id = $(this).val();
      getCategory(id,'sub_cat2_div','subcat2');
    });

  });

Nagarajan P

unread,
Feb 19, 2014, 3:57:41 AM2/19/14
to xamp...@googlegroups.com
did you get any error or what?


--
Ask New Question from : https://groups.google.com/forum/?fromgroups#!newtopic/xamppdev
 
Create filter of mails from this group http://www.wikihow.com/Create-a-Filter-in-Gmail
---
You received this message because you are subscribed to the Google Groups "PHP Developers' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xamppdev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xamppdev/1d4e38e8-2843-497e-89f3-7f3a9e67a0a3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

sugam prakash

unread,
Feb 19, 2014, 4:07:41 AM2/19/14
to xamp...@googlegroups.com
I am getting parse error.



For more options, visit https://groups.google.com/groups/opt_out.



--
Sugam Prakash
Web Developer
9910324578
Comic Con India
Reply all
Reply to author
Forward
0 new messages