| View previous topic :: View next topic |
| Author |
Message |
Guest
Joined: 30 Jan 2007 Posts: 18
|
Posted: Jan 31, 2007 2:37 pm Post subject: Using the 'x_max_files' and 'x_max_size' more times on page |
|
|
Hi again,
Still having a lot of fun with XUpload
I'm now trying to intergrate the "Upload_form" part in my main index.html page (it's allready working nice), howeven I would like to show the 'x_max_files' and 'x_max_size' at an other place on the index as well.
Now when I copy the code:
| Code: | | "<font id='x_max_files'>1</font> files<font id='x_max_size'></font> maximum" |
and put it at the other place, it does work, but it stopped working on the original place (it's only showing 1 files maximum).
Is there an easy fix for this? |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Feb 01, 2007 6:45 am Post subject: |
|
|
| You can't have more than 1 XUpload form on one page right now. |
|
| Back to top |
|
 |
Guest
Joined: 30 Jan 2007 Posts: 18
|
Posted: Feb 01, 2007 12:53 pm Post subject: |
|
|
That's to bad, but not really a big problem.
All I need to do is hard code the 'x_max_files' and 'x_max_size' values on the page.. |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Feb 01, 2007 1:37 pm Post subject: |
|
|
I don't think this would help. Cause both forms will use same iframe for upload so second will interrupt first if start sumultaneously.
I think this hack will work for showing max in both forms:
replace in xupload.js:
| Code: |
document.getElementById('x_max_files').innerHTML = max_files;
document.getElementById('x_max_size').innerHTML = " ("+max_size+" Mb total)";
|
with
| Code: |
var arr1 = document.getElementById('x_max_files');
arr1[0].innerHTML = max_files;
arr1[1].innerHTML = max_files;
var arr2 = document.getElementById('x_max_size');
arr2[0].innerHTML = " ("+max_size+" Mb total)";
arr2[1].innerHTML = " ("+max_size+" Mb total)";
|
|
|
| Back to top |
|
 |
Guest
Joined: 30 Jan 2007 Posts: 18
|
Posted: Feb 01, 2007 1:58 pm Post subject: |
|
|
Thank you PilgrimX182,
The "hack" does not work. It's giving an Error: '0' is null or not an object
I'll see what you are trying to do, and I'll do some 'custom' hacking on the xupload.js later today to see if I can get it to work. |
|
| Back to top |
|
 |
|