Jump to content

Ad resizing question

Brian F.

Recommended Posts

I received sample files and instructions on how to allow store users to enter their own dimensions for versioned ads.


my question is this...


Can logic be created so that when a user makes an adjustment to one dimension the other dimension will be adjusted proportionately?

Link to comment
Share on other sites

  • 5 years later...

I realize this is an old question, but did you (or anyone else) figure out how to adjust the dimensions proportionately?


I would like to allow the user to type in the page_width__ value and then the page_height__ value would automatically be calculated. I would like to do this without having values in a drop down. The issue is assigning the page_height__ value to field("page_height__").


example: I have an 8.5" x 11" page. The user inputs 17 for the page_width__. The template should output as 17" x 22".


After reading this post (http://forums.pti.com/showthread.php?t=2559&highlight=field+value), I have a feeling that it isn't possible.


I've attached the Ad Resizing information that PTI provided. Note: The resizing will not work in Acrobat, you need to upload it to MarcomCentral for it to work.


Link to comment
Share on other sites

I have not used this so no guarantees here.


First make sure the page_width__ field has a lower sort order number than the page_height__ field.

Put the following script in the Note part of the page_width__ field. Make sure the doc_width and doc_height numbers are correct for your template.


<script type="text/javascript">
var doc_width = 8.5;
var doc_height = 11;

document.getElementById("page_width__").onblur = calc;
function calc() {
document.getElementById("page_height__").value = parseFloat(this.value) * (doc_height / doc_width);}


This should automatically fill out the page_height__ field when you click out of it. You will likely want to set that field to be hidden before publishing the form.


Let me know how it works out.

Link to comment
Share on other sites

  • Create New...