Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Javascript in ASP Loop?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Javascript in ASP Loop?

 Post Reply Post Reply Page  12>
Author
Melkor View Drop Down
Groupie
Groupie


Joined: 11 December 2006
Location: United States
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melkor Quote  Post ReplyReply Direct Link To This Post Topic: Javascript in ASP Loop?
    Posted: 05 January 2007 at 7:28pm

I like to use Javascript navigation in my sites (I use Webstyle for this. Excellent software!) But I am encountering a problem with them when I use them within WWF 8.5.

The images appear, the drop down menu boxes appear, the mouse over effects all work as they should but the names within those menu boxes aren't happening despite the links still working.

Any clues?



Edited by Melkor - 09 January 2007 at 9:15pm
Back to Top
iSec View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 February 2005
Status: Offline
Points: 1140
Post Options Post Options   Thanks (0) Thanks(0)   Quote iSec Quote  Post ReplyReply Direct Link To This Post Posted: 07 January 2007 at 8:48am

Do you have any link so we can see how it looks? It might be conflicting with the forum's style sheet.

Back to Top
Melkor View Drop Down
Groupie
Groupie


Joined: 11 December 2006
Location: United States
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melkor Quote  Post ReplyReply Direct Link To This Post Posted: 07 January 2007 at 9:06am
Hmmm, unfortunately not. I have it up in a locked forum.

Interestingly though, it works perfectly with FF, just IE that lets the side down (no surprise there)
Back to Top
Melkor View Drop Down
Groupie
Groupie


Joined: 11 December 2006
Location: United States
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melkor Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2007 at 2:30am
Ok, I put a Nav up. The menu displays correctly in FF but not in IE7, where none of the menu test appears.

http://www.lotrplaza.com/forum/forum_postsjs.asp?TID=212784

Could it be because the Navigation has it's own CSS and that is clashing with the WWF CSS?


Edited by Melkor - 09 January 2007 at 2:43am
Back to Top
Melkor View Drop Down
Groupie
Groupie


Joined: 11 December 2006
Location: United States
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melkor Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2007 at 7:14am
OK, more information inbound.

This line of code;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


seems to be at the root of my issues.

If I put my Javascript in before that line, the Navigation works but the posts in the threads load incorrectly.
If I put the JS in after that line, the posts load correctly but the Navigation doesn't work correctly in the way detailed above.

Is there a DOCTYPE I can use and get what I want. Despite despising IE as the root of all of these issues I am having, the majority of my users use the afore mentioned browser. Thus and therefore, I need to get this right.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2007 at 9:43am
If you are getting this error because of the docutype declaration that it suggests that your Javascript is not correctly formatted and you should look at fixing your javascript, if not you will have other issues as browser are increasingly being more standards compliment. 
Back to Top
pjb007 View Drop Down
Groupie
Groupie


Joined: 03 September 2004
Location: United Kingdom
Status: Offline
Points: 185
Post Options Post Options   Thanks (0) Thanks(0)   Quote pjb007 Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2007 at 4:53pm
What I tend to do with JavaScripts is place the text that goes between the <script> tags in a .js file, then link to them like this.
 

<script type="text/javascript" src="file.js">
</script>


Edited by pjb007 - 09 January 2007 at 4:55pm
Back to Top
Melkor View Drop Down
Groupie
Groupie


Joined: 11 December 2006
Location: United States
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melkor Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2007 at 9:15pm
Finally got around that issue. It was a problem with IE and CSS which I circumvented by re-writing the CSS of the menu into the main CSS file.

I have a new issue now.

The menu is only picking up info from the first post.
http://www.lotrplaza.com/forum/forum_postsjs.asp?TID=212777

I have droped the menu options down to just the lngMessageID to better demonstrate my problem and have also included the Message ID above the menu temporarily to better show how it should be.

I have in the JS;

var postID=<%=lngMessageID%>

and that works great, like I said, for the first post in the thread but the Javascript isn't looping with the ASP loop.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.