Welcome Guest, Not a member yet? Register   Sign In
URL - HELP
#1

[eluser]starbuck[/eluser]
Hi,

İ am fresh in Codeigniter. While i'm developing a facebook, i got a trouble.

In default controller derby->method index->view page:

<a href="nextcontroller/index/id/2">

When i clicked link,new page loads. In new view pagei i have another link. It's href part is empty. When i click it, jquery works.

$(function() {
$(".vote").click(function()
{
var id = $(this).attr("id");
var name = $(this).attr("name");
var derby_team = $(this).attr("rev");
var dataString = 'id='+ id + '&derby;_team=' + derby_team ;
var parent = $(this);
if(name=='up')
{

$(this).fadeIn(200).html('<img src="img/dot.gif" align="absmiddle">');
$.ajax({
type: "POST",
dataType: 'json',
url: "&lt;? echo base_url(); ?&gt;nextcontroller/votehome",
data: dataString,
cache: false,
success: function(html)
{
var vote_home = html.home;
parent.html(vote_home);
var vote_away = 100 - vote_home;
$("#away").text(vote_away);
}
});
}

My problem is: exampe.com/nextcontroller/method2 (I wanted that)

but i have that exampe.com/nextcontroller/index/id/2/nextcontroller/votehome

It adds previous url to new.


Messages In This Thread
URL - HELP - by El Forum - 12-11-2013, 02:35 PM
URL - HELP - by El Forum - 12-11-2013, 03:03 PM
URL - HELP - by El Forum - 12-11-2013, 03:15 PM
URL - HELP - by El Forum - 12-11-2013, 05:08 PM
URL - HELP - by El Forum - 12-12-2013, 02:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB