close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

1st menu item not working

Thread began 1/06/2012 8:37 pm by simmo515303621 | Last modified 1/18/2012 6:07 pm by simmo515303621 | 1255 views | 4 replies |

simmo515303621

1st menu item not working

Hi Crew,

I have a very strange issue.... Its seems my first menu item link does not work... It simply refreshes the page..

Now I do have some PHP code - that I will post here, but I have also removed all code and the issue still persists.

main.php?pages_id=5 is the website im working on

if you click home - nothing happens, but you can see that the link is working fine.. ALl code is fine.

The Nav is in a div that is absolutely positioned - I dont have a z-index issue, but I have also tried with nothing on the page and no css positioning.. still no go...

Here is the PHP i am using wrapped around the first href in the parent li.

<a href="<?php if($row_menuwriter_pages['pages_id'] == '1') { echo $row_rsSitewide['site_url']."/"; } else { echo($assumedRoot)."main.php?pages_id=".$row_menuwriter_pages["pages_id"];} ?>"><?php echo $row_menuwriter_pages["pages_name"]; ?></a>

Sign in to reply to this post

Jason ByrnesWebAssist

change this code:

php:
<a href="<?php if($row_menuwriter_pages['pages_id'] == '1') { echo $row_rsSitewide['site_url']."/"; } else { echo($assumedRoot)."main.php?pages_id=".$row_menuw riter_pages["pages_id"];} ?>"><?php echo $row_menuwriter_pages["pages_name"]; ?></a>



to:

php:
<a href="<?php if($row_menuwriter_pages['pages_id'] == '1') { echo $row_rsSitewide['site_url']."/index.php"; } else { echo($assumedRoot)."main.php?pages_id=".$row_menuw riter_pages["pages_id"];} ?>"><?php echo $row_menuwriter_pages["pages_name"]; ?></a>
Sign in to reply to this post

simmo515303621

Hi Jason,

Thanks for the reply - This doen not work either, I can even put a completely different link and it wont work either?

Even if I leave the code as standard CSSMW code it still wont work on the first link

Sign in to reply to this post

Ray BorduinWebAssist

The problem is caused by this code you have added to the head tag:

var $riol = jQuery.noConflict();
$riol(document).ready(function() {

$riol('.shuffle').randomImage({path: 'theme/banners/'});
$riol('a:first').click(function() {
location.reload();
return false;
});

});



That code updates the first link on the page and makes it refresh the page instead of going to the page it references. I think you can just remove the second section of that code to correct the problem.

$riol('a:first').click(function() {
location.reload();
return false;
});
Sign in to reply to this post

simmo515303621

Hi Ray,

Ahhh ok I see thanks for that! I would have never figured that one out!

Thanks

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...