Ravens PHP Scripts: Forums
 

 

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



Joined: Mar 10, 2005
Posts: 90

PostPosted: Tue Dec 27, 2005 9:38 am Reply with quote

Hye! I need a help about JavaScript. How i can put Javascript on modules syntax. I wanna to drop down navigation menu on my modules.
For example like this pic:

Image

My JavaScript coding is:



Code:


<//script language="JabaScript" type="text/JabaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
<//script>
<form name="form1">
  <select name="menu1" onChange="MM_jumpMenu('parent',this,1)">
    <option selected>-select-</option>
    <option value="www.pukimuki.com">Pukimuki</option>
    <option value="www.pantat.com">Pantat!</option>
    <option value="www.pukimak.com">Pukimupukikujua</option>
  </select>
</form>


I try by myself with this code for my modules:

Code:


<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
$index = 1;
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
OpenTable();
echo
"
<script language="JabaScript" type="text/JabaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
<//script>
<form name="form1">
  <select name="menu1" onChange="MM_jumpMenu('parent',this,1)">
    <option selected>-select-</option>
    <option value="www.pukimuki.com">Pukimuki</option>
    <option value="www.pantat.com">Pantat!</option>
    <option value="www.pukimak.com">Pukimupukikujua</option>
  </select>
</form>


";
CloseTable();
include("footer.php");
?>


But it fail. Can somebody help me here? If somebody have any idea/syntax/coding for drop down menu not from Javascript, I'm also accept too for my modules drop down menu navigation.

Thanxs.

*p/s JabaScripts is JavaScript and some sign "/" i put as "//" because of this forum not allow scripting here. Wish friends can read that code here.Thanxs
 
View user's profile Send private message Visit poster's website
technocrat
Life Cycles Becoming CPU Cycles



Joined: Jul 07, 2005
Posts: 511

PostPosted: Tue Dec 27, 2005 11:46 am Reply with quote

In side your echo you need to change all the " to \"
That should do it for you.

_________________
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! / Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Dec 27, 2005 12:03 pm Reply with quote

I would forego all the echo's and escapes and just follow these easy instructions http://www.ravenphpscripts.com/postt28.html
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©