www.webdeveloper.com
Results 1 to 2 of 2

Thread: Webmail Notifier - not working script

  1. #1
    Join Date
    Feb 2012
    Posts
    2

    Question Webmail Notifier - not working script

    Helo i have problem with my script.
    His is html code from website http://free.os.pl where I have email
    Login:
    HTML Code:
    <input tabindex="-1" style="width:224px; font-size:12px;" class="wm_input" type="text" value="" id="inc_login" name="inc_login" maxlength="255" onfocus="this.className = 'wm_input_focus';" onblur="this.className = 'wm_input';">
    Password:
    HTML Code:
    <input tabindex="3" style="width:224px; font-size:12px;" class="wm_input wm_password_input" type="password" value="" id="password" name="password" maxlength="255" onfocus="this.className = 'wm_input_focus wm_password_input';" onblur="this.className = 'wm_input wm_password_input';">
    this is my 1st code - not working:
    Code:
    // JavaScript Document
    function initHandler(handler){
    handler.name="MyMail";
    this.dataURL="http://free.os.pl";
    this.loginData=["http://free.os.pl/index.php?mode=submit","name","password","key="+encodeURIComponent("abc=12")];
    this.mailURL="http://free.os.pl";
    }
    function getCount(aData){ //aData is a html source in dataURL
    var fnd=aData.match(/\"folders\":\[{\"id\":1.+?\"unread\":(\d+)/); //find mail count
    if(fnd){
    var num;
    //get mail count here
    return num;
    }else{
    return -1;//display 'not checked' message
    }
    }
    And 2nd code - not working:
    Code:
    /**********************************************************
    INTERIA.PL
    **********************************************************/
    var name="INTERIA.PL";
    var ver="2010-11-12";
    
    function init(){
    this.initStage=ST_PRE;
    this.loginData=["http://free.os.pl/index.php?mode=submit","email","password"];
    this.dataURL="http://free.os.pl";
    this.mailURL="http://free.os.pl";
    this.mailDomain="free.os.pl";
    }
    
    function getCount(aData){
    var fnd=aData.match(/\"folders\":\[{\"id\":1.+?\"unread\":(\d+)/);
    if(fnd){
    return fnd[1];
    }else{
    fnd=aData.match(/Odebrane<\/a>.+?\((?:(\d+)\/)?\d+?\)/);
    if(fnd)return fnd[1]?fnd[1]:0;
    else return -1;
    }
    }
    function process(aHttpChannel, aData) {
    switch(this.stage){
    case ST_PRE:
    this.stage=ST_LOGIN;
    this.getHtml("http://free.os.pl/");
    return true;
    }
    return this.baseProcess(aHttpChannel, aData);
    }
    PLZ Help
    Whats wrong with this code???

  2. #2
    Join Date
    Feb 2012
    Posts
    2
    I need Help plz

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles