-
-
Save triptych/601750 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*** 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 | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment