modifying this code to run on window.load instead of on form submit
<p>I'm pretty new to web development, and although I've wrapped my head around javascript im trying to modify some code i grabbed on github written in jquery for my own personal use. Basically right now the code is executed from an input form <code>onsubmit</code> however I'm planning on filling in the form data with php on my server before the code is sent to client to be  executed so I would like to modify the code below to run on <code>window.load</code> instead. I've narrowed down what needs to be modified from a couple hundred lines of code to somewhere in the <code>render: function(){</code> in code block below, but I am unsure on how to exactly do this and pass the input properly to the rest of the functions in the application</p>

<pre><code>var InputView = Backbone.View.extend({
    initialize: function() {
        _.bindAll(this, 'create');
        this.template = _.template($('#input_template').html());
    },

    render: function() {
        this.$el.html(this.template({}));
        this.$el.find('form').submit(_.bind(function(event) {
             window.location = '#' + this.$el.find('input').val();
        }, this));
        this.$el.find('#create').click(this.create);
        this.$el.find('#create').on('click', this.create, this);
        return this;
    },
</code></pre>

<p>basically I just need to know how to properly bind <code>this.$el.find('input').val();</code> to a php echo 
... sorry for the outsourcing but I don't really understand exactly what is going on in all this code, so any help with this would be greatly appreciated</p>

<p>here is the rest of the <code>InputView</code> function just in case it's relevant but i don't think it is</p>

<pre><code>    create: function(event) {
        if(this.$el.find('#create').hasClass('disabled')) return;
        var button = this.$el.find('#create');
        button.addClass('disabled');
        event.preventDefault();
        var product = 'Torque';

        var btapp = new Btapp;
        btapp.connect({
            queries: [['btapp', 'create'], ['btapp', 'browseforfiles']],
            product: product,
            poll_frequency: 500
        });


        var status = new Backbone.Model({
            btapp: btapp,
            product: btapp.get('product'),
            status: 'uninitialized'
        });

        var status = new StatusView({model: status});
        $('.toolbox').append(status.render().el);

        var browse_ready = function() {
            btapp.off('add:bt:browseforfiles', browse_ready);

            btapp.trigger('input:waiting_for_file_selection');
            btapp.browseforfiles(function(files) {
                var files = _.values(files);
                if(files.length === 0) {
                    btapp.trigger('input:no_files_selected');
                    setTimeout(function() {
                        btapp.disconnect();
                        status.destroy();
                        button.removeClass('disabled');
                    }, 3000);
                    return;
                }
                var create_callback = function(data) {
                    btapp.disconnect();
                    btapp.trigger('input:torrent_created');
                    setTimeout(_.bind(btapp.trigger, btapp, 'input:redirecting'), 1000);
                    setTimeout(function() {
                        status.destroy();
                        window.location = '#' + data;
                    }, 3000);
                }

                var torrent_name = create_torrent_filename(files);
                console.log('btapp.create(' + torrent_name + ', ' + JSON.stringify(files) + ')');
                btapp.create(torrent_name, files, create_callback);
                btapp.trigger('input:creating_torrent');
            });
        };
        btapp.on('add:bt:browseforfiles', browse_ready);
        btapp.on('all', _.bind(console.log, console));
    }
});
</code></pre>
