Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> JavaScript
Author Message
rorie
Regular
Regular



Joined: Jul 27, 2008
Posts: 50

PostPosted: Fri Oct 24, 2008 5:58 pm Reply with quote

i am having trouble with getting some javascript to work with my module here is my code
Code:
<script type="text/JavaScript">

<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<select name="menu1" id="menu1" onChange="MM_jumpMenu('parent',this,0)">
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_A$" selected>Australia Dollar</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_C$">Canada Dollar</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_XPF">Central Pacific Franc</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_Euros">Euros</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_F$">Fiji Dollar</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_South_Pacific_2006">South Pacific 2006</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_Sydney2005">Sydney 2005</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_Tasmania2003">Tasmania By Sea 2003</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_NZ$">New Zealand Dollar</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_NZ2008">New Zealand 2008</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_US$">United States Dollar</option>
        <option value="http://www.rorboy1983.com/modules.php?name=Photos_Vt">Vanuatu Vatu</option>
      </select>


what code do i need for this to work in my module?
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sat Oct 25, 2008 3:43 am Reply with quote

rorie - please start a new topic for this as this thread is over 2 years old.
 
View user's profile Send private message Send e-mail
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Oct 25, 2008 5:02 am Reply with quote

I went ahead and split the posts out to a new thread Smile.
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Oct 25, 2008 2:17 pm Reply with quote

I am guessing here, but instead of:

onChange="MM_jumpMenu('parent',this,0)"

Maybe try this:

onChange="MM_jumpMenu('window',this,0); return false;"

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
rorie







PostPosted: Sat Oct 25, 2008 10:32 pm Reply with quote

montego wrote:
I am guessing here, but instead of:

onChange="MM_jumpMenu('parent',this,0)"

Maybe try this:

onChange="MM_jumpMenu('window',this,0); return false;"


no matter what i do with the code i always get a blank page

code
Code:
<?php

if (!eregi("modules.php", $PHP_SELF)){
  die ("You can't access this rows directly...");
}
$index = 1;
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");

<?php


echo ' $someVarName = <<<_JSCODE_
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
<script>
_JSCODE_;

echo $someVarName;

echo '    <span class="style4">' . "\n";
echo '      <select name="menu1" id="menu1" onchange="MM_jumpMenu(\'parent\',this,0)">' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_A$" selected="selected">Australia Dollar' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_C$">Canada Dollar' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_XPF">Central Pacific Franc' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_Euros">Euros' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_F$">Fiji Dollar' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_South_Pacific_2006">South Pacific 2006' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_Sydney2005">Sydney 2005' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_Tasmania2003">Tasmania By Sea 2003' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_NZ$">New Zealand Dollar' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_NZ2008">New Zealand 2008' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_US$">United States Dollar' . "\n";
echo '        </option>' . "\n";
echo '        <option value="http://www.rorboy1983.com/modules.php?name=Photos_Vt">Vanuatu Vatu' . "\n";
echo '        </option>' . "\n";
echo '      </select>' . "\n";
echo '    </span>' . "\n";
echo '    <p>' . "\n";
echo '    <font color="#000080" size="5">Photos (Australia Dollar)</font></p>' . "\n";
echo '    <p>' . "\n";
echo '      <a href="http://www.shareapic.net/content.php?id=7519987&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007519987.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7519988&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007519988.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7519989&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007519989.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7519990&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007519990.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7519991&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007519991.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7519992&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007519992.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7520010&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007520010.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7520011&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007520011.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7520012&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007520012.gif"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7520013&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007520013.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7520014&amp;owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007520014.jpg"  border="0" alt="" /></a>' . "\n";
echo '      <a  href="http://www.shareapic.net/content.php?id=7520015&owner=Rorie"  target="_blank">' . "\n";
echo '        <img src="http://www.shareapic.net/preview3/007520015.jpg" border="0" alt="" /></a>' . "\n";
echo '    </p>' . "\n";
?>
closetable();
include("footer.php");
?>



what do i need to fix? please help
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sat Oct 25, 2008 10:34 pm Reply with quote

You don't need the embedded PHP tags, your code is already within them

Delete the internal pair of
Code:


<?php


?>

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
rorie







PostPosted: Sun Oct 26, 2008 10:55 pm Reply with quote

montego wrote:
I am guessing here, but instead of:

onChange="MM_jumpMenu('parent',this,0)"

Maybe try this:

onChange="MM_jumpMenu('window',this,0); return false;"


that just stuffs everything up
source: http://www.rorboy1983.com/modules.php?name=Photos_A$
 
montego







PostPosted: Mon Oct 27, 2008 6:03 am Reply with quote

rorie, you have a parse error in your PHP script which causing the blank page. Evaders eluded to this. You hadn't said anything about blank page until after my post. Blank pages is almost always a PHP parse error. You need to find the bad PHP code... try turning on $display_errors within config.php and see if it points you to the line numbers. Or, follow evaders' advice.
 
rorie







PostPosted: Mon Oct 27, 2008 10:48 pm Reply with quote

montego wrote:
rorie, you have a parse error in your PHP script which causing the blank page. Evaders eluded to this. You hadn't said anything about blank page until after my post. Blank pages is almost always a PHP parse error. You need to find the bad PHP code... try turning on $display_errors within config.php and see if it points you to the line numbers. Or, follow evaders' advice.


ok please explain to me step by step on how to do this
 
rorie







PostPosted: Wed Oct 29, 2008 4:33 pm Reply with quote

montego wrote:
rorie, you have a parse error in your PHP script which causing the blank page. Evaders eluded to this. You hadn't said anything about blank page until after my post. Blank pages is almost always a PHP parse error. You need to find the bad PHP code... try turning on $display_errors within config.php and see if it points you to the line numbers. Or, follow evaders' advice.


so how do i do this? please reply
 
montego







PostPosted: Wed Oct 29, 2008 6:00 pm Reply with quote

rorie, I mean no disrespect, but have you opened the config.php script in a text editor and read the comments next to the $display_errors line? There is a certain level of effort expected on your side too as we are all very busy here helping many different people. We try to give you direction on what to do, but we cannot do it for you.
 
Raven







PostPosted: Wed Oct 29, 2008 6:36 pm Reply with quote

RTM Wink

Please be sure to read completely through the HowToInstall guide. Especially the Upgrade and Troubleshooting sections.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> JavaScript

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©