Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Adjustable Text Box

Gklug
5 - Atom

When creating a multiline text box, it is adjustable in Chrome and Firefox, but not in Internet Explorer. Is there a way around this or is it just an IE problem? 

Thanks

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

CAUTION:What I'm about to demonstrate is not for the faint of heart. BACKUP FILES BEFORE ATTEMPTING!

 

I'm assuming a couple things:

 

1) I hope you're referencing a private gallery setup. I don't know how to change it in the public gallery.

2) I hope you have access to the server and know your way around the files.

3) I hope you are comfortable enough with js/html to implement the below changes.

 

 

Assuming you've met the above conditions: We ran into this issue as well and we were able to get it by making the text boxes autoresize. For step 1 I've provided the production.js file from 10.5, but the workflow should work on a 10.0 or 10.1 production.js file if you provide that.Here is what we have done:

1) Run the attached workflow. It will take the production.js file and add some code so that the multiline box can autoresize. AFTER BACKING UP the existing the production.js file, save the output js file to the server (for me it's: E:\Alteryx\bin\RuntimeData\gallery\production\production.js). You'll just overwrite that file.

2) Create a new js file in that folder (for me I've called it E:\Alteryx\bin\RuntimeData\gallery\production\Digan.js) and add in this code:

function resizeTextarea(a){

    a.style.height = 'auto';
	a.style.height =a.scrollHeight + 'px';
	};
	
	
function resizeTextareaALL(){
	var text = document.getElementsByTagName("textarea");
	for(var x = 0; x < text.length; x++)
    {text[x].style.height = 'auto';
	 text[x].style.height = text[x].scrollHeight + 'px';
	};
};

3) Reference that js file you just created (in step 2) in your index.html file (for me it's E:\Alteryx\bin\RuntimeData\gallery\index.html). I've added this one line in the head of the file:

<script src="./production/Digan.js"></script>

Enjoy the autoresizing text boxes! You may have to use Control + F5 to force the webpage to grab the new files you just created.  This is certainly not the best way to do it, but it works so I'm happy with it. We make about 20 small changes whenever we push the latest version to the server.

 

Let me know if you have any problems!

 

 

amitupadhyay
8 - Asteroid

Hello,

 

I also wanted a auto width adjusted textbox to fit the text entirely in view while running the app on private gallery. I followed the steps as described you. But I do not get the desired results.