PDA

View Full Version : Problem adding dynamic menu


Doug
07-10-2003, 12:30 PM
I am working customing the look of the login and signup pages. I am able to do everything I want except add a dynamic nav menu.

When I add this code in either signup.php or login.tpl:
<body><script type='text/javascript'>
//HV Menu- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more
function Go(){return}</script>
<script type="text/javascript" src="/mnu/cws.js"></script>
<script type="text/javascript" src="/mnu/menu.js"></script>
..

I get this error on the login and signup pages:
ERROR: unmatched tags still present in login

this is the same code I use in the rest of the site (Non-CE pages)

??

Jacynthe
07-10-2003, 12:42 PM
you mean you add that in the signup_header and login_header right? because if you addd those in the login and signup files directly, this may be the reason. All the header informations are contained in the header files which is where you should put those script lines...

Doug
07-10-2003, 12:58 PM
<!--QuoteBegin-Jacynthe+Jul 10 2003, 11:42 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Jacynthe @ Jul 10 2003, 11:42 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->you mean you add that in the signup_header and login_header right? because if you addd those in the login and signup files directly, this may be the reason. All the header informations are contained in the header files which is where you should put those script lines...[/b][/quote]
I edited login.tpl and signup_header.tpl. The reason I'm adding it login.tpl and not login_header.tpl is because login_header does not contain the opening <BODY> tag and the <script> tags go right after the <body> tag. I get the same error in either case

Alberto
07-10-2003, 01:29 PM
Are you putting the <body> tag as well?

Doug
07-10-2003, 01:40 PM
<!--QuoteBegin-Alberto+Jul 10 2003, 12:29 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Alberto @ Jul 10 2003, 12:29 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Are you putting the <body> tag as well?[/b][/quote]
I'm using the existing <body> tags as they are in the default template files.

Since the default login.tpl file contained the <body> tag I placed the <script> tags in that file.

In the manner since the signup_header.tpl already contained a <body> tag I place the <script> tags in that file.

Alberto
07-10-2003, 01:45 PM
Take a look at the header file and how the JS files are loaded there. That is probably where you want to load them

Doug
07-10-2003, 03:28 PM
<!--QuoteBegin-Alberto+Jul 10 2003, 12:45 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Alberto @ Jul 10 2003, 12:45 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Take a look at the header file and how the JS files are loaded there.&nbsp; That is probably where you want to load them[/b][/quote]
I've tried placing the JS stuff in both the main and header files. Both have the same resultign error. Maybe it's a limitation of the javascripts I'm using. ???

besides the error message, everything seems to be functional. So is there a way I can turn-off certain error messages for the login screen?

Alberto
07-10-2003, 05:14 PM
What do you mean by turn off? Like logging in with incorrect password?

Doug
07-10-2003, 06:21 PM
Sorry for not being clearer.

Here is the login screen with the dynamic drop-down menu
<img src='http://supportdesk.complete-web-services.com/ce_error.gif' border='0' alt='user posted image' />

Here is the login screen without the dynamic drop-down menu
<img src='http://supportdesk.complete-web-services.com/ce.gif' border='0' alt='user posted image' />

I'd like to keep the menu but obviously do not want the error message to display.

I hope this clears this up at least alittle. :)

Alberto
07-10-2003, 07:50 PM
I'm very sorry. I won't be able to get to this one until tomorrow. Drop me a note at alberto@clientexec.com and I'll assist you then.

Doug
07-10-2003, 08:02 PM
<!--QuoteBegin-Alberto+Jul 10 2003, 06:50 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Alberto @ Jul 10 2003, 06:50 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I'm very sorry. I won't be able to get to this one until tomorrow. Drop me a note at alberto@clientexec.com and I'll assist you then. [/b][/quote]
No prob :D

Jacynthe
07-10-2003, 10:05 PM
I find it so weird that this is givinh you this error considering I have a dynamic menu myself ( http://billing.adrianethosting.com/ ) and never had any problems. And since your menu works on the rest of your site, this means the problem is not either with the script per se.

Really puzzling. Hope you (and Alberto) get it figured out. Good Luck.

TXO Hosting
07-10-2003, 11:39 PM
Jacynthe,

Is that you in your avatar? hmmm

BTW, I was wondering if I could use your code for the webmail and cpanel login?

I've been playing with forms and have been having a hard time getting it to work properly.

I've also been trying to use a Dynamic Nav. but can not get it to look right either. I've been working on these for weeks with no luck.. lol. Low priority, but I'd like to get it finished one day.. lol

Doug
07-11-2003, 09:28 AM
I think the problem may be with how the dynamic menu is called, specifically this portion of the code.

<script type='text/javascript'>function Go(){return}</script>


My thought is that the 'function Go()' some how bypasses the closing script tag. This really no more than a guess, as I am not very javascript or PHP literate.

Even with the error message that displays the menu functions properly.

Jacynthe
07-11-2003, 09:57 AM
<!--QuoteBegin-TXO Hosting+Jul 10 2003, 11:39 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (TXO Hosting @ Jul 10 2003, 11:39 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Jacynthe,

Is that you in your avatar?&nbsp; hmmm

BTW, I was wondering if I could use your code for the webmail and cpanel login?

I've been playing with forms and have been having a hard time getting it to work properly.

I've also been trying to use a Dynamic Nav. but can not get it to look right either.&nbsp; I've been working on these for weeks with no luck.. lol.&nbsp; Low priority, but I'd like to get it finished one day.. lol [/b][/quote]
Yes it's me in my avatar, a somewhat older picture of me (somewhere around 2001), but still.... ;)

And yes you can use my code for the cpanel and webmail login. Just don't forget to download the .js script mentioned in the source of the page. (should be something like login.js I think - from the top of my head)

As for the menu, I got the coolmenus one from dhtmlcentral and slaved at understanding it. Not too tough, but since I am not too good with javascript and the likes, was a slight challenge. I wasn't sure if there was a restriction on the number of items you can have on a certain level of the menu. I now know there isn't - thanx to my compulsive adding of items to it. :blink: :lol:

Jacynthe
07-11-2003, 10:00 AM
<!--QuoteBegin-harryhood+Jul 11 2003, 09:28 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (harryhood @ Jul 11 2003, 09:28 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I think the problem may be with how the dynamic menu is called, specifically this portion of the code.

<script type='text/javascript'>function Go(){return}</script>


My thought is that the 'function Go()' some how bypasses the closing script tag. [/b][/quote]
You're right, this doesn't seem right to have it there. Even the {return} don't seem right. I've never seen anything like that in a javascript script before.

Only way this COULD be right is if the entire script is just for that function... and that it's actually its way of calling said function. I am no scripter but something doesn't feel right to me.

Doug
07-11-2003, 10:25 AM
<!--QuoteBegin-Jacynthe+Jul 11 2003, 09:00 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Jacynthe @ Jul 11 2003, 09:00 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--><!--QuoteBegin-harryhood+Jul 11 2003, 09:28 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (harryhood @ Jul 11 2003, 09:28 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I think the problem may be with how the dynamic menu is called, specifically this portion of the code.

<script type='text/javascript'>function Go(){return}</script>


My thought is that the 'function Go()' some how bypasses the closing script tag. [/b][/quote]
You're right, this doesn't seem right to have it there. Even the {return} don't seem right. I've never seen anything like that in a javascript script before.

Only way this COULD be right is if the entire script is just for that function... and that it's actually its way of calling said function. I am no scripter but something doesn't feel right to me.[/b][/quote]
It's definalty strange. But it works on all my other pages, on serveral different web sites.
Oh well. I guess it's time to look for a new script. :blink:

TXO Hosting
07-11-2003, 09:47 PM
<!--QuoteBegin-Jacynthe+Jul 11 2003, 08:57 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Jacynthe @ Jul 11 2003, 08:57 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Yes it's me in my avatar, a somewhat older picture of me (somewhere around 2001), but still.... ;)

And yes you can use my code for the cpanel and webmail login. Just don't forget to download the .js script mentioned in the source of the page. (should be something like login.js I think - from the top of my head)

As for the menu, I got the coolmenus one from dhtmlcentral and slaved at understanding it. Not too tough, but since I am not too good with javascript and the likes, was a slight challenge. I wasn't sure if there was a restriction on the number of items you can have on a certain level of the menu. I now know there isn't - thanx to my compulsive adding of items to it. :blink: :lol: [/b][/quote]
Jacynthe,

Thanks for the reply, and I apologize to the original author of the thread for getting off subject. I'm not real familiar with Javascript either, but I have slaughtered some code with menus before, just haven't had a time to really play with it lately. I've visited dhtmlcentral, and brainjar.com for scripts, so I might just have to piddle with it until I can get it complete.

That's me in my avatar as well, pretty cute huh? lol