MyBB Community Forums

Full Version: A link opens when i click on a text field
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I was adding a awesome effect to my board today. 

<script type="text/javascript"> 
    images = new Array(5);  
    images[0] = "<a href='' target='_blank'><img src='images/derp/troll.png' </a>";  
    images[1] = "<a href='' target='_blank'><img src='images/derp/wtf.png' </a>";  
    images[2] = "<a href='' target='_blank'><img src='images/derp/fms.png' </a>";  
    images[3] = "<a href='' target='_blank'><img src='images/derp/werp.png' </a>";  
    images[4] = "<a href='' target='_blank'><img src='images/derp/tip.png' </a>";  
    index = Math.floor(Math.random() * images.length);  

I was idding this to my header_welcomeblock_guest template, and now the youtube link appears when you click in the username and password input field. I can't figure it out, you can see the fields here:

				<li><span class="log"><i class="fa fa-user fa-fw"></i></span><input name="quick_username" id="quick_login_username" type="text" value="Username" class="textlog" size="25" /></li>
				<li><span class="log"><i class="fa fa-lock fa-fw"></i></span><input name="quick_password" id="quick_login_password" type="password" value="Password" class="textlog" size="25" /></li>
There is a way to quick way to fix this but it would involve a plugin, and conditionals, and placing the login box on another template then hiding it from logged in members.I hope someone can come up with a better solutions, good luck
image tag should be like <img src='images/derp/name.png' />

images[0] = "<a href='' target='_blank'><img src='images/derp/troll.png' /> </a>";  
How blind can i be.. Im sorry for waisting your time on this, how epic! Lol.. And i should be a programmer.. Have a nice weekend :-D