GeekPolice
Welcome to GeekPolice.net!

GeekPolice is a website which provides free Computer Technical Support & Virus/Spyware Removal to our members.

You are viewing the forum as a "Guest" which doesn't give you member privileges to ask questions or post comments.

Take 30 seconds to register below and unlock the limitations of this website to discover new computer knowledge!

Code not working

Post new topic   Reply to topic

View previous topic View next topic Go down

Code not working

Post by andyk on Tue 07 Apr 2009, 10:35 am

Hello all. Wonder if anyone could help me.

I am trying to add <target="_blank"> after the links so a new open opens when you press it. It will work with normal HTML putting after the target link. But I am trying to add it to this code. It needs to be add twice in the code after index.php

target="_blank">


Code:
<td align="left" style="cursor:hand; border: 0px; border-style: solid; border-color: #ffffff; background-color:#15317E" onclick="window.location='index.php' " onmouseover="this.style.backgroundColor='#CD661C'" onmouseout="this.style.backgroundColor='#15317E'"><href="index.php"><span style="font-size: 9pt; font-family: 'Century Gothic' "></a><img src="images\cal207x166.jpg" width="207" height="166" border="0" alt="PSS Calendar Login"><A style="text-decoration:none; color:#ffffff; font-weight:normal;"><b> &nbsp; Calendar Login</b></td></tr></span></font>


Thanks for your help.

Andy

andyk

Newbie Surfer
Newbie Surfer

Posts: 23
Joined: 2009-03-03
Operating System: XP

View user profile

Back to top Go down

Re: Code not working

Post by Agent Cosmic on Wed 08 Apr 2009, 2:32 am

The problem with your code is that it did not follow proper HTML/XHTML standards. I don't really know what your trying to link, there's nothing in your anchor tag. The span tag is no doing anything either. And your second anchor tag does not have any link. But it seems to be doing what you want(I think).

Use this code, it's quite weird though.
Code:
<table width="200" border="1">
  <tr>
    <td align="left" style="cursor:hand; border: 0px; border-style: solid; border-color: #ffffff; background-color:#15317E" onclick="window.location='index.php' " onmouseover="this.style.backgroundColor='#CD661C'" onmouseout="this.style.backgroundColor='#15317E'"><a href="index.php"><span style="font-size: 9pt; font-family: 'Century Gothic' "></span></a> <img src="images\cal207x166.jpg" width="207" height="166" border="0" alt="PSS Calendar Login" /> <a style="text-decoration:none; color:#ffffff; font-weight:normal;"><b>   Calendar Login</b></a></td>
  </tr>
</table>


And next time code your code using the tag.




FunSubstance is the place to go for daily entertainment.

Agent Cosmic

Global Moderator | Developer
Global Moderator | Developer

Posts: 3269
Joined: 2008-03-07
Operating System: Windows 7

View user profile http://twitter.com/AgentCosmic/

Back to top Go down

Re: Code not working

Post by SomeDude on Mon 15 Feb 2010, 6:27 am

Instead of using the whole target="..." methodology, which I believe is not standards compliant in XHTML 1.0 strict and XHTML 1.1, you could always do something like this with your anchor tags:

Code:
<a href="http://www.google.com/" ~onclick="window.open(this.href); return false;">Link Text</a>


Just delete the ~ before the "onclick" attribute declaration. I had to include this because this website filters it out otherwise.

SomeDude

Newbie Surfer
Newbie Surfer

Posts: 7
Joined: 2010-02-15
Operating System: Vista SP2

View user profile

Back to top Go down

Re: Code not working

Post by DoctorAcid on Mon 15 Feb 2010, 12:21 pm

Like Agent Cosmic. Quite Weird.. I Should Know... I'm a Software Engineer but your Anchor Tags have what you want. Not Standard in XHTML 1.0

~Acid


Be The Best!

NotGoodSig

~[Filtered]~

DoctorAcid

Rookie Surfer
Rookie Surfer

Posts: 92
Joined: 2010-02-12
Operating System: Windows XP, Windows 7 Ultimate

View user profile http://twitter.com/wzZRyaNZzw

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum