Jump to content

ibda12u

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ibda12u's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is code that works with the menu system, I didn't write it, but it does work well. I'm pretty certain the javascript isn't the issue, I only listed it in case someone wanted to see how it was being called. The actually CSS file is below it. Thanks for your time dannyb785. Again I was just looking for a second set of eyes to look over it too see if there was something easy I was missing. I don't want to take any of your time.
  2. I'm sorry, I placed all my code on their for reference. I was assuming that someone who's seen something before would just see something I'm missing. I know that the code works, and works well. I'm just missing something in my code what will let me center the menu. I apologize if my posting was taken as "doing my work for me" I just wanted a second set of eyes that may spot my error.
  3. I'm having a real problem getting my CSS navigation menu centered on my page. I think my code is a real mess, but I'm wondering if anyone can see the problem. I'm actually using DNN and a new menu module to get it to display on the page, but I'm still sure the problem is in my css code. Any idea's? Here is the code that calls the CSS. The actual CSS is below. I don't think the problem is here, but figured I'd submit it could be helpful. <head> <link rel="stylesheet" type="text/css" href="silver.css" /> <script type="text/javascript"> function NavMouseover(li) { var agent = navigator.userAgent.toLowerCase(); var regex = /msie/i; if (regex.test(agent)) li.className+=' hover '; if (li.id.match('^navParent')) { var navChild=document.getElementById('navChild'); if (navChild) { var childContainers = navChild.getElementsByTagName('ul'); if (childContainers) { for (var i = 0; i < childContainers.length; i++) { if (childContainers[i].id.match('^navChild')) { if (childContainers[i].id.match('^navChild-'+li.id.substring(li.id.indexOf('-')+1))) { childContainers[i].style.display='inline'; } else { childContainers[i].style.display='none'; } } } } } } } function NavMouseout(li) { var agent = navigator.userAgent.toLowerCase(); var regex = /msie/i; if (regex.test(agent)) li.className=li.className.replace(' hover ', ''); } </script> </head> [NavMenu-Container[ <div id="{NavMenu.Id}" class="TabList"> <ul class="Level1"> ]] [Level0-Item[ <li id="{NavMenu.Id}-{Tab.Id}" iif({Tab.IsActive}='True', class="SelectedItem") onmouseover="NavMouseover(this);" onmouseout="NavMouseout(this);" > ]] [Level0-Anchor[ <a href="{Tab.Url}" title="{Tab.Title}">{Tab.Name}</a> ]] [/Level0-Item[ </li> ]] [/NavMenu-Container[ </ul></div> ]] Here is the CSS Code UL LI {list-style-type:square ; text-align: center;} UL LI LI{list-style-type:disc; text-align: center;} UL LI LI LI {list-style-type:circle; text-align: center;} OL LI {list-style-type:decimal;} OL OL LI{list-style-type:lower-alpha;} OL OL OL LI {list-style-type:lower-roman;} .TabList { width: 800px; horizontal-align:center; vertical-align:middle; text-align: center; } .TabList ul { margin:0; list-style:none; display: inline; vertical-align:middle; text-align: center; } .TabList li { float:left; margin:0; display: inline; padding:0 0 0 10px; vertical-align:middle; } .TabList li a { font-family:Tahoma,San-Serif; font-size:12px; voice-family: "\"}\""; voice-family:inherit; line-height:normal; vertical-align:middle; } select.TabList { border-left: #003366 1px solid; border-right: #003366 1px solid; border-top: #003366 1px solid; /* border-bottom: #003366 1px solid; */ background-color: #F3F3F4; color:#FFFFFF; font-weight:bold; font-size:80%; } #navParent a { font-weight:bold; float:left; display:block; text-align:center; white-space: nowrap; text-align: left; padding: 5px 5px 5px 5px; text-decoration:none; color:#3B3B3B; background-color: #F3F3F4; border-left: #BCBDC0 1px solid; border-right: #BCBDC0 1px solid; border-top: #BCBDC0 1px solid; border-bottom: #BCBDC0 0px solid; } #navParent a:hover, #navParent li.hover a { text-decoration:none; background-position:100% -125px; color:#004E82; background-color: #FFFFFF; border-left: #BCBDC0 1px solid; border-right: #BCBDC0 1px solid; border-top: #BCBDC0 1px solid; border-bottom: #FFFFFF 1px solid; } #navParent li { background:url() no-repeat left top; border-bottom: #999999 1px solid; background-color: #F3F3F4; } #navParent li:hover, #navParent li.hover { /* background-position:0 -125px; */ border-bottom: #FFFFFF 1px solid; } #navParent .SelectedItem { /* background-position:0 -125px; */ border-bottom: #FFFFFF 1px solid; } #navParent .SelectedItem a { /* background-position:100% -125px; */ color:#004E82; border-bottom: #FFFFFF 1px solid; } #navChild ul { padding:2px 0 2px 3px; margin:0; display:none; list-style:none; float:left; } #navChild ul ul { display:inline; } #navChild li { position: relative; padding:4px 8px 6px 0; background:url() no-repeat right 8px; } #navChild li ul { /* second-level lists */ position : absolute; z-index:5; left: -999em; border:1px solid #333333; background-color:#f1f1f1; } #navChild a { display:block; text-decoration:none; padding:2px; color:#000; text-align:left; border:1px solid #f1f1f1; } #navChild li li a { width:125px; } #navChild li a:hover { background-color: #ffffff; border:1px solid #3b3b3b; } #navChild a.SelectedItem { background-color: #ffffff; border:1px solid #3b3b3b; } #navChild .DisabledItem { color:#cccccc; } /* no need to change these hover classes unless you need more than 4 levels */ #navChild li:hover ul ul, #navChild li:hover ul ul ul, #navChild li:hover ul ul ul ul, #navChild li.hover ul ul, #navChild li.hover ul ul ul, #navChild li.hover ul ul ul ul{ left: -999em; } #navChild li:hover ul, #navChild li.hover ul { top: 26px; left:0; } #navChild li li:hover ul, #navChild li li li:hover ul, #navChild li li.hover ul, #navChild li li li.hover ul { top: 0; left:130px; }
  4. Thank you so much, I guess I'd just been looking at it too long!
  5. Hello, I'm getting a javascript error when I run the following code on my page. I am at a total lost, can anyone point me in the right direction, so I can figure what is causing the error? Pretty much this is supposed to be a simple currency convertor. Thanks, Ibda <head> <title>Money Exchange</title> <script language="JavaScript"> <!-- function convert() { var amt = parseFloat(exchange.amount.value); var euro = Math.round((amt * .0.636821) * 100) / 100; document.write(exchange.amount.value + " dollars is " + euro + " Euros"); } //--> </script> </head> <body> <form name="exchange" action="javascript:convert()" method="post"> Amount to convert <input type="text" name="amount"><br/><br> <input type="radio" name="RBgender" value="euro" id="radio1">Euro to Dollar<br> <input type="radio" name="RBgender" value="dollar" id="radio2">Dollar to Euro<br><br> <input type="submit" value="Submit Form"> </form> </body> </html>
  6. Hello I'm trying to ping several websites in order to keep them alive. I have a simple script here that I use that works great for 1 website. but if I include another site, my script doesn't run. Is there a way I can run this script and have it open more than 1 site at a time? <?php ob_start(); include("http://mywebsite.com"); ob_end_clean(); ?>
  7. Hello I use the x protection version 1.10 script which basically is a script that allows you to control user access on a specific page, using either an existing mysql database or using encrypted sha1 passwords. I've used this script a bit in the past, but the developer has stopped work on the project, and as of late there has been a security issue. as described here http://secunia.com/advisories/21282 "Input passed to the "username" and "password" form field parameters in protect.php is not properly sanitized before being used in SQL queries. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code. Successful exploitation can be used to bypass authentication, but requires that "magic_quotes_gpc" is disabled. The vulnerabilities have been confirmed in version 1.10. Other versions may also be affected." I'm curious if anyone know's what I could do to fix the code? to make it properly sanitize the field parameters? Any idea's?
  8. it just displays the pages html [code] <?php if($fathers_email != "" && !strstr($fathers_email,"@") || !strstr($fathers_email,".")) { echo 'Sorry all required fields were not filled out, please <a href="javascript: history.go(-1)">go back</a> and correct Father\'s Email Address. '; } else { echo 'Enrollment Application Step 5</font></b></font><p><font face="Verdana" size="1">Please                   complete the form below to reserve your child\'s                   spot. While it does not guarantee that an opening will be                   immediately available, it does promise that the next available                   spot will be held for your child. <font color="#CC3300">To                   avoid delays </font></font>   ';}                     ?> [/code]
  9. I tried this, and it won't let me not enter an email at all. [code] <?php if(isset($fathers_email)){ if(!strstr($fathers_email,"@") || !strstr($fathers_email,".")) { echo '<span class="style5">Sorry all required fields were not filled out, please <a href="javascript: history.go(-1)">go back</a> and correct Father\'s Email Address.</span> '; }else { echo ' [/code]
  10. Hello just as my title says, I have a form with an email field that is optional for the user to fill out. What I've been trying to do is if a user fills out the optional email address field, it will check that field to make sure there is a . and an @ in the email. My code here works, except it won't validate if the email field is empty. Any idea's? [code] <?php if($fathers_email != "" && !strstr($fathers_email,"@") || !strstr($fathers_email,".")) { echo 'Sorry all required fields were not filled out, please <a href="javascript: history.go(-1)">go back</a> and correct Father\'s Email Address. '; } else { echo '  [/code]
  11. Shaymol, Are you asking the next steps to get your own domain name hosted on your apache installation? If so, do you already own your domain name? And then secondly do you have a DNS server, as you'll need to use some type of DNS server/service and have it point to your pc's IP address (assuming it's static). Then you can cofigure that domain into apache. If this is what you're wanting to do let me know, and I'll send some helpful links. Thanks, [!--quoteo(post=387930:date=Jun 26 2006, 01:11 AM:name=shaymol)--][div class=\'quotetop\']QUOTE(shaymol @ Jun 26 2006, 01:11 AM) [snapback]387930[/snapback][/div][div class=\'quotemain\'][!--quotec--] hi guys i've install the apache2triad in my pc. now i wanna configure my apache server to get my site say as www.mysite.com ( in intranet ) what things should i learn to configure that or give me any link or any idear to do that plz mail me if u have any idea by shaymol mail: shaymol.cse@gmail.com [/quote]
  12. I figured it out by doing this [code]    $t = "TABSSC1Q" . $quantity;           break; } } $scprice = ${$t};[/code]
  13. Okay, now this part here is even more difficult than the first I believe [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /] I have an include page that lists these variables [code]$TABSSC1Q500 = '196.00'; $TABSSC1Q1000 = '264.00'; $TABSSC1Q2000 = '401.00'; $TABSSC1Q5000 = '777.00';[/code] on my main page I have this code [code] <?php if ($frontcls =="1" && $foldertype == 'Folder A' || $foldertype == 'Folder B')   {   switch($quantity)   {       case '500':       case '1000':       case '2000':       case '5000':           $t = $TABSSC1Q . $quantity;           break; } } $scprice = $t; ?>[/code] What I'm trying to do is get $t to become a variable from my include page. So I can return the value of that variable. Is it possible to create a variable from 2 others? When I run this code as it is, it only displays the value of quantity. I tried $t = "$".TABSSC1Q . $quantity; but it simple returned the string $TABSSC1Q500 (if the quantity was 500), but it does return the actual value of the variable $TABSSC1Q500 Any idea's?
  14. Wow, everyone awesome awesome. I didn't even think about the switch option! Thanks a ton! [!--quoteo(post=387553:date=Jun 24 2006, 03:33 PM:name=Bane)--][div class=\'quotetop\']QUOTE(Bane @ Jun 24 2006, 03:33 PM) [snapback]387553[/snapback][/div][div class=\'quotemain\'][!--quotec--] to add to kenrbnsn's post, you can also do this: [code] <?php if ($foldertype == 'A' || $foldertype == 'B') {    switch ($quantity) {       case '500':       case '1000':       case '2000':       case '5000':           $iprice = $TempAB . $quantity;           break;          default:                  $iprice = 0;                  break; } } ?> [/code] but i've taken the liberty of assuming that the value of $quantity will be a part of $iprice so this is conditional. :edit: i added a 'default' case to be on the safe side. :edit 2: you can also do this if you prefer: [code] <?php $allowed = array('500', '1000', '2000', '5000'); if (($foldertype == 'A' || $foldertype == 'B') && in_array($quantity, $allowed)) {           $iprice = $TempAB . $quantity; } ?> [/code] [/quote]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.