either close the php:
or use echo:Code:?><script>....</script><?php
Code:echo "<script>...</script>";
Hey I'm trying to insert executable javascript into the following php code, keeps giving me errors. Anyone know?
Code:$tabselected = ''; $tablinks = ''; if (THIS_SCRIPT == 'yourpage') { $vbulletin->options['selectednavtab']='unique_name'; $tabselected = ' class="selected"'; $tablinks = ' <ul class="floatcontainer"> <li><a href="link1.php">Link 1</a></li> <li class="popupmenu"> <a href="javascript://" class="popupctrl">Drop Down</a> <ul class="popupbody popuphover"> <li><a href="sublink1.php">Hip Hop</a></li> <li><a href="sublink2.php">Rock</a></li> <li><a href="sublink3.php">Pop </a></li> </ul> </li> <li><a href="link2.php">Rap</a></li> <li><a href="link3.php">Country</a></li> </ul> '; } $template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="javascript:music('http://buypoe.com/network/music.html','BP Music Channel','263','415','center','front');</a>'.$tablinks.'</li>' ;
I've included this in there as well at the top:
Something is going wrong. . .Code:<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'> <!-- var musicWindow=null; function music(mypage,myname,w,h,pos,infocus){ if (pos == 'random') {LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;} else {LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';musicWindow=window.open('',myname,settings); if(infocus=='front'){musicWindow.focus();musicWindow.location=mypage;} if(infocus=='back'){musicWindow.blur();musicWindow.location=mypage;musicWindow.blur();} } // --> </script>
Similar Threads:
How To: Use BuyPoe.com Trader System
How To: Become an Official MM
At [16] Posts - You Get BuyPoe Chat
At [500] Posts - You Get Lifetime VIP
either close the php:
or use echo:Code:?><script>....</script><?php
Code:echo "<script>...</script>";
You can always create a file with the html/javascript and then use the include function in PHP as such:
Code:include 'file_location.html';
I love programmers, you guys are awesome i looked at that and saw only letters, and symbols.
If you cannot add me to MSN, or if I am not online sending me a PM or a vistor message is the best way to get an answer from me, or we can try to set up an MSN meeting, or talk on skype etc etc.
Nice to know that we are liked. You need to close of the php bit from what I can see. Are you working on Dreamweaver because it will tell you the error.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Design Sites:
vBulletin Mods
Facebook Covers | Free Facebook Covers
Google Covers | Google Plus Covers
Game Sites:
MMORPG | MW3