www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > JavaScript

    JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...)

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 11-27-2006, 11:22 AM
    dabowlr dabowlr is offline
    Registered User
     
    Join Date: Nov 2006
    Posts: 2
    Exclamation Login Coder Needs to Open In Window!!

    I have this login coder, that I cannot seem to get to open in a new page. I have tried everything that I know of, can anyone help??

    <tr><td>Municipality:</td><td><select name=memlist>
    <option value='x'>
    <option value='Algonquin|31587|JPHPQSXR'>Algonquin
    <option value='Barrington|25311|FDYYPQIT'>Barrington
    <option value='Bull Valley|50655|CDRSYCSS'>Bull Valley
    <option value='Cary|52065|DJXCJQOI'>Cary
    <option value='Crystal Lake|52065|DAEWUFOL'>Crystal Lake
    <option value='Fox River Grove|50711|GUFTKCIS'>Fox River Grove
    <option value='Harvard|50711|IGZXCYHJ'>Harvard
    <option value='Hebron|17020|IMEZVOOU'>Hebron
    <option value='Holiday Hills|59921|JUNJGEZP'>Holiday Hills
    <option value='Huntley|7030|KUNVNFDN'>Huntley
    <option value='Island Lake|13371|JWNDSENE'>Island Lake
    <option value='Johnsburg|3468|RUOOUCUR'>Johnsburg
    <option value='Lake In The Hills|3027|UGKENILL'>Lake In The Hills
    <option value='Lakemoor|2954|MCKENPTR'>Lakemoor
    <option value='Lakewood|27846|RARICQOG'>Lakewood
    <option value='Marengo|21519|SIXFOMOI'>Marengo
    <option value='McCullom Lake|28398|UCCXLNQO'>McCullom Lake
    <option value='McHenry|42256|NGMMOSGJ'>McHenry
    <option value='Oakwood Hills|5027|PJLWQXHI'>Oakwood Hills
    <option value='Port Barrington|66327|RRTWBBZX'>Port Barrington
    <option value='Prairie Grove|14724|QZBRRKFG'>Prairie Grove
    <option value='Richmond|74845|TPHJPORF'>Richmond
    <option value='Spring Grove|32058|TSTKPIPR'>Spring Grove
    <option value='Union|31410|VOQPQORL'>Union
    <option value='Wonder Lake|27598|DOPFHTMD'>Wonder Lake
    <option value='Woodstock|63422|YTQKYZOH'>Woodstock
    <option value='McHenry County Sherrif|20783|OUMESLGG'>McHenry County Sherrif
    <option value='Illinois State Police|10569|JNMPWOJU'>Illinois State Police
    </select></td></tr>
    <tr><td>Password:</td><td><input type=password size=10 maxlength=8 name=pass></td></tr>
    <tr><td colspan=2 align=center><input type=button value="Login" onclick="window.open(check(this.form))"></td>
    </tr>
    </table>
    </form>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    var params=new Array(4);
    var alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI";
    function check(form) {
    which=form.memlist.selectedIndex;
    choice = form.memlist.options[which].value+"|";
    if (choice=="x|") {
    alert("Please Select Your Name From The List");
    return;
    }
    p=0;
    for (i=0;i<3;i++) {
    a=choice.indexOf("|",p);
    params[i]=choice.substring(a,p);
    p=a+1;
    }
    h1=makehash(form.pass.value,3);
    h2=makehash(form.pass.value,10)+" ";
    if (h1!=params[1]) {
    alert("Incorrect Password!"); return; };
    var page="";
    for (var i=0;i<8;i++) {
    letter=params[2].substring(i,i+1)
    ul=letter.toUpperCase();
    a=alpha.indexOf(ul,0);
    a-=(h2.substring(i,i+1)*1);
    if (a<0) a+=26;
    page+=alpha.substring(a,a+1); };
    top.location=page.toLowerCase()+".html";
    }
    function makehash(pw,mult) {
    pass=pw.toUpperCase();
    hash=0;
    for (i=0;i<8;i++) {
    letter=pass.substring(i,i+1);
    c=alpha.indexOf(letter,0)+1;
    hash=hash*mult+c;
    }
    return(hash);
    }
    // End -->
    </script>
    Reply With Quote
      #2  
    Old 11-27-2006, 12:02 PM
    so_is_this so_is_this is offline
    don't ask
     
    Join Date: Oct 2006
    Posts: 1,304
    This:

    onclick="window.open(check(this.form))"

    should be just this:

    onclick="return check(this.form)"

    and this:

    top.location=page.toLowerCase()+".html";

    should be this:

    window.open(page.toLowerCase()+".html");
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 02:11 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.