Jump to content

absorr

Members
  • Posts

    53
  • Joined

  • Last visited

Everything posted by absorr

  1. Is there a way to get document elements of a different html file through JavaScript? I need to be able to get the title and the description (the description being se by meta tag).
  2. How do I add an attribute (like src="blah") into a tag created using createElement? It has to be in JS, and can not use innerHTML. Thanks!
  3. that worked thanks guys
  4. <!DOCTYPE html><html> <head> <title>Nova Skin Lite</title> <script type="text/javascript"> function steve() { document.getElementById('edit').innerHTML = '<iframe src=\"http://minecraft.novaskin.me/lite#http://www.minecraft.net/images/char.png\" width=\"100%\" height=\"800\">ERROR CODE: I ######ed up</iframe>'; } function userSkin() { var user = document.skin.user.value document.getElementById('edit').innerHTML = '<iframe src=\"http://minecraft.novaskin.me/lite#'user'\" width=\"100%\" height=\"800\">ERROR CODE: I ######ed up</iframe>'; } </script> </head> <body> <div id="edit"><iframe src="http://minecraft.novaskin.me/lite#http://www.minecraft.net/images/char.png" width="100%" height="90%">ERROR CODE: I ######ed up</iframe></div> <form name="skin"> Load User Skin: <input type="text" name="user" /> <input type="button" value="Submit" onClick="javascript:userSkin();" /> <input type="button" value="Steve (default)" onClick="javascript:steve();" /> </form> </body></html> When I click the button (either one) it does not work. In the chrome JS console it says "Uncaught ReferenceError: steve is not defined"
  5. I am making a Windows 8 app using Visual Basic. I'm using the VBScript forum because its pretty much the same thing but one is for web and I love W3Schools Forums. I need to write into an already existing .jar file. I know in Java this is done by unpacking adding and packing but the API methods for it is not in VB. How do I do it?Oh also would it be possible to do this using VBScript in a Windows 8 HTML/JS app?
  6. Ok so it did not work. Chrome highlights all of the parts in the script part where it says "area". It says "Uncaught Syntax Error: Unexpected Token ILLEGAL". and also on the buttons for activating, it says the functions don't exist
  7. So I just have to align it all into one line for each writing? Wait hold on I spotted something, I forgot to end some functions with }. I'm going to try these one at a time and see If I can fix it. Lemme see if it works.
  8. Because it is to write those parts in when called upon and if they are not escaped it thinks those quotes are not for writing but to stop writing and that messes it up.
  9. I need help debugging this because I can't find the problem. When I click the buttons that are supposed to make the script write in the correct code, it doesn't. The Google Chrome debuger is coming up with weird stuff and I don't understand why it thinks this. <html><head><title>SimpServ - Simple Server Managment Dashboard</title><link rel="shortcut icon" href="simpservicon.png"><script language="javascript">function playman(){document.getElementById("area").innerHTML = "<b>Player Managment</b><br><form action=\"methods/playermain.php\" method=\"post\">Player Name: <input type=\"text\" name=\"name\" /><input type=\"hidden\" value=\"absorr\" name=\"user\"><input type=\"hidden\" value=\"homestar\" name="pass\"><input type=\"hidden\" value=\"salty goodness\" name=\"salt\"><input type=\"hidden\" value=\"20059\" name=\"port\"><input type=\"hidden\" value=\"174.101.159.155\" name=\"ip\"><input type=\"submit\" value=\"Get Info\"/></form>";}function plugman(){document.getElementById("area").innerHTML = "<b>Plugin Managment</b><br><a onclick=\"on()\">Turn On Plugin</a><br><a onclick=\"off()\">Turn Off Plugin</a><br><a onclick=\"upload()\">Upload Plugin</a><br><p id=\"area\"></p>";function off(){document.getElementById("area").innerHTML = "<form action=\"methods/disablePlugin.php\" method=\"post\">Plugin: <input type=\"text\" name=\"name\" /><input type=\"hidden\" value=\"absorr\" name=\"user\"><input type=\"hidden\" value=\"homestar\" name=\"pass\"><input type=\"hidden\" value=\"salty goodness\" name=\"salt\"><input type=\"hidden\" value=\"20059\" name=\"port\"><input type=\"hidden\" value=\"174.101.159.155\" name=\"ip\"><br><input type=\"submit\" /></form>";}function on(){document.getElementById("area").innerHTML = "<form action=\"methods/enablePlugin.php\" method=\"post\"><input type="hidden" value="absorr" name="user"><input type="hidden" value="homestar" name="pass"><input type="hidden" value="salty goodness" name="salt"><input type=\"hidden\" value=\"20059\" name=\"port\"><input type=\"hidden\" value=\"174.101.159.155\" name=\"ip\">Plugin: <input type=\"text\" name=\"name\" /><br><input type=\"submit\" /></form>";}function upload(){document.getElementById("area").innerHTML = "<form action=\"methods/upload.php\" method=\"post\" enctype=\"multipart/form-data\"><input type=\"hidden\" value=\"absorr\" name=\"user\"><input type=\"hidden\" value=\"homestar\" name=\"pass\"><input type=\"hidden\" value=\"salty goodness\" name=\"salt\"><input type=\"hidden\" value=\"20059\" name=\"port\"><input type=\"hidden\" value=\"174.101.159.155\" name=\"ip\"><input type=\"file\" name=\"file\" id=\"file\" /><input type=\"submit\" name=\"submit\" value=\"Submit\" /></form>";}function servman(){document.getElementById("area").innerHTML = "<b>Server Managment</b><br><a onclick=\"chatname()\">Chat With Name</a><br><a onclick=\"send()\">Broadcast Message</a><br><p id=\"area\"></p>";function servinfo(){document.getElementById("area").innerHTML = "<b>Server Managment</b><br><a onclick=\"read()\">Read File</a><br><a onClick=\"banIPlist()\">Banned IPs</a><br><a onClick=\"banlist()\">Banned Players</a><br><a onClick=\"loglist()\">Recent Connections</a><br><a onClick=\"chatlist()\">Recent Chats</a><br><a onClick=\"worldlist()\">List Worlds</a><br><p id=\"area\"></p>";function chatname(){document.getElementById("area").innerHTML = "<form action=\"methods/broadcastWithName.php\" method=\"post\"><input type=\"hidden\" value=\"absorr\" name=\"user\"><input type=\"hidden\" value=\"homestar\" name=\"pass\"><input type=\"hidden\" value=\"salty goodness\" name=\"salt\"><input type=\"hidden\" value=\"20059\" name=\"port\"><input type=\"hidden\" value=\"174.101.159.155\" name=\"ip\">Name: <input type=\"text\" name=\"name\" /><br>Message:<br> <TEXTAREA NAME=\"msg\" ROWS=\"10\" WRAP=\"hard\"></TEXTAREA><br><input type=\"submit\" /></form>";}function send(){document.getElementById("area").innerHTML = "<form action=\"methods/broadcastWithName.php\" method=\"post\"><input type=\"hidden\" value=\"absorr\" name=\"user\"><input type=\"hidden\" value=\"homestar\" name=\"pass\"><input type=\"hidden\" value=\"salty goodness\" name=\"salt\"><input type=\"hidden\" value=\"20059\" name=\"port\"><input type=\"hidden\" value=\"174.101.159.155\" name=\"ip\">Message:<br> <TEXTAREA NAME=\"msg\" ROWS=\"10\" WRAP=\"hard\"></TEXTAREA><br><input type=\"submit\" /></form>";function cust(){document.getElementById("area").innerHTML = "<p>You have no custom methods or other functions set. E-mail us at absorr@live.com and we will put it in for you. Custom JSONAPI methods can be created in the config file in your plugins folder. You may add things from other plugins too here.</p>";}</script></head><body bgcolor="#F0F0F0"><center><table height="10%" width="100%"><tr><td width="300"><img src="http://i499.photobucket.com/albums/rr358/Absorr/simpservbanneral.png" height="150"></font></td><td><b>TechCraft</b> git-Bukkit-1.1-R4-b1938jnks (MC: 1.1) Players Online: 0/20</td></tr></table><table width="100%" height="90%"><tr><th align="center" bgcolor="#C8C8C8" width="30%" height="30">JSONAPI</th><th align="center" bgcolor="#C8C8C8" width="70%" height="30">Dynmap</th></tr><tr><td bgcolor="#B8B8B8" valign="top"><forum><input type="button" value="Player Managment" onClick="playman()" /><input type="button" value="Plugin Managment" onClick="plugman()" /><input type="button" value="Server Managment" onClick="servman()" /><input type="button" value="Server Information" onClick="servinfo()" /><input type="button" value="Custom Methods" onClick="cust()" /></form><p id="area"></p></td><td bgcolor="#B8B8B8"><iframe src="http://174.101.159.155:8123" width="100%" height="100%">EPIC FAILURE</iframe></td></tr></table><table width="100%" height="500"><tr><td width="50%" height="100%"><iframe src="methods/getLatestConsoleLogs.php" width="100%" height="100%">EPIC FAILURE</iframe></td><td><iframe src="advanced.html" width="100%" height="100%">EPIC FAILURE</iframe></td></tr><tr><td height="36"><iframe src="runit.html" width="100%" height="35">EPIC FAILURE</iframe></td><td>Made by Will Stephenson. Copyright Absorr Design (c) 2012. Thanks to JSONAPI and Dynmap and Bukkit</table></center></body></html> Note the copyright at the bottom. Don't steal (not saying that I don't trust you guys, I'm saying this is the internet).
  10. for number three you could use a database like MySQL
  11. Perhaps you could use APIs from external sites like Google or Facebook? Lots of sites allow you to login through Facebook through their API. Or you could get a host that uses cPanel to set a password onto a directory. I do that with my Troop's site.
  12. Did you try with IE9? I'm pretty sure, but I might be wrong, that HTML 5 was not compatible in 8. It for sure is in IE9. Also from the looks at all of that code it does seem like it would be simpler to use an iframe seeing that all you would have to do is <iframe src="URL HERE">MESSAGE FOR IF IT DOES NOT WORK HERE</iframe> with other optional attributes like width and height
  13. absorr

    Make PHP make PHP

    Thank you! The reason is for that server manager that I've been posting for help on recently. I keep having to manually put in my clients' information in and I want to make it generate the files based on the information they put into the form field. That just gave me the last thing i needed to make that work!
  14. absorr

    Filter

    Just tell me/show me what I need to do.
  15. absorr

    Make PHP make PHP

    I know that you can use file_put_contents to write a file and that you can use \ to cancel things, but though If I were to generate a PHP file through this (unless there is a more efficient way) what would I need to cancel and also how would I make it start a new line?
  16. Discovered a free AND EASY flash editor. StencylWorks
  17. absorr

    Button Functions

    I'm not having this argument with you. Thanks for helping.
  18. absorr

    Button Functions

    Never mind. The problem was that i used type="button" instead of type="submit"
  19. absorr

    Button Functions

    That did not work. I click on the image button (using chrome. also tried on IE9) and it does nothing. I used the button tag because looking at the input it was an image not an image button.Here's the code<?phprequire('JSONAPI.php'); // get this file at: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php$api = new JSONAPI(CENSORED, CENSORED, CENSORED, CENSORED, CENSORED);echo "<form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"2\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum><form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"4\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum><form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"6\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum><form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"8\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum><form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"10\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum><form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"12\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum><form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"14\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum><form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"16\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum><form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"18\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum><form action=\"setPlayerHealth.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"hidden\" name=\"heart\" value=\"20\" /><button type=\"button\"><img src=\"http://www.minecraftwiki.net/images/thumb/a/a7/Heart.svg/9px-Heart.svg.png\"></button></forum>";echo "<br><br><form action=\"ban.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"submit\" value=\"Ban\"/></form>";echo "<form action=\"unban.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"submit\" value=\"Unban\"/></form>";echo "<form action=\"banIP.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"submit\" value=\"Ban IP\"/></form>";echo "<form action=\"unbanIP.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"submit\" value=\"UnbanIP\"/></form>";echo "<form action=\"opPlayer.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"submit\" value=\"Make Op\"/></form>";echo "<form action=\"unopPlayer.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" /><input type=\"submit\" value=\"Unop\"/></form>";echo "<form action=\"kickPlayer.php\" method=\"post\"><input type=\"hidden\" name=\"name\" value=\"{$_POST['name']}\" />Reason: <input type=\"text\" name=\"msg\" /><input type=\"submit\" value=\"Kick\"/></form>";var_dump($api->call("getPlayer", array($_POST["name"])));?>
  20. absorr

    Button Functions

    So that I don't have to start a new topic, I'll just tell you my related problem. I have 10 hearts next to each other to show the player's health level. I want to make it so that if you were to click on the last heart, it will, using PHP, carry on the player name with the health level 20 to the PHP file. Very similar to my above problem only I want it when you click a picture instead of pressing a button to submit the forum. Now that I think about it, this probably fits under the HTML category better. Oh well, it does include PHP. So how do I make this happen?
  21. absorr

    Button Functions

    YES! A hidden input! THANK YOU! That was exactly what I was looking for! THANK YOU THANK YOU THANK YOU! Now to see if works.... EDIT It does!
  22. absorr

    Filter

    Sorry, I had it changed to the var dump because of how it didn't work and I forgot to change back when testing your answer. it gave me the table but it didn't show the results. Here's the table: Property Valueresult successsource getLatestConsoleLogssuccess Array and here is getLatestConsoleLogs.php <?phprequire('JSONAPI.php'); // get this file at: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php$api = new JSONAPI([color=#000000][size=2]CENSORED[/size][/color][color=#666600][size=2],[/size][/color][color=#000000][size=2] CENSORED[/size][/color][color=#666600][size=2],[/size][/color][color=#000000][size=2] CENSORED[/size][/color][color=#666600][size=2],[/size][/color][color=#000000][size=2] CENSORED[/size][/color][color=#666600][size=2],[/size][/color][color=#000000][size=2] CENSORED[/size][/color]);$array = $api->call("getLatestConsoleLogs");echo '<table>';echo '<tbody>';foreach($array as $property=>$value) { echo '<tr>'; echo "<td>$property</td><td>$value</td>"; echo '</tr>';}echo '</tbody>';echo '<thead><tr><th>Property</th><th>Value</th></tr></thead>';echo '</table>';?> and birbal's didn't give me anything
  23. absorr

    Button Functions

    I know that already, how else do you think it got the information in the first place? I have made tons pf HTML forums that link to PHP but I want to know how I can make it so that after that 1st one, previous inputs are recycled in the next part. The way I was it the easiest way would seem to be a forum in the PHP file that will activate a part in the same PHP file so that it never loses the information. How do I do this?
  24. absorr

    Button Functions

    Well I want it so that when you insert a player's name and after it gives you information about that player that you can do things like ban, kick, give an item, etc, but the function requires a name input and I don't want to have to put the name in all over again. I need some way that the received name is carried throughout.
  25. absorr

    Button Functions

    I know that in JavaScript you use onClick="functionName" but how do you do it in a php file? I have HTML echoed in a php and I want it so that when the button is pressed in the HTML that is echoed it will start some kind of function. How do I do that?
×
×
  • Create New...