Page 1 of 1

onClick in php document?

Posted: Tue Mar 25, 2008 1:47 pm
by Tompa
Hi,

I have this problem with a flashbutton I have made. I need to link this (when clicked) to a newtopic page in my forum.

Code: Select all

$actions.="<object onClick='location.href=('http://www.bluefire-studio.com/index.php?site=forum&addtopic=true&board=".$board."')' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='60' height='20'>
                    <param name='movie' value='site_images/forum_buttons/new_topic.swf'>
                    <param name='quality' value='high'>
                    <embed src='site_images/forum_buttons/new_topic.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='60' height='20'></embed></object>";
The problem is this. onClick function doesnt work? have I done anything wrong or is there any other way to make this link? <a href=""> doesnt work with objects...

Re: onClick in php document?

Posted: Tue Mar 25, 2008 2:04 pm
by flying_circus
Remove the ( and )'s around your link.

Code: Select all

$actions.="<object onClick='location.href='http://www.bluefire-studio.com/index.php?
site=forum&addtopic=true&board=".$board."'' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='60' height='20'>
                    <param name='movie' value='site_images/forum_buttons/new_topic.swf'>
                    <param name='quality' value='high'>
                    <embed src='site_images/forum_buttons/new_topic.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='60' height='20'></embed></object>";

Re: onClick in php document?

Posted: Tue Mar 25, 2008 2:13 pm
by Tompa
still doesnt work =/

Re: onClick in php document?

Posted: Tue Mar 25, 2008 5:00 pm
by flying_circus
Sorry, I just did a once over of your code, didnt load it up and run it. I see what you mean it is not working. I've tried wrapping it in a div and then also tried putting a div over top of the object and it doesnt work. Can you make it do what you need by using an onclick event inside of flash (actionscript)?

Re: onClick in php document?

Posted: Tue Mar 25, 2008 8:07 pm
by kishanprasad
put like onlcik='loatation.href=/'URl/'';

(or)

put a js fn like

onlcik='navigate(url)'

so that u can write that stuff there in the fn