68 users online (0 members and 68 guests)  


  Results 1 to 3 of 3

Related

  1. A universal uploading program is needed!!!    Forum: Website Scripts Forum
    Replies: 4
  2. A universal uploading program is needed!!!    Forum: Myspace Forum
    Replies: 0
  3. Jump Menu covers drop down menu    Forum: HTML Forum
    Replies: 1
  4. Pulldown menu blocks my popup menu    Forum: HTML Forum
    Replies: 9
  5. Replies: 1
  1. #1
    ravindarjobs's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2007
    Location
    india
    Posts
    44

    universal banner and menu

    hello friends,
    i want my website banner to appear in every html page.
    so i seperated the code <img src="images/abc.jpg"> to a seperate java script file.
    i have written the code in script file as follows
    Code:
    document.write('<img src="images/abc.jpg">')
    and i included this js file in one html file and it worked well.

    now i started including to every page.
    but these html pages are located in different folders in my project, so the path for the img file needs to be changed. if i just include the js file in these html file, then it doesnt work well as i have written path for only for html pages that are in the folders where images folder is present
    then whats the use if i seperate like this?

    so i have made a mistake in my approach.
    can you please correct me
    how should i make the js file so that i can include in every html file irrespective of the path location
    Last edited by vinyl-junkie; 11-28-2007 at 08:07 AM. Reason: Added code tags

  2. #2
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: universal banner and menu

    Use the full URL in your statement:

    Code:
    document.write('<img src="http://www.mysite.com/images/abc.jpg">')
    Replace mysite.com with your site name, of course.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  3. #3
    ravindarjobs's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2007
    Location
    india
    Posts
    44

    Re: universal banner and menu

    thank you friend.
    it worked well.



Tags for this Thread