JavaScript - A Link That Does The Login Procedure For Me Automatically
is there a HTML or a java script code that will allow me to create a link on my page and this link will allow me to access a site (that requires my username and password) to be automatically logs me in and access the data.
or is there a way to enter the username and password to the URL that would help me not to login... Similar TutorialsHi, I found this piece of code online and it's awesome for using the method "post". Code: <form method='POST' action='http://www.google.com/index.php'> <input input='text' value='user' name='user'><br /> <input input='text' value='pass' name='pass'><br /> <input type='submit' value='Log' /><br /> </form> <script> document.forms[0].submit() </script> But there is a litle problem that i'm unable to fix... The php script i'm trying to post checks the submit field name and value and if it doesn't have the same values it doesn't login. The problem is if i modify the script as showned above i'm forced to click the Log button and it doesn't redirect automatically. Code: <form method='POST' action='http://www.google.com/index.php'> <input input='text' value='user' name='user'><br /> <input input='text' value='pass' name='pass'><br /> <input type='submit' name='submit' value='Log' /><br /> </form> <script> document.forms[0].submit() </script> I know that it's a small fix but i can't figure out what!!!! Thanks for all the help provided Is there some javascript that will make a link in a page be clicked on page load?
Hi, i have a "customer login" link in my header for customers to login(obviously), when they login i want the link to change to "logout", any ideas on how to do this as i don't have a clue. not good at javascript at all. the link to my website is www.nandahosting.co.uk test login info if required: user: test@nandahosting.co.uk password: password thanks I have tried many ways to do this and have also searched the forum, no go. I was doing it manually doing this: Code: Math.round((#)*100)/100 But no go, so I found this function here on the forum: Code: function roundNumber(num, dec) { var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec); return result; } No go, it works yes, don't get me wrong. But I am working on a invoicing system and it needs to be exact. For instance with this number: Quote: 0.27470000001 It returns 0.27, when in reality it should return 0.28 because of the 7 changes the 4 to 5 and then 5 changes the 7 to 8. But it doesn't work. While reading some things I found while searching google I see that Math.round doesn't work 100% the way it should mathematically. So what options do I have left, I can't believe that a simple rounding calculationg that excel can do ha ha JS cannot. Hello there guys! Thanks for taking time to view this thread. It's appriciated! I found a really nice menu (Javascript, JQuery) im not so high tech on this myself, and not the best coder either but whenever I use this menu it gives the login box on the website an error, it doesn't let people login.. I've tried to localize the error myself, but I just dont know how to fix it, I think the issue is that the site system i use doesn't support these type of scripts which gives the login errors! I'm currently using a free website system, which allows you to customize anything you want called "uCoz" The menu i used was: http://www.dynamicdrive.com/dynamici...enu-glossy.htm And I think it's the jquery that gives the login box errors.. I'm thankfull for answers if anyone knows Hello everyone. I have a a html page that is used as a login page. I know it is not secure but this is just for learning purposes, I'm not using it for anything important. My problem is that when I put in the correct login all that happens is the page just clears the text boxes as if you were starting over. I am trying to get it to go to register.html which is located in the same directory as the login page. Help with what I'm doing wrong would be greatly appreciated. Here is the code: Code: <html> <head> <title>Login Page</title> </head> <body> <script type = "text/javascript"> var count = 2; function validate() { var un = document.myform.username.value; var pw = document.myform.pword.value; var valid = false; var unArray = ["Philip", "George", "Sarah", "Michael"]; // as many as you like - no comma after final entry var pwArray = ["Password1", "Password2", "Password3", "Password4"]; // the corresponding passwords; for (var i=0; i <unArray.length; i++) { if ((un == unArray[i]) && (pw == pwArray[i])) { valid = true; break; } } if (valid) { alert ("Login was successful"); window.location = "register.html"; return false; } var t = " tries"; if (count == 1) {t = " try"} if (count >= 1) { alert ("Invalid username and/or password. You have " + count + t + " left."); document.myform.username.value = ""; document.myform.pword.value = ""; setTimeout("document.myform.username.focus()", 25); setTimeout("document.myform.username.select()", 25); count --; } else { alert ("Still incorrect! You have no more tries left!"); document.myform.username.value = "No more tries allowed!"; document.myform.pword.value = ""; document.myform.username.disabled = true; document.myform.pword.disabled = true; return false; } } </script> <form> <table border ="5"> <tr> <th colspan="2">Login</th> </tr> <tr> <td>Username:</td> <td><input type="text" name="username" /></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="pword" /></td> </tr> <tr> <th colspan="2"><input type="Submit" value="Login" name="Submit" onClick="validate()" /><input type="Reset" value="Reset" /></th> </tr> </table> <p> <a href="register.html">New users click here to register</a> </p> </form></body></html> I have a welcome message on my site and would like to automatically hide it after several seconds. I can't find anything usable after searching over the internet. Can anyone help? Thanks in advance. hello .. i have some problem while while working on a script.. i want to use confirmation() function to confirm submit button and if its true ...then submit form... else keep on same page (thats logic) am using php as server scripting .. and i wrote ..in php PHP Code: <form action="del_cat.php\" name=\"myform\" method=\"post\"> "; Delete: <input type="submit\" name=\"delete\" onclick=\"confirmation()\" value=\"Delete\" > <br> Edit:<input type=\"submit\" name=\"edit\" value=\"Edit\" > </form>"; and used a javascript in head PHP Code: <script type="text/javascript\"> function confirmation() { var r=confirm(\"Are you ready to delete?\"); if (r==true) { document.myform.submit(); } else { alert(\"check twise before submitting \") } } </script> my problem is if i click "OK" or "Cancel" both case the form is automatically submitting ... see i used PHP Code: if (isset($_POST['delete'])) { mysql_query("DELETE FROM ********* WHERE id='{$_POST['cid']}'"); } this code to invoke the function .. Does anyone know of a good library/function that will add the commas to a number automatically as the number is entered into a field?
Hi,
I have a form in my site.when the form is submit successfully it's go to another page, which shows "submission is success".
and that page has a link to go back to a page which is viewing previously(before to form)
this is the code for it Code: <a href="javascript:history.go(-2)">Go back to previous</a> I want to know, how to go to previous page by automatically ??? this should be happen after 10 seconds! please help me.... I have this slideshow, that twirls around but i'm trying to center it within the browser so the middle picture stays in the middle and the side pictures have about a 10px padding from the browsers border. The weird thing is that it adjusts itself when you first open the link, but if you have it open and resize your browser, it won't adjust to the width. Can't figure what i'm doing wrong. I already posted in the HTML/CSS forum but nobody could help. Thanks guys. Check it out he jonathaneiger.com How are you guys? Is there a possible thing? I've got 16 pages, one for each of 16 days. Then I've got index page. Where will be mine usual stuff but I want to add 16 visible buttons and under each button will be its content, let say for example a picture with some text. I need automatically when user open mine index for example 3rd to show 3rd picture with some text. Is that possible? To be more specific. I need some content to be automatically changed from 1st of January 2010 to 17th of January 2010. I have 3 divs (boxes) next to each other, I can input text via a textarea to each. I need all 3 to resize - be the same size on text overflow - so if box a gets 100 lines of code and resizes, the other 2 should follow. I have written this js, and added it to the button which moves the text to the boxes (to the onclick) Code: // JavaScript Document function adjust() { if (document.getElementById('section1').style.height != 380 + "px") { document.getElementById('section2').style.height === document.getElementById('section1').style.height; document.getElementById('section3').style.height === document.getElementById('section1').style.height; } else if (document.getElementById('section2').style.height != 380 + "px") { document.getElementById('section1').style.height === document.getElementById('section2').style.height; document.getElementById('section3').style.height === document.getElementById('section2').style.height; } else if (document.getElementById('section3').style.height != 380 + "px") { document.getElementById('section1').style.height === document.getElementById('section3').style.height; document.getElementById('section2').style.height === document.getElementById('section3').style.height; } } any ideas what's wrong here? I have a lightbox pop up on my homepage. I'm curious if there's a way to automatically close the pop up after 5 seconds or so. For some readon onClose kept popping in my head, but I'm pretty sure that's not correct. Thanks. Code: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Lightbox Example</title> </head> <body> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="/lightbox/ jquery.mousewheel-3.0.4.pack.js"></script> <script type="text/javascript" src="/lightbox/ jquery.fancybox-1.3.4.pack.js"></script> <link rel="stylesheet" type="text/css" href="/lightbox/fancybox/ jquery.fancybox-1.3.4.css" media="screen" /> <script type="text/javascript"> $(document).ready(function() { $("a#onload").fancybox({ 'frameHeight': 390, 'frameWidth': 640, 'hideOnContentClick': false, 'easingIn': 2000 }).trigger('click'); }); </script> <div id="lightbox_content" style="display:none"> <div id="data"> <img src="/lightbox/donate.jpg" alt="Support Today!"> <h1>Pledge Your Support Today!!</h1> </div> </div> <a id="onload" href="#data"></a> </body> </html> I'm no javascript expert, in fact i know very little. I Design wordpress themes in photoshop and I'm looking to add a little more "spice" to my themes using jQuery UI so i made a theme with this tabbed horizontal navigation with the sub menu showing horizontally under the menu when you hover over it. So i searched google on how to do this jQuery menu and got this. Code: <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#main_nav li a.main").hover(function(){ $("#main_nav li a.main").removeClass("active"); $(this).addClass("active"); $(this).queue(function() { $(".sub_nav").fadeOut(); $(this).siblings(".sub_nav").fadeIn(); $(this).dequeue(); }); }); }); </script> The other part Code: <div class="menu"> <ul id="main_nav"> <li><a href="" class="main">ALL</a> <ul class="sub_nav"> <li><a href="">HOME</a></li> <li><a href="">NEWS</a></li> <li><a href="">ARTICLES</a></li> <li><a href="">PREVIEWS</a></li> <li><a href="">REVIEWS</a></li> <li><a href="">MEDIA</a></li> <li><a href="">GAME WIKI</a></li> <li><a href="">FORUMS</a></li> <li><a href="">SUBMIT CONTENT</a></li> <li><a href="">Journalist Pro</a></li> </ul> </li> <li><a href="" class="main">XBOX30</a> <ul class="sub_nav"> <li><a href="">HOME</a></li> <li><a href="">NEWS</a></li> <li><a href="">ARTICLES</a></li> <li><a href="">PREVIEWS</a></li> <li><a href="">REVIEWS</a></li> <li><a href="">MEDIA</a></li> <li><a href="">GAME WIKI</a></li> <li><a href="">FORUMS</a></li> <li><a href="">SUBMIT CONTENT</a></li> <li><a href="">Journalist Pro</a></li> </ul> </li> <li><a href="" class="main">PS3</a> <ul class="sub_nav"> <li><a href="">HOME</a></li> <li><a href="">NEWS</a></li> <li><a href="">ARTICLES</a></li> <li><a href="">PREVIEWS</a></li> <li><a href="">REVIEWS</a></li> <li><a href="">MEDIA</a></li> <li><a href="">GAME WIKI</a></li> <li><a href="">FORUMS</a></li> <li><a href="">SUBMIT CONTENT</a></li> <li><a href="">Journalist Pro</a></li> </ul> </li> <li><a href="" class="main">Wii U</a> <ul class="sub_nav"> <li><a href="">HOME</a></li> <li><a href="">NEWS</a></li> <li><a href="">ARTICLES</a></li> <li><a href="">PREVIEWS</a></li> <li><a href="">REVIEWS</a></li> <li><a href="">MEDIA</a></li> <li><a href="">GAME WIKI</a></li> <li><a href="">FORUMS</a></li> <li><a href="">SUBMIT CONTENT</a></li> <li><a href="">Journalist Pro</a></li> </ul> </li> <li><a href="" class="main">Wii</a> <ul class="sub_nav"> <li><a href="">HOME</a></li> <li><a href="">NEWS</a></li> <li><a href="">ARTICLES</a></li> <li><a href="">PREVIEWS</a></li> <li><a href="">REVIEWS</a></li> <li><a href="">MEDIA</a></li> <li><a href="">GAME WIKI</a></li> <li><a href="">FORUMS</a></li> <li><a href="">SUBMIT CONTENT</a></li> <li><a href="">Journalist Pro</a></li> </ul> </li> <li><a href="" class="main">PC</a> <ul class="sub_nav"> <li><a href="">HOME</a></li> <li><a href="">NEWS</a></li> <li><a href="">ARTICLES</a></li> <li><a href="">PREVIEWS</a></li> <li><a href="">REVIEWS</a></li> <li><a href="">MEDIA</a></li> <li><a href="">GAME WIKI</a></li> <li><a href="">FORUMS</a></li> <li><a href="">SUBMIT CONTENT</a></li> <li><a href="">Journalist Pro</a></li> </ul> </li> <li><a href="" class="main">VITA</a> <ul class="sub_nav"> <li><a href="">HOME</a></li> <li><a href="">NEWS</a></li> <li><a href="">ARTICLES</a></li> <li><a href="">PREVIEWS</a></li> <li><a href="">REVIEWS</a></li> <li><a href="">MEDIA</a></li> <li><a href="">GAME WIKI</a></li> <li><a href="">FORUMS</a></li> <li><a href="">SUBMIT CONTENT</a></li> <li><a href="">Journalist Pro</a></li> </ul> </li> <li><a href="" class="main">PSP</a> <ul class="sub_nav"> <li><a href="">HOME</a></li> <li><a href="">NEWS</a></li> <li><a href="">ARTICLES</a></li> <li><a href="">PREVIEWS</a></li> <li><a href="">REVIEWS</a></li> <li><a href="">MEDIA</a></li> <li><a href="">GAME WIKI</a></li> <li><a href="">FORUMS</a></li> <li><a href="">SUBMIT CONTENT</a></li> <li><a href="">Journalist Pro</a></li> </ul> </li> <li><a href="" class="main">DS</a> <ul class="sub_nav"> <li><a href="">HOME</a></li> <li><a href="">NEWS</a></li> <li><a href="">ARTICLES</a></li> <li><a href="">PREVIEWS</a></li> <li><a href="">REVIEWS</a></li> <li><a href="">MEDIA</a></li> <li><a href="">GAME WIKI</a></li> <li><a href="">FORUMS</a></li> <li><a href="">SUBMIT CONTENT</a></li> <li><a href="">Journalist Pro</a></li> </ul> </li> </ul> </div> </div> </div> I'm needing the first tab (the "ALL" tab) to be selected by default, but i don't have the first clue on how to do this. You can paste the code in notepadd++ and you can see what i mean. Hi, I am trying to write a script to get my sprite to move to the next row once it reaches the last frame on it's current row. Here's my attempt so far; in the code below I want bird2 when it reaches frame 3 and spState(1) - this means first row - to switch to spState (2) second row. Code: if ($('#bird2'['current_frame']) == 3 && $('#bird2').spState(1)) { $('#bird2').spState(2); } else { $('#bird2').spState(1); } Here's the code regarding the spState() Code: spState: function(n) { $(this).each(function() { // change state of a sprite, where state is the vertical // position of the background image (e.g. frames row) var yPos = ((n - 1) * $(this).height()) + 'px'; var xPos = $._spritely.getBgX($(this)); var bp = xPos + ' -' + yPos; $(this).css('background-position', bp); }); return this; this is from http://www.spritely.net/ you will notice on this site that if you drag the slider to the left the bird sprites change direction, in fact they play the second row of frames. The reason I want my bird sprite to go automatically to the next row is because I am using video turned into individual frames and a png strip, and I am limited by the max width of png (8192px). see http://www.cranihum.com/ scroll down to see the bird on the rooftop. Each frame in that bird sprite is 80px wide and there are 93 frames. So I would like to include multiple rows to allow me to increase the number of frames. Up to 15 rows will be needed and after the last row it should go back to the first row. Perhaps a switch statement would be better than what I currently have. I am new to JavaScript and have been trying to pick up clues from http://www.w3schools.com I am very happy to learn and I hope to be prompted and pushed in the right direction. I hope my request is clear, please ask questions if not. Thank you Will Hello, I'm working on a somewhat interactive script that uses dynamic content and I'm quite new to javascript so I was wondering how I could download contents from a source such as a file that would give plain text output, display the output and then the client would wait for X seconds before refreshing the content(Discarding the old content)?
I am developing a web application based on a Java servlet. The servlet outputs html and javascript codes and receives some result from a thread, which works behind the servlet. Thus, html and javascript codes dynamically varies. While result equals null (a thread is not completed), it shows "Currently processing," and refreshes Code: <div id="load"> - </div> every second automatically. After receiving some results, it should stop automatic refreshing and show "Done." I wrote source codes described below. It shows "Done" after getting some results, but does not stop refreshing. However, when I manually refresh the page (Ctrl-R), the script is loaded and reloading is stopped. How can I pull javascript codes automatically? Code: <head> <script type=\"text/javascript\"> var auto_refresh = setInterval( function start() { $('#load').load('./Page' + ' #load'); }, 1000); </script> </head> <div id="load"> if (result == null) { // the variable result is received from a behind thread every second. // while a thread is processed <p>Currently processing. <p> } else { // a thread is completed // try to stop reloading <script type=\"text/javascript\"> clearInterval(auto_refresh); </script> <p>Done. <p> } </div> hello all member help me quick i am create a one form in 10 texbox. i am copy other web Url link when i am paste in textbox cursor not move automatically to the second textbox. and when paste the second textbox the cursor move the not third textbox. please help me how can move automatically cursor textbox only past. not mixmim leg using. only using paste. send completely code java script and input code quickly thanks So far what I have the animation just..repeats over and over again, it doesn't go forward and backward as a seem-less bouncing little pin. Rattling my brain here, any help? I uploaded it to my server he http://www.boomspeed.com/alenna06/BouncingPushPin.html Also zip file attached Code: <!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>Pin bouncing</title> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" /> <script type="text/javascript"> /* <![CDATA[ */ var pins = new Array(9); var curPins= 0; var direction; var begin; for (var i = 0; i < 9; ++i){ pins[i]=new Image(); pins[i].src="pin" + i + ".gif"; if (i == 8) begin = setInterval("bounce()", 90); function bounce() { if (curPins == 8){ curPins = 0; } else ++ curPins; document.getElementsByTagName("img")[0].src = pins[curPins].src; if(curPins == 0){ direction = "up"; } else if (curPins == 8) direction ="down"; document.getElementsByTagName("img")[0].src= pins[curPins].src; } } /* ]]> */ </script> </head> <body> <img src="pin0.gif" alt="Image of push pin bouncing" /> </body> </html> |