javascript to call absolute url for image search

Discussion in 'JavaScript' started by andreafanfa, Jul 25, 2006.

  1. #1
    Hi there,
    i don't know it it's possible but here is what I'm trying to do since the 15th of July.

    I've a software that has multiple templates based on language.

    Each template can be modified to reflect some changes due to the language.

    I'm in the process to replace text fields choice with images (air-conditioning with air-conditioning.gif) so to show all fields in many language without the need of replicating them.

    Es:
    http://www.mydomain.com/english/images/air-conditioning.gif
    http://www.mydomain.com/espanol/images/air-conditioning.gif
    http://www.mydomain.com/francais/images/air-conditioning.gif

    The problem is that each domain language section is not in this way:
    www.mydomain.com/english/
    www.mydomain.com/espanol/
    www.mydomain.com/francais/

    but always
    www.mydomain.com (it works with cookies/sessions id)

    The image air-conditioning.gif is always shown as:

    www.mydomain.com/air-conditioning.gif no matter the language we're seeing the website.

    ALL I NEED SHOULD BE A COMMAND TO INSERT IN ANY TEMPLATE TO MAKE IT LOAD ALL THE IMAGES, OR AT LEAST THE IMAGES NEEDED TO SHOW IN DIFFERENT LANGUAGES, COMING FROM A GIVEN DIRECTORY:

    www.mydomain.com/english/images/ (for the english template)
    www.mydomain.com/espanol/images/ (for the english template)
    www.mydomain.com/francais/images/ (for the english template)

    THIS SHOULD BE A JAVASCRIPT COMMAND AND NOT PHP AS IT DOESN'T WORK WITHIN THE PHP THAT GENERATES THE IMAGE FROM TEXT.

    IS THERE ANYWAY TO ACHIEVE THIS?

    I'm lost...

    Andrea
     
    andreafanfa, Jul 25, 2006 IP