Jump to content


  • Posts

  • Joined

  • Last visited

About Lonig

  • Birthday 02/19/1983

Previous Fields

  • Languages
    C#, ASP.NET(2.0), PHP, (X)HTML, CSS, MySQL, SQL

Contact Methods

  • AIM
  • MSN
  • Website URL
  • ICQ
  • Yahoo

Profile Information

  • Location

Lonig's Achievements


Newbie (1/7)



  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.
  • Create New...