Loading the wrong page

Hi there people,

I’m working on a site over on http://darrenazzopardi.co.uk/gq/2/

Now currently only 2 pages are present. The main page and the contact page.
When I switch (press the link) to go from one page to another, there seems to be a loading problem.

For example…if i go from the home page and click on the contact page and then back to the home page, it fails to load.

I’m thinking it has something to do with this but I can’t get my head around it…

<script type="text/javascript">
    var gq = window.gq = {
        baseUrl:"/",
        parent: "site",
        page: "contact",
        loadPage: true
    };
</script>

if anyone has any pointers, I’ll greatly appreciate it.

Thank you all for reading.

If i click the contact us link in the menu it goes straight to a 404. The 404 page is pretty much unreadable as the color and size of the text is not great.

Is there a reason why you would need to use JS for a hyperlink?

1 Like

By itself, that code looks like it will do nothing. All it does is set up an object and attach it to a variable gq. Do you have any other JavaScript on, or being loaded into the page?

the urls appened to be placed to the root of my folder, so it was overlaying a wrong page entirely.

I’ve sorted that out now.

I’m using the javascript because I’ve used a loading logo, and this is called on every page to see if it’s loaded.

After it’s loaded, and if i were to visit the contact page and then back to the index page it doesn’t load the content properly…

i need a closer look at the files.

Thanks
Darren

yeah, what should happen is that the window checks to see if the page has been loaded, if not then display the loading icon and proceed to show the page…

i’ll have a look at the files, take away few things and then add them…

i just don’t know why after the logo has loaded the index pages content, when you navigate away and then comeback it doesn’t load again…

Thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.