RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
Using the 'x_max_files' and 'x_max_size' more times on page

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload
View previous topic :: View next topic  
Author Message
Guest



Joined: 30 Jan 2007
Posts: 18

PostPosted: Jan 31, 2007 2:37 pm    Post subject: Using the 'x_max_files' and 'x_max_size' more times on page Reply with quote

Hi again,

Still having a lot of fun with XUpload Smile

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
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2106
Location: UFO Lab

PostPosted: Feb 01, 2007 6:45 am    Post subject: Reply with quote

You can't have more than 1 XUpload form on one page right now.
Back to top
View user's profile Send private message Visit poster's website
Guest



Joined: 30 Jan 2007
Posts: 18

PostPosted: Feb 01, 2007 12:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2106
Location: UFO Lab

PostPosted: Feb 01, 2007 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Guest



Joined: 30 Jan 2007
Posts: 18

PostPosted: Feb 01, 2007 1:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group