Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-07-2008, 03:23 PM
Junior Member
 
Join Date: May 2008
Posts: 7
Exclamation Problem with Ajax Request URI - help!

Hi guys I'm working with Dojo and teh Zend Framework and seem to have some problems with respect to the request urls which I pass to my Ajax request objects.

Like lets say Im on the index page and wish to access an ajax action on lets say :

PHP Code:
index/doajax 
So just adding 'doajax' as the request url upon setting up a doajaxAction function in my indexcontroller is no issue however if lets say my browser page url has a few params added to it eg:

PHP Code:
index/page/
Now if I try to call the original request url it sends a call to

PHP Code:
index/page/2/doajax 
...appending the action to the end of the whole url, messing it all up! How do I fix this issue I really need some help on this guys!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-07-2008, 04:49 PM
Junior Member
 
Join Date: Jun 2008
Posts: 7
Default

Not sure if this is related but I had a similar problem with urls growing longer and longer with each click within the same page, ie

controller/action

[click]

controller/action/parameterA/1

[click]

controller/action/parameterA/1/parameterB/2

[click]

controller/action/parameterA/1/parameterB/2/parameterC/3

and so on...

I was using the url helper to create URLs, ie

PHP Code:
<a href="<?php echo $this->url(array('controller'=>'invoices',
'action'=>'index','parameterA'=>'1'));?>">Link</a>
I discovered (after many hours on Google) that the URL helper takes some extra parameters :

PHP Code:
<a href="<?php echo $this->url(array('controller'=>'invoices',
'action'=>'index','parameterA'=>'1'), ''true);?>">Link</a>
which seem to reset the url each time you click.

Hope this helps
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-08-2008, 10:45 AM
Junior Member
 
Join Date: May 2008
Posts: 7
Default

Yippee that fixed it - thanks a lot for the help man
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:58 PM.