The script should be conditional: when the contents of div "1to4" are "124", <div box1, box2, and box4 automatically show. If the contents of "1to4" are "1234", then all 4 divs should be displayed. The contents of "1to4" start as a custom tag called {{LAYOUT}}, which is filled in automatically by my server for each inventory item.
Here is the existing code.
http://www.jarrodprice.myhomeserver.com/webpage.html
The solution I had used the following script:
script language="javascript">
Expand|Select|Wrap|Line Numbers
- function showHide(){
- var pDivArr=document.getElementById('1to4').innerHTML.split("");
- var fDiv="box";
- for(i=0;i<pDivArr.length;i++){
- var divN=fDiv+pDivArr[i];
- if(document.getElementById(divN)){
- document.getElementById(divN).style.display="block";
- }
- }
- }
This worked perfectly, until I tried to post to ebay. Ebay prevents this particular script from working.
I am hoping to find a variation on the same script that ebay will allow.