Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: CGI::Ajax Template::Toolkit mod_perl question.

by dsheroh (Prior)
on Jun 14, 2012 at 15:30 UTC ( #976233=note: print w/replies, xml ) Need Help??

in reply to CGI::Ajax Template::Toolkit mod_perl question.

CGI::Ajax does a lot of magic behind the scenes when you call build_html in order to make the AJAX bits work. The .../apache2 URL is likely to be coming from there - take a look at the page returned by your code and you should be able to find it in the HTML <head> in a chunk of javascript inserted by CGI::Ajax.

As far as how to prevent it... You pretty much can't, as far as I was ever able to figure out. You'll probably need to restructure your URI space so that the URLs generated by CGI::Ajax will work and be equivalent to the "normal" URLs that you use elsewhere. (This sort of thing is one of the main reasons I don't use CGI::Ajax any more... It's wonderfully easy to use for things that fit how it wants to do things, but you're pretty much screwed when you hit a case that it doesn't Just WorkTM for.)

Replies are listed 'Best First'.
Re^2: CGI::Ajax Template::Toolkit mod_perl question.
by Ransom (Beadle) on Jun 14, 2012 at 15:38 UTC

    ajax[l].url = 'apache2?' + ajax[l].url; is in the header. I'm thinking this must be where it comes from.

    Seeing that I've only spent roughly half a day on this, I'm perfectly fine switching technologies. Do you have any recommendations in order to get some dynamic content? All I need is a selection from 1 listbox to affect the contents of a 2nd listbox... rinse repeat. Ideally I would like to do this without page refreshes since it would add up to about 6 refreshes per session.

    Thanks for your input and quick response

Re^2: CGI::Ajax Template::Toolkit mod_perl question.
by Anonymous Monk on Jun 14, 2012 at 15:38 UTC

    .../apache2 URL is likely to be coming from ther

    No way :) Thought it won't hurt to check, say after turning on DEBUG/JSDEBUG

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://976233]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-06-22 11:45 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.