Author |
Message |
rorie
Regular


Joined: Jul 27, 2008
Posts: 50
|
Posted:
Fri Oct 24, 2008 5:58 pm |
|
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? |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sat Oct 25, 2008 3:43 am |
|
rorie - please start a new topic for this as this thread is over 2 years old. |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Sat Oct 25, 2008 5:02 am |
|
I went ahead and split the posts out to a new thread . |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Oct 25, 2008 2:17 pm |
|
I am guessing here, but instead of:
onChange="MM_jumpMenu('parent',this,0)"
Maybe try this:
onChange="MM_jumpMenu('window',this,0); return false;" |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
rorie

|
Posted:
Sat Oct 25, 2008 10:32 pm |
|
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&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&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&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&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&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&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&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&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&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&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&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
|
Posted:
Sat Oct 25, 2008 10:34 pm |
|
You don't need the embedded PHP tags, your code is already within them
Delete the internal pair of
|
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
 |
rorie

|
Posted:
Sun Oct 26, 2008 10:55 pm |
|
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: Only registered users can see links on this board! Get registered or login! |
|
|
|
 |
montego

|
Posted:
Mon Oct 27, 2008 6:03 am |
|
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

|
Posted:
Mon Oct 27, 2008 10:48 pm |
|
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

|
Posted:
Wed Oct 29, 2008 4:33 pm |
|
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

|
Posted:
Wed Oct 29, 2008 6:00 pm |
|
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

|
Posted:
Wed Oct 29, 2008 6:36 pm |
|
Please be sure to read completely through the HowToInstall guide. Especially the Upgrade and Troubleshooting sections. |
|
|
|
 |
|