Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*** CAREERS ***/
- var resumeSubmitBtn = Y.one('#job-submit-resume'),
- friendSubmitBtn = Y.one('#job-send-to-a-friend');
- resumeSubmitBtn.on('click', function(e){
- // get xhr response text
- Y.io('/xhr/submit-resume.php?title=' + Y.one('#job_title').get('value') + '&job_subject=' + Y.one('#job_subject').get('value'), {
- on : {
- success : function(id, o, args) {
- // display form in overlay
- overlay.setStdModContent('body', o.responseText);
- overlay.setStdModContent('header', '<h2>Submit Your Resume</h2>');
- overlay.show();
- overlay.centered();
- }
- }
- });
- // wire up submit button to io-iframe
- Y.delegate('click', function(e){
- e.preventDefault();
- var frm = e.currentTarget.ancestor('form');
- Y.io(frm.get('action'), {
- method : 'POST',
- form : {
- id : frm.get('id'),
- upload : true
- },
- on : {
- start : function(id, args) {
- e.currentTarget.set('disabled', true);
- },
- complete : function(id, o, args) {
- overlay.setStdModContent('body', o.responseText);
- }
- }
- });
- },'form','#submit_resume_form');
- // on submit, close overlay
- });
Add Comment
Please, Sign In to add comment