Jump to content
Sign in to follow this  

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

Share this post

Link to post
Share on other sites

Check your browser's developer console for Javascript error messages.  I don't know if anchor elements even have a load event, but they might.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...