Archadian28 Posted July 14, 2011 Report Share Posted July 14, 2011 (edited) I have a dropdown submenu in the nav bar of my website...when i click on one of them it works fine. When im on the same page as where those links point to they dont seem to work correctly. ex: if i am anywhere else on the website except the portfolio page the links work fine, but when im running the portfolio.php script and i try to click any of the links it just takes me back to the home part of the portfolio page. I will have to post my web address because even im confused about what i just said lol. its imaginationunleash3d .com/new/ jQuery was used to make the slide down divs for the submenu just trying to figure out a way to make all links work whether they are for that particular page or not. Its giving me a headache XD. I forgot to mention that im using jQuery .tab() plugin. When i click the link i want it to open that particular tab, which it does, unless im on the page already. Edited July 14, 2011 by Archadian Quote Link to comment Share on other sites More sharing options...
newseed Posted July 14, 2011 Report Share Posted July 14, 2011 Is your portfolio page in a different folder? If so, might set your links to use absolute paths instead of relative. Quote Link to comment Share on other sites More sharing options...
Archadian28 Posted July 14, 2011 Author Report Share Posted July 14, 2011 (edited) no its all in the same one Edited July 14, 2011 by Archadian Quote Link to comment Share on other sites More sharing options...
newseed Posted July 14, 2011 Report Share Posted July 14, 2011 get rid of that 'New site design...' script you have running. It's very very annoying. Thereafter we can take a look at what's going on. Quote Link to comment Share on other sites More sharing options...
Archadian28 Posted July 14, 2011 Author Report Share Posted July 14, 2011 (edited) http://imaginationunleash3d.com/new/ ..you forgot to put /new/ at the end Edited July 14, 2011 by Archadian Quote Link to comment Share on other sites More sharing options...
Archadian28 Posted July 14, 2011 Author Report Share Posted July 14, 2011 Can anyone help with this? I mainly want everything after the ? taken out of the URL once the page is visited. I think the link would work then. Its nothing serious but i want everything to work. Thanks. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted July 14, 2011 Report Share Posted July 14, 2011 Why do you have the "?" within the link? Is that required by the javascript you are using? Most javascript tab scripts that I know of only use something like page.html#hash. Quote Link to comment Share on other sites More sharing options...
Archadian28 Posted July 14, 2011 Author Report Share Posted July 14, 2011 Good question. I guess im used to php URL strings lol. I took it out but still not doing what i want it to do :/. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted July 14, 2011 Report Share Posted July 14, 2011 I've played around with this a little, and my best guess is that maybe it's an issue with the tab script itself. This issue doesn't seem to occur when Javascript is turned off, though I'm not sure how much that actually means. I'm assuming you don't have anything PHP related on the page that messes with the URL? Quote Link to comment Share on other sites More sharing options...
Archadian28 Posted July 14, 2011 Author Report Share Posted July 14, 2011 No, im using the plugin from http://jqueryui.com. The tab plugin. There is code you can use to select tabs using jquery but im not too sure how to implement that 100% lol. Quote Link to comment Share on other sites More sharing options...
Archadian28 Posted July 15, 2011 Author Report Share Posted July 15, 2011 I have been searching for the past 2 days on how to make this work. If anyone can point me in the right direction it will be greatly appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted July 15, 2011 Report Share Posted July 15, 2011 I'm not sure if I can help you any more with this. I'm not seeing any reason this should occur. If this were me, either I would figure out some alternatives that didn't use the tab functionality, or switch to a different tab script and see if that makes any difference. Quote Link to comment Share on other sites More sharing options...
Archadian28 Posted July 15, 2011 Author Report Share Posted July 15, 2011 Is it possible to pass PHP through jQuery? or a value of a variable in PHP to jQuery? Quote Link to comment Share on other sites More sharing options...
falkencreative Posted July 16, 2011 Report Share Posted July 16, 2011 I'm not completely sure what you have in mind, but you could pass in a variable in the URL using $_GET[] and then echo out that variable within a <script> block in the page. Definitely escape any variables passed in through the URL though. Quote Link to comment Share on other sites More sharing options...
Archadian28 Posted July 17, 2011 Author Report Share Posted July 17, 2011 I just disabled the submenu when ur on the page. ex: If you are on the portfolio page the submenu will be hidden for the Portfolio navigation with this: $("ul.portfolio li").hide(); That works for me, i just didn't want it to seem like i had broken links Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.