MadCommando
07-04-2003, 10:34 PM
Here's the site http://216.117.199.237/sequential-image-buddy_2-4.html
If your input is
Generate Forum code
B: test
1: 2
2: 10
3: checked
4: 2
itll open the popup and run all the script up until the for command. I tested this by putting some alerts in. My guess is it's a symantics error. Any ideas?
(edit: some of the alerts are still there but don't run)
here's the script that runs, it's a function run on submit, I hope one of you guys can help me out.
function img_gen()
{
output=window.open("","output")
output.focus()
var autoformat0=document.site.format0.value
var autoformat1=document.site.format1.value
var number0=document.site.number0.value
var number1=document.site.number1.value
var digits=document.site.digits.value
var urlpic=document.site.urlpic.value
var filetype=document.site.filetype.value
if (document.site.auto[0].checked) {var autoformat0='<img src="'; var autoformat1='"></img>'}
if (document.site.auto[1].checked) {var autoformat0=''; var autoformat1=''}
for (count1=number0; count1<=number1; count1++)
{
if (document.site.zero.checked)
{
alert("zero's generation")
count1test = count1
var count1len = 0
while (count1test>=1)
{count1test = count1test / 10; count1len = count1len + 1}
output.document.write(count1len)
var addzeros = digits - count1len
for (count2=1; count2 <= addzeros; count2++)
{count1 = "0" + count1;}
alert("digits counted and variable adjusted")
}
output.document.write(autoformat0 + urlpic + count1 + filetype + autoformat1 + "<br>");
}
}
If your input is
Generate Forum code
B: test
1: 2
2: 10
3: checked
4: 2
itll open the popup and run all the script up until the for command. I tested this by putting some alerts in. My guess is it's a symantics error. Any ideas?
(edit: some of the alerts are still there but don't run)
here's the script that runs, it's a function run on submit, I hope one of you guys can help me out.
function img_gen()
{
output=window.open("","output")
output.focus()
var autoformat0=document.site.format0.value
var autoformat1=document.site.format1.value
var number0=document.site.number0.value
var number1=document.site.number1.value
var digits=document.site.digits.value
var urlpic=document.site.urlpic.value
var filetype=document.site.filetype.value
if (document.site.auto[0].checked) {var autoformat0='<img src="'; var autoformat1='"></img>'}
if (document.site.auto[1].checked) {var autoformat0=''; var autoformat1=''}
for (count1=number0; count1<=number1; count1++)
{
if (document.site.zero.checked)
{
alert("zero's generation")
count1test = count1
var count1len = 0
while (count1test>=1)
{count1test = count1test / 10; count1len = count1len + 1}
output.document.write(count1len)
var addzeros = digits - count1len
for (count2=1; count2 <= addzeros; count2++)
{count1 = "0" + count1;}
alert("digits counted and variable adjusted")
}
output.document.write(autoformat0 + urlpic + count1 + filetype + autoformat1 + "<br>");
}
}