Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 ASP (Windows server) versions
 input length, customfield
Author « Topic »  

Marshall
Ecommerce Template Guru

USA
1916 Posts

Posted - 06/19/2018 :  20:24:12  
ASP v6.9.2. It would seem the custom input field in the admin for products is limited to 255 characters. Is there a simple way to make that longer? I have some images I am trying to use that field for and with the HTML (<img src=" and so on>), it exceeds 255 characters cutting off the closing </div> which, obviously, really screws up the page layout.

Marshall
CENLYT Productions - ms designs
Affordable Web Design
Custom Ecommerce Designs
Responsive Websites
Cenlyt.com

dbdave
ECT Moderator

USA
10468 Posts

Posted - 06/19/2018 :  22:50:42  
It's quite easy to exceed that with javascript.

In the custom field enter this
<div id="someuniqueID"></div>

Then, in the product description
<script>
document.getElementById("someuniqueID").innerHTML = 'whatever you want to say that is longer than the limit';
</script>


If it's used over and over in lots of products, then put it in your proddetail.asp page like this
<script>
if (document.getElementById("someuniqueID") !== null) {
document.getElementById("someuniqueID").innerHTML = 'whatever you want to say that is longer than the limit';
}
</script>



If you have a good bit of text or html to enter, and you don't want to write it out in javascript, then just write it out in html in a div and hide it like this
<div id="yourcontent" style="display:none;"><a class="some class" href="somelink.htm" title="sometitle"><img src="/images/someimage.jpg"/></a></div>
<script>
if (document.getElementById("someuniqueID") !== null) {
document.getElementById("someuniqueID").innerHTML = document.getElementById("yourcontent").innerHTML;
}
</script>


Edited by - dbdave on 06/19/2018 22:55:10
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000