Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ratnesh
    @Ratnesh-Github
    <script src="https://gist.github.com/Ratnesh-Github/fd537e03137c2db6dffc.js"></script>
    <code>new InputView({
    type: 'password',
    label: 'Password:',
    name: 'password',
    template: templates.includes.formInput(),
    value: this.model && this.model.password,
    required: true,
    placeholder: '',
    parent: this
    }),
    new InputView({
    type: 'password',
    label: 'Confirm Password:',
    name: 'confirmPassword',
    template: templates.includes.formInput(),
    value: this.model && this.model.password,
    required: true,
    placeholder: '',
    parent: this,
    tests: [
    function (val) {
    if (this.parent.getData().password !== val) {
    return 'Passwords do not match'
    }
    }
    ]
    }), </code>
    <script src="https://gist.github.com/Ratnesh-Github/fd537e03137c2db6dffc.js"></script>
    ruby new InputView({ type: 'password', label: 'Confirm Password:', name: 'confirmPassword', template: templates.includes.formInput(), value: this.model && this.model.password, required: true, placeholder: '', parent: this, tests: [ function (val) { if (this.parent.getData().password !== val) { return 'Passwords do not match' } } ] })ruby
    Ratnesh
    @Ratnesh-Github
    require 'redcarpet'
    markdown = Redcarpet.new("Hello World!")
    puts markdown.to_html
    JavaScript var a = Object();JavaScript
    ruby var obj = new Object();ruby
    var obj = new Object();
    require 'redcarpet'
    markdown = Redcarpet.new("Hello World!")
    puts markdown.to_html
    new InputView({
                        type: 'password',
                        label: 'Password:',
                        name: 'password',
                        template: templates.includes.formInput(),
                        value: this.model && this.model.password,
                        required: true,
                        placeholder: '',
                        parent: this
                    }),
                    new InputView({
                        type: 'password',
                        label: 'Confirm Password:',
                        name: 'confirmPassword',
                        template: templates.includes.formInput(),
                        value: this.model && this.model.password,
                        required: true,
                        placeholder: '',
                        parent: this,
                        tests: [
                            function (val) {
                                if (this.parent.getData().password !== val) {
                                    return 'Passwords do not match'
                                }
                            }
                        ]
                    }),
    Ratnesh
    @Ratnesh-Github
    ``` var x =1
    var x = 1;
    Ratnesh
    @Ratnesh-Github
    Hi guys, I am using request for accessing a website which requires 2 level of authentication. The first level is username and password. Second level is security questions. I am providing the answer directly through server. Though I am getting logged in the website, but the server keeps on trying to login into that site again and again. I can't understand why this is happening.
    I am providing the code here :
    function start(route){
        http.createServer(function(request,response){
    
         var pathname = url.parse(request.url).pathname;
    
        route(pathname);    
        response.writeHead(200,{"Content-Type":"text/html"});
        request1.post({url:'https://system.somesite.loginpage',                
                    form: {email:'email@gmail.com', password:'userpassword'},
                    followRedirect : true,
                    followAllRedirects : true,
                    jar : true,
                    maxRedirects : 5}, 
                    function(err,httpResponse,body){             
    
                    if(!err){                
                    body = body.replace(/script/gi, 'script1');
    
                    console.log("Login Successfull Heading for Question and Answers");                
    
                    request1.post({url:'https://otherurl.further',                               
                                  form: {email:'email@gmail.com', answer:'something',submitter:'Submit'},
                                  followRedirect : true,
                                  followAllRedirects : true,
                                  jar : true,
                                  maxRedirects : 5
                                  }, function (err2, httpResponse2, body2) {
    
                                  //GET Request -- Accessing a page after Successful login
    
                                  console.log("QA Successful Heading for getting Account details");
                                  request1.get({url:'customerspageurl.com',                                        
                                        followRedirect : true,
                                        followAllRedirects : true,
                                        jar : true,
                                        maxRedirects : 5
                                        },                                            
                                        function (error3, response3, body3) {
                                            console.log("********** Request Complete **************");                                                        response.write(body3);
                                            response.end();    
                                            });
                            });
    
                }
                else{
    
                    console.log("error ");
                }
        });    
    
    }).listen(8888);
    console.log("Server started");
    }
    Ratnesh
    @Ratnesh-Github
    new SelectView({
                    label: 'Pick fav colors!', 
                    template: templates.includes.formSelect(),               
                    name: 'color',
                    parent: this,
                    value : this.model && this.model.color,              
                    options: ['blue', 'orange', 'red'],                
                    unselectedText: 'please choose one',                
                    required: true
                })
    Ratnesh
    @Ratnesh-Github
    Is there a way to generate dynamic forms using ampersand-form ? I want to generate a dynamic form based on json schema. Also extraAttribute:"allow" allows me to