Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Lonig

  1. <li><a href="example.aspx">Element Search</a></li> I'm adding the [?] at the end(separate href) since it generates a "tooltip" when hovered over.I've found users generally like the option of hovering over the [?] for the tooltip, instead of having it show EVERY time they hover over the main Example link.
  2. As you can see, I'm trying to add this: <a name="Example" onmouseover="Tip('Example')" onmouseout="UnTip()">[?]</a> to the page for each LI that has Element Search inside it.The page this is on is unfortunately not my property so I cannot post it, but here is an idea of what the <li> tags look like: <li><a href="example.aspx">Example</a></li> Each LI is generated depending on user preferences, so I cannot code them as I had planned. I cannot alter the pulling data, only add functions after the data is loaded. Which is why I'm trying to use JS instead of just altering the DB pull code to incorporate the 'name' tag. Each LI DOES have a unique link, if that matters.Here is what I have, and it doesn't work one bit var items = gid('sideMenu').getElementsByTagName("li");for(var i=0;i<items.length;i++){ if(items[i].innerHTML == "Element Search"){ var somehtml = document.write("<a name=\"Example\" onmouseover=\"Tip('Example')\" onmouseout=\"UnTip()\">[?]</a>"); items[i].appendChild(somehtml); }} I'm not looking for anyone to make the code, mainly looking for pointers. Maybe there is a better JS command to use? Or you know a great example I can look at.Need any further data, just ask.Thanks in advance.
  3. Javascript Copy(clipboard) not working in FF3. Only works in IE6 as far as I can tell9no IE7 to test with at work). It doesn't do anything when clicked in FF.Did a quick search of the boards, and google... but apparently with Flash10 all of their solutions(used a flash script to copy, was pretty neat solution that worked until now).So, I'm going back to the old original IE only script... Any idea's from this board on getting it working in FF3?In header: <script language="JavaScript" type="text/javascript">function ClipBoard(){holdtext.innerText = htmlArea.innerText;Copied = holdtext.createTextRange();Copied.execCommand("Copy");}</script> textarea is: <textarea name="htmlArea"> button is: <input style="width:100px;font-size:12pt;font-weight:bolder;text-align:center;" type="button" value="Copy" onclick="ClipBoard();">
  4. Problem solved. I changed the php and added the javascript into the loop itself. while not the best way, this isn't meant for public use, so it serves it purpose... albeit ugly. echo "<script language='JavaScript' type='text/javascript'>function AutoPop".$lt."(ItemId){ document.getElementById('goodRefer".$lt."').value = document.getElementById('goodRefer".$lt."').value + ItemId;}</script>";echo "<div class=\"leftinput\">Good Refer:</div> <div class=\"rightinput\"><input type=\"text\" id=\"goodRefer" .$lt. "\" name=\"goodRefer" .$lt. "\" /><a href=\"#\" onClick=\"AutoPop".$lt."('troublelink'); return false;\">*troublelink*</a></div><br />"; The page is far too large and ugly to post the whole thing. So hopefully the above will suffice if anyone else runs into a similar situation.Thanks for the quick response as always Deirdre's Dad. Even if I didn't follow your request this time. You are one of a kind.Edit to add in return false; to the href. Didn't notice I had forgot it until I pumped up the while loop.
  5. Not my code... but works in FF3, Opera 9.52, and IE6.Unsure of IE7+.note: It does not work in Safari(win) 3.2 <body onload="setInterval('blinkIt()',500)"><script type="text/javascript">function blinkIt() { if (!document.all) return; else { for(i=0;i<document.all.tags('blink').length;i++){ s=document.all.tags('blink')[i]; s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible'; } }}</script><blink>Am i blinking ?</blink> not 100% sure if this is ok or not, but the code was originally from (http://www.rgagnon.com/jsdetails/js-0098.html). just giving credit where credit is due... and google was the original finder of that for me
  6. This code is supposed to have a link that once clicked auto-populates a textbox with static text of "troublelink".It is on a php page, and used during a "while" loop. Meaning the link is beside several link text boxes and once clicked needs to only populate that text box. <script language="JavaScript" type="text/javascript">function AutoPop(InputID){ document.getElementsByID(InputID).value = document.getElementsByID(InputID).value + "troublelink";}</script> (The below is during a PHP while loop, where the $lt is the current Number in the loop. So it will change the goodRefer to "goodRefer1" and so on. I use the name for php usage. I originally used name with this js, but I switched to ID to see what I kept doing wrong.) <input type=\"text\" id=\"goodRefer" .$lt. "\" name=\"goodRefer" .$lt. "\" />*<a href=\"#div".$lt."\" onClick=\"AutoPop('goodRefer" .$lt. "');\">troublelink</a> Hope that gives you a general idea. Thanks in advance.
  7. Check forms before thinking a simple delete statement is the guilty party. $query = "DELETE FROM table WHERE id=$id"; mysql_query($query) or die('Error : ' . mysql_error()); The above is correct. (or works, not sure if its still the preferred method or not)
  8. Senario was not even MySQL related. Was a problem in my form.:)removing this because it would only confuse people new to mysql, as indeed, the mysql statement was valid.
  9. Lonig

    asp.net C#

    I am no C# expert, but I am pretty sure most VB/C# experts can easliy convert one to the other. I've had a heck of a time finding C# tutorials meant to jumpstart the .net web development side, so I would love for someone to work on converting the VB codes on w3schools.At least the starter ones... Perhaps if I ever get far enough I'll start working on the converting as a learning experience... but until then, I'll simply put my plea out there for someone else.C# is definitly the way to go in my opinion. VB is far from dead, but if you are starting out C# just seems logical as it is OO and very similar to other languages.
  10. Lonig

    Copy Cat

    That is the best retaliation I've ever seen 'justsomeguy'.I actually laughed out loud from the registering it. Thats just great. Top notch touch.
  11. I was having trouble with doing that Deidre's Dad. But I also had a few other syntax errors, and I was just narrowing it down by using the echo's. (and yes, it was driving me crazy).I'll see if I can get it to work without them now. you should see my other "generator" file It's just a huge mess... works, but it sure is ugly.I'm so out of practice on php... never was a guru by any means, but I've sure lost my touch with error correction. Starting to come back to me, but sure is slow.Probably doesn't help that I'm learning c#/asp.net at work instead of being able to focus on php... oh well.Anyway... I shall let you know my success on removing the echo's... echo's... echo's...EDIT: I've removed the echo's and it works! Thank god its Friday! <?phpif (!isset($_POST['submit'])) {?><html><head><title>InfoBox Generator</title></head><body><h1>Info Box Generator</h1><form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>"><input type="text" name="infoBox" style="width:75%;height:25%" /><br /><input type="submit" value="submit" name="submit" /></form><a href="index.php">Back to main</a></body></html><?php}else {$infoBox = $_POST["infoBox"];?><html><head><title>InfoBox Generator</title></head><body><h1>Info Box Generated Code</h1><textarea style="width:75%;height:25%;text-align:left;"><p class="info" style="width:50%;height:25%"><?php echo $infoBox;?>></p></textarea><br /><a href="index.php">Back to main</a></body></html><?php}?>
  12. hmmm. I need to work on saving as html files now :)Any links you all have on the top of your head before I go scouring the internet for them.Take form data that is currently being output to a <textarea> and save it as an html file. Seems simple enough. Thanks for the link justsomeguy, it is bookmarked for reading right now. Will check this thread again after I've read more of it and see if anyone posted any links.Thanks in again
  13. Nevermind, I figured it out... Sorry for the trouble. Here is the code if anyone has the same issue.... <?phpif (!isset($_POST['submit'])) { echo "<html>"; echo "<head>"; echo "<title>InfoBox Generator</title>"; echo "</head>"; echo "<body>"; echo "<form method=\"post\" action=\"" .$_SERVER['PHP_SELF']. "\">"; echo "Info Box:<input type=\"text\" name=\"infoBox\" /><br />"; echo "<div style=\"width:110px;margin-left:15%;\">"; echo "<input type=\"submit\" value=\"submit\" name=\"submit\" />"; echo "</div>"; echo "</form>"; echo "</body>"; echo "</html>";}else {$infoBox = $_POST["infoBox"]; echo "<html>"; echo "<head>"; echo "<title>InfoBox Generator</title>"; echo "</head>"; echo "<body>"; echo "<textarea>"; echo "$infoBox"; echo "</textarea>"; echo "</body>"; echo "</html>";}?>
  14. Trying to put a form and its results in the same php file. I know it can be done, just trying to figure out how to do it simple.For some reason it is giving error: Notice: Undefined index: infoBox in C:\Apache2\wwwroot\modem_rewrite\infobox.php on line 3. Which makes sense since it has no data yet... but I cannot seem to figure out how to get rid of the error. The script works fine otherwise, but no matter what I get the error about infoBox undefined. <?php$infoBox = $_POST["infoBox"];if (!isset($_POST['submit'])) { echo "<html>"; echo "<head>"; echo "<title>InfoBox Generator</title>"; echo "</head>"; echo "<body>"; echo "<form method=\"post\" action=\"" .$_SERVER['PHP_SELF']. "\">"; echo "Info Box:<input type=\"text\" name=\"infoBox\" /><br />"; echo "<div style=\"width:110px;margin-left:15%;\">"; echo "<input type=\"submit\" value=\"submit\" name=\"submit\" />"; echo "</div>"; echo "</form>"; echo "</body>"; echo "</html>";}else { echo "<html>"; echo "<head>"; echo "<title>InfoBox Generator</title>"; echo "</head>"; echo "<body>"; echo "<textarea>"; echo "$infoBox"; echo "</textarea>"; echo "</body>"; echo "</html>";}?> editted at 3:22
  15. Lonig

    I want to make a game

    1) Its not simple2) Synook gave a pretty good "flow" that should be taken3) If you are doing it just to do it, stop now4) this isnt a get rich quick scheme....5) If you don't know php security very well, the game is doomed.I know this is a negative response, and I usually don't do those. But making a web game is a huge undertaking and isnt a "summer" project or a side hobby. The development phase of writing everything out should take you a VERY long time, arguably more time than the coding aspect. Why? Because by the time you get to coding, you already have the entire flow of the game charted out... Don't write a single bit of code until you have all the "systems" planned out in extreme detail.I've been writing 4 game design documents for 7 years now. I've finished 1 over the time, and the other 3 I've done in 4 week cycles. It has worked out well for me, as by working on 3 games of 2 genres, it has enabled me to rethink certain aspects of gameplay when looking between the games.I'd be leary of any game design document that didnt take at least 6 months. Mine has been part time for 7 years. I started strong but the more you write, the harder it gets. It's easy to say you'll have "spells", but when it gets time to come up with calculations that work for the chance of casting it, the chance it hits the person, the amount of damage it initially has, the amount the target mitigates, and the final amount delivered(plus a check to see if the person dies) will take you many many MANY rewrites to figure out. Each calculation probably takes into the equation the initial characters stats and skills, plus the spell itself, and even the environment.If you want to do a simple game, I'd still dedicate a good month(even a low quality flash game) to designing every principle you can think of. It will make the coding so SO much easier when you have it all planned out.Also, if you are making a web RPG, I'd recommend trying it pen and paper style with a couple friends/coworkers to test all the features.Best of luck if you decide to go through with it. My 1 completed design document is only 117 pages(word doc) and i've never bothered to code anything from it. A buddy of mine has one over 300 pages and has been testing it P&P for about 2 years now, doing minor tweaks the last 6 months. Even his(which is a huge game) isn't complete enough for us to code. Then again, we are amatuer and take our prize design documents seriously, so perhaps a 1 week design doc will work for you.. I just am against it.
  16. Lonig

    PHP_POST form problem

    Argh, why does w3schools and the php manual have to try and be so confusing on form data with arrays... I think I need to setup something like: <?phpif ($_POST) { echo '<pre>'; echo htmlspecialchars(print_r($_POST, true)); echo '</pre>';}?><form action="" method="post"> Name: <input type="text" name="personal[name]" /><br /> Email: <input type="text" name="personal[email]" /><br /> Beer: <br /> <select multiple name="beer[]"> <option value="warthog">Warthog</option> <option value="guinness">Guinness</option> <option value="stuttgarter">Stuttgarter Schwabenbräu</option> </select><br /> <input type="submit" value="submit me!" /></form> But I cannot figure out how to READ it once I put it in... I dont understand how to read the array and separate it into variables after.ie: If I setup linkName to an array, how do I pull each one out and name them linkName1, linkName2, etc etc. the amount of linkNames will be however many "linkTotal" there is. Bleh... I have the first two pages done and naturally it doesn't display the dang data on the last page. This is rather frustrating...Sorry, i don't normally get this flustered. I just thought I had a good grasp on what I was doing and it turns out I don't I guess. 2 pages don't mean much if the 3rd doesn't work. And I'd rather not have to set each variable individually, as that will be a horrible mess to work with.
  17. this thing is stuck in a loop... I'm trying to figure out how I can do this loop to work to my needs. I know this is simple and I'm just doing it wrong.the previous page has a form that POSTs to this page. However, it posts lightName1, lightName2, etc etc. So I am trying to get the information to set variables that I am using farther down the page... which does another loop(one that works). Any ideas would be appreciated. Hopefully I find my mistake before you all have to, I know it's something simple... $lt = 0;$lightTotal = $_POST["lightTotal"];do { $lt++; $lightName .$lt = $_POST["lightName" . $lt]; $lcolor . $lt = $_POST["lightColor" . $lt . "Light"]; $lightEffect . $lt = $_POST["lightEffect" . $lt]; $lightColor . $lt = $_POST["lightColor" . $lt]; $goodRefer . $lt = $_POST["goodRefer" . $lt]; $badRefer . $lt = $_POST["badRefer" . $lt]; }while ($lt<$lightTotal);?>
  18. Lonig

    My web site

    Not bad at all. I dont do stars or point values, but the site itself is very straight forward and easy to navigate. Can't really think of much else a site needs to be.Look forward to seeing any non-personal sites you come up with. I recommend you make a page dedicated to a favoirte game or sport, maybe even a team(watch copyrights).Other than that, nothing else to say really, except nice job.
  19. Lonig

    little doubt

    has a pretty good video to help you with CS3 slicing. Apparently it's builtin and doesnt reuire Image Ready anymore. i'm a little behind on graphic arts
  20. Lonig

    little doubt

    Well... You don't really want to do frames OR tables...We are recommending you use CSS... and CSS you can do almost whatever you want.But if you are only giving me the choice between frames or tables... sadly, I'll say tables since once you DO learn CSS it should be easier to convert the table to CSS than a frame setup.also, you can always find "free" templates at websites to "tear apart" and find out how stuff is done(if you learn better that way)... try something like http://www.freewebsitetemplates.com/ or I'm sure others have better.. that just what google popped up for me.
  21. Lonig

    little doubt

    I'll answer in reverse...1) Best way to design a layout?- Since you said you know photoshop, I'd recommend designing it in photoshop and using ImageReady to work with the slices. Or, if you cannot figure out slices, still design it in photoshop and then use CSS/HTML to make the layout.2) Code for image... (this might be messy...) <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>My Picture link</title><style type="text/css">body{width:100%;}img{margin-left:50%;margin-right:50%;}</style></head><body><img src="images/logo.png" alt="logo"></body></html> Or at least that's how i'd do it... (which isnt going to display it "correctly", but will give you an idea of CSS and HTML).follow Ingolme's recomendation and start with the HTML tutorial here at w3cshools.
  22. Have a website (corporate interweb actually) that is just filled to the brim with useless files that aren't used. However, the current setup has multiple locations pulling from multiple directories, so I cannot be certain deleting a file I am 80% sure about....Are there any programs that you all will recommend for crawling a site and listing eithera) What is linked to what:) The files that are not used at allNot sure if B is possible, but at least option A will help us only verify the ones it flags as unused.As a side note, I've considered just renaming files in question and waiting until someone complains... but since this place is 24/7 and some of this is very important data(that may require a not so important "reminder" page before you get to the good stuff) I have ruled that out for now. But that is the plan for once we run a program like the above, rename for a week or two then backup and delete from server.Any advice/pointers would be appreciated
  23. aquasr is dead on. Just make a personal site with your resume and some about you stuff, and redesign it every few months.Or, choose a hobby and make a site about that and redesign it often. Don't worry about advertising, but you can eventually try SEO on a hobby site to see how good you are at that :)Either way, don't make a site you wont have interest in... At least not until you get paid to do it.
  24. <p align="center"> Reasons why this site is better then all the rests:</p></div> Thats the line. Maybe all the nbsp's are breaking the format or something. again, I'll mess with it more later if you don't figure it out.
  25. The ads on the right are fine, except I see in Opera 9.51 the follow bit of text between the middle and right columns. Don't have time to look at the source at the moment, but its in between the middle and right, and is in white font. I'll check back later and if its not fixed i'll look at source.Good looking site thus far, best of luck
  • Create New...