Jump to content

echo("<HTMLstuff>"); not working?


Recommended Posts

Harrow fellow campaigners,

no idea what is going wrong here.
Maybe anybody has a solution:

Assume $logged_in being true.
check_account_status() not firing.
Also tried to change the attribute to onclick, onmousedown etc.

The HTML (.php):

<div id="wrapper-secondnav" class="">
	<ul id="secondnav">
		<li><a target="_blank" href="">Stuff</a></li>
		<li><a href="">Things</a></li>
		<li><a target="_blank" href="">Somestuff</a></li>
		<li><a href="">Anything</a></li>
			if ($logged_in != true)
				echo('<li><a id="register">Nooo</a></li>');
				echo('<li><a id="register" onload="check_account_status();">Yay</a></li>');	

And then there is the function in JS:

function check_account_status()
    alert("I like cookies");

Thank you very much!

Edited by Shinori
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...