Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2006
    Posts
    44
    Thanks
    2
    Thanked 0 Times in 0 Posts

    www. versus no www. affects calling a function?

    i have a function that changes the colors of some items in my css code on my page. there's a bunch of colored boxes, you click one to choose the color you want, it can be seen here: www.hollywoodlightweights.com

    i also have inline frames on the page and in order for the function to work on the frame at the same time, i put the function code in the frame page as well, and have the parent function also call the frames function, it works fine. BUT if you go to hollywoodlightweights.com without the www. - it doens't work! the iframe function doesn't get called..

    i am so stumped as to why... is there any way around this?

    Thanks!

    Oh and you have to click the bird to enter the page and actually see the function work.. if you click the colored boxes on the intro part, it just changes the color of the page before you actually see the page...

  • #2
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    At first I thought it was a cross-domain issue, but then I tried the site out an it works for me.

    Anyways, browsers may see yourdomain.com as a completely different website than www.yourdomain.com. In your <iframe> tag set the src equal to /yourpage.html instead of http://www.yourdomain.com/yourpage.html. That way it will keep the same domain instead of referring to it absolutely.

  • #3
    New Coder
    Join Date
    Feb 2006
    Posts
    44
    Thanks
    2
    Thanked 0 Times in 0 Posts
    oh my i feel stupid.. derrr.. I thought I already had as /mypage instead of http://www.domain.com/page - as I always do it that way so that a website can be moved without links having to be updated, but then I remembered I changed it to the whole address so that the site would work when viewed off of my hard drive, for easier editing.. oops... anyway, that fixed it, thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •