# HG changeset patch # User rlm # Date 1264656774 18000 # Node ID 329638a361ccd2f39d86b4db890bdf75e05a9e35 # Parent ef8615de8a9cc6e15a642daf1afde5fad99467cc [svn r44] implemented redraw memory. diff -r ef8615de8a9c -r 329638a361cc awesome_js/robert.js --- a/awesome_js/robert.js Wed Jan 27 22:04:43 2010 -0500 +++ b/awesome_js/robert.js Thu Jan 28 00:32:54 2010 -0500 @@ -21,6 +21,18 @@ function redraw(style) { + +var JSONtext = document.getElementById('formValues').innerHTML; +var hash = new Object(); +hash = eval('(' + JSONtext + ')'); + +if(hash.Name){alias = hash.Name;} +if(hash.Email){email = hash.Email;} +if(hash.Occupation){occupation = hash.Occupation;} +if(hash.Company){company = hash.Company;} +if(hash.Phone){phone = hash.Phone;} +if(hash.website){website = Website;} + if (style == "bold") { @@ -36,19 +48,17 @@ -var oText = document.getElementById('Name'); -var text_val = oText.value; -d_alias = raphe.print(10, 160, text_val, raphe.getFont('HelveticaNeue', 700), 60); + +d_alias = raphe.print(10, 160, alias, raphe.getFont('HelveticaNeue', 700), 60); d_alias.attr('stroke', '#6a6a6a'); d_alias.attr('fill', 'none') var c = d_alias.getBBox().width; d_alias.translate((485 - c)/2,0); -var oText = document.getElementById('Email'); -var text_val = oText.value; -d_email = raphe.print(280, 270, text_val, raphe.getFont("HelveticaNeue", 700), 25); + +d_email = raphe.print(280, 270, email, raphe.getFont("HelveticaNeue", 700), 25); d_email.attr('stroke', '#6a6a6a'); d_email.attr('fill', 'TRANSPARENT'); @@ -70,38 +80,23 @@ if(typeof d_lineArt != 'undefined' ){d_lineArt.remove();} -var oText = document.getElementById('Name'); -var text_val = oText.value; -d_alias = raphe.print(40, 110, text_val, raphe.getFont('HelveticaNeue', 700), 55); + +d_alias = raphe.print(40, 110, alias, raphe.getFont('HelveticaNeue', 700), 55); d_alias.attr('stroke', '#6a6a6a'); d_alias.attr('fill', 'none') - - -var oText = document.getElementById('Company'); -var text_val = oText.value; - -d_company = raphe.print(40, 155, text_val, raphe.getFont("HelveticaNeue", 700), 27); +d_company = raphe.print(40, 155, company, raphe.getFont("HelveticaNeue", 700), 27); d_company.attr('stroke', '#6a6a6a'); d_company.attr('fill', 'TRANSPARENT'); - -var oText = document.getElementById('Occupation'); -var text_val = oText.value; - -d_occupation = raphe.print(40, 190, text_val, raphe.getFont("HelveticaNeue", 700), 27); +d_occupation = raphe.print(40, 190, occupation, raphe.getFont("HelveticaNeue", 700), 27); d_occupation.attr('stroke', '#6a6a6a'); d_occupation.attr('fill', 'TRANSPARENT'); - -var oText = document.getElementById('Email'); -var text_val = oText.value; - -d_email = raphe.print(280, 270, text_val, raphe.getFont("HelveticaNeue", 700), 25); +d_email = raphe.print(280, 270, email, raphe.getFont("HelveticaNeue", 700), 25); d_email.attr('stroke', '#6a6a6a'); d_email.attr('fill', 'TRANSPARENT'); - d_lineArt = raphe.path("M 2 272 L 258 272"); d_lineArt.attr('stroke', '#6a6a6a'); @@ -120,62 +115,44 @@ if(typeof d_lineArt != 'undefined' ){d_lineArt.remove();} -var oText = document.getElementById('Email'); -var text_val = oText.value; - -d_email = raphe.print(0, 42, text_val, raphe.getFont("HelveticaNeue", 700), 29); +d_email = raphe.print(0, 42, email, raphe.getFont("HelveticaNeue", 700), 29); d_email.attr('stroke', '#6a6a6a'); d_email.attr('fill', 'TRANSPARENT'); var c = d_email.getBBox().width; d_email.translate((510 - c)/2,0); -var oText = document.getElementById('Phone'); -var text_val = oText.value; -d_phone = raphe.print(0, 75, text_val, raphe.getFont("HelveticaNeue", 700), 27); +d_phone = raphe.print(0, 75, phone, raphe.getFont("HelveticaNeue", 700), 27); d_phone.attr('stroke', '#6a6a6a'); d_phone.attr('fill', 'TRANSPARENT'); var c = d_phone.getBBox().width; d_phone.translate((510 - c)/2,0); - - -var oText = document.getElementById('Name'); -var text_val = oText.value; -d_alias = raphe.print(0, 164, text_val, raphe.getFont('HelveticaNeue', 800), 47); +d_alias = raphe.print(0, 164, alias, raphe.getFont('HelveticaNeue', 800), 47); d_alias.attr('stroke', '#6a6a6a'); d_alias.attr('fill', 'none') var c = d_alias.getBBox().width; d_alias.translate((510 - c)/2,0); -var oText = document.getElementById('Company'); -var text_val = oText.value; -d_company = raphe.print(0, 247, text_val, raphe.getFont("HelveticaNeue", 700), 27); +d_company = raphe.print(0, 247, company, raphe.getFont("HelveticaNeue", 700), 27); d_company.attr('stroke', '#6a6a6a'); d_company.attr('fill', 'TRANSPARENT'); var c = d_company.getBBox().width; d_company.translate((510 - c)/2,0); -var oText = document.getElementById('Occupation'); -var text_val = oText.value; -d_occupation = raphe.print(0, 278, text_val, raphe.getFont("HelveticaNeue", 700), 27); +d_occupation = raphe.print(0, 278, occupation, raphe.getFont("HelveticaNeue", 700), 27); d_occupation.attr('stroke', '#6a6a6a'); d_occupation.attr('fill', 'TRANSPARENT'); var c = d_occupation.getBBox().width; d_occupation.translate((510 - c)/2,0); - - -var oText = document.getElementById('Website'); -var text_val = oText.value; - -d_website = raphe.print(0, 0, text_val, raphe.getFont("HelveticaNeue", 700), 21); +d_website = raphe.print(0, 0, website, raphe.getFont("HelveticaNeue", 700), 21); d_website.attr('stroke', '#6a6a6a'); d_website.attr('fill', 'TRANSPARENT'); @@ -200,45 +177,39 @@ -var oText = document.getElementById('Name'); -var text_val = oText.value; -d_alias = raphe.print(37, 70, text_val, raphe.getFont('HelveticaNeue', 700), 55); + +d_alias = raphe.print(37, 70, alias, raphe.getFont('HelveticaNeue', 700), 55); d_alias.attr('stroke', '#6a6a6a'); d_alias.attr('fill', 'none') -var oText = document.getElementById('Occupation'); -var text_val = oText.value; -d_occupation = raphe.print(37, 120, text_val, raphe.getFont("HelveticaNeue", 700), 27); + +d_occupation = raphe.print(37, 120, occupation, raphe.getFont("HelveticaNeue", 700), 27); d_occupation.attr('stroke', '#6a6a6a'); d_occupation.attr('fill', 'TRANSPARENT'); -var oText = document.getElementById('Company'); -var text_val = oText.value; -d_company = raphe.print(37, 178, text_val, raphe.getFont("HelveticaNeue", 700), 27); + +d_company = raphe.print(37, 178, company, raphe.getFont("HelveticaNeue", 700), 27); d_company.attr('stroke', '#6a6a6a'); d_company.attr('fill', 'TRANSPARENT'); -var oText = document.getElementById('Phone'); -var text_val = oText.value; -d_phone = raphe.print(37, 210, text_val, raphe.getFont("HelveticaNeue", 700), 27); +d_phone = raphe.print(37, 210, phone, raphe.getFont("HelveticaNeue", 700), 27); d_phone.attr('stroke', '#6a6a6a'); d_phone.attr('fill', 'TRANSPARENT'); -var oText = document.getElementById('Email'); -var text_val = oText.value; -d_email = raphe.print(37, 240, text_val, raphe.getFont("HelveticaNeue", 700), 27); + +d_email = raphe.print(37, 240, email, raphe.getFont("HelveticaNeue", 700), 27); d_email.attr('stroke', '#6a6a6a'); d_email.attr('fill', 'TRANSPARENT'); -var oText = document.getElementById('Website'); -var text_val = oText.value; -d_website = raphe.print(37, 270, text_val, raphe.getFont("HelveticaNeue", 700), 27); + + +d_website = raphe.print(37, 270, website, raphe.getFont("HelveticaNeue", 700), 27); d_website.attr('stroke', '#6a6a6a'); d_website.attr('fill', 'TRANSPARENT'); diff -r ef8615de8a9c -r 329638a361cc buy.html --- a/buy.html Wed Jan 27 22:04:43 2010 -0500 +++ b/buy.html Thu Jan 28 00:32:54 2010 -0500 @@ -80,19 +80,19 @@ + + +
+PERL::INITIALVALUES +
+ + - - -
-PERL::INITIALVALUES -
- -