|
-
Oct 5th, 2004, 05:20 AM
#1
Thread Starter
Hyperactive Member
Hyperlink from Marquee [resolved]
Hi guys
Firstly, I know nothing about php at all, I'm trying to help a colleague out with this bit of code:
PHP Code:
if (eregi("block-Affiliates.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content = "<CENTER><b>Affiliates</b><br><br>";
$content = '<p align="center"><a name="scroller"></a><MARQUEE loop="1000" behavior="SCROLL" direction="up" height="150" scrollamount="1" scrolldelay="1" onmouseclick=\'this.open()\' onmouseover=\'this.stop()\' onmouseout=\'this.start()\'><center>';
$content .= "<a href=\"http://www.superserver.co.uk\"><input type=\"image\" width=\"100\" height=\"40\" src=\"http://www.aklanapart.co.uk\phpnuke\html\images\custom\superserver.gif\" border=\"0\" alt=\"SuperServer\"></a><br><br>";
$content .= "<a href=\"http://www.codadmin.com\"><input type=\"image\" width=\"100\" height=\"40\" src=\"http://www.aklanapart.co.uk\phpnuke\html\images\custom\codadmin.gif\" border=\"0\" alt=\"CoDAdmin\"></a><br><br>";
$content .= "<a href=\"http://www.evenbalance.com\"><input type=\"image\" width=\"100\" height=\"40\" src=\"http://www.aklanapart.co.uk\phpnuke\html\images\custom\punkbuster.gif\" border=\"0\" alt=\"Punkbuster\"></a><br><br>";
$content .= "<a href=\"http://www.blokeinthekitchen.com\"><input type=\"image\" width=\"100\" Height=\"40\" src=\"http://www.aklanapart.co.uk\phpnuke\html\images\custom\bloke.gif\" border=\"0\" alt=\"Bloke In The Kitchen\"></a><br><br>";
$content .= "</center>";
?>
The problem is with the <a href>'s in the scrolling marquee. When you click on them, nothing happens. I think we need to add a click event to the marquee tag but I'm not sure of the syntax.
Any help would be greatly appreciated.
Cheers
PW
Last edited by thebloke; Oct 5th, 2004 at 08:18 AM.
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
-
Oct 5th, 2004, 07:27 AM
#2
Frenzied Member
#1, your problem is with the javascript, not the PHP, so you're kinda in the wrong forum.
#2, check out http://www.dynamicdrive.com/dynamicindex2/index.html for some examples. You should be able to get an idea from the code in some of the examples.
#3, it's not "onmouseclick", just "onClick" will do. Also, I don't think "this.open()" is going to open a new window for you, but I'm not exactly a Javascript expert.
-
Oct 5th, 2004, 08:14 AM
#3
Thread Starter
Hyperactive Member
Ah! I was looking at it in the wrong way. Of course! Works now. Just needed a prod in the right direction. I just see php and switch off!
removed the 'onmouseclick' from the marquee tag and added this to the <input> tag:
Code:
$content .= "<input type=\"image\" width=\"100\" Height=\"40\" src=\"http://www.aklanapart.co.ukphpnukehtmlimagescustombloke.gif\" border=\"0\" alt=\"Bloke In The Kitchen\" onclick="window.open('http://www.blokeinthekitchen.com')"><br><br>";
Works a treat!
Last edited by thebloke; Oct 5th, 2004 at 08:17 AM.
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|