From: Scott Sauyet on
Mechphisto wrote:
> Scott Sauyet wrote:
>> Mechphisto wrote:

>>> http://www.girlscoutsmoheartland.org/photos/upload/imageupload.php
>
>> I noticed that you include jQuery twice, once a packed version of
>> 1.0.4 from your server, and a minified version of 1.3.2 from Google's
>> CDN.  It might help to get rid of one.
>
> Thanks for the reply. Are you referring to the line:
> <script type="text/javascript" src="../../includes/jquery.js"></
> script> ?
> If so, that actually points to a check that alerts the user if they
> don't have javascript enabled, they need to or the page won't work.

It doesn't look like such. It looks like an old packed version of
JQuery.

Moreover, how would you alert the user that JS is not enabled by using
JS?!

> But, just to see if that is causing an issue, I tried again without
> that line, and same thing.

I'd have to know more of the expected behavior to have any sense of
what's wrong.

Have you tested in a debugger? Firebug is pretty helpful.

-- Scott
From: Thomas 'PointedEars' Lahn on
Garrett Smith wrote:

> Garrett Smith wrote:
>> Mechphisto wrote:
>>> Thomas 'PointedEars' Lahn wrote:
>>>> Mechphisto wrote:
>>>>> [snip ca. 92+ lines of full quote]
>>>>>
>>>>> Well, that's embarrassing. [...]
>>>> Embarrassing for you and annoying for your readers is the way that
>>>> you post.
>> [...]
> Ah, that was ambiguous. I meant to say that he (TL) pointed out that you
> replied by fullquoting. He also made a snide remark...

What you call a snide remark, I call a correction accompanied with a
descriptive distinct warning. Not that either way the message got through.
But, unfortunately, that is not surprising with a Googlodyte.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
From: Mechphisto on
On Jul 14, 10:05 pm, Scott Sauyet <scott.sau...(a)gmail.com> wrote:
> Mechphisto wrote:
> > Scott Sauyet wrote:
> >> Mechphisto wrote:
> >>>http://www.girlscoutsmoheartland.org/photos/upload/imageupload.php
>
> >> I noticed that you include jQuery twice, once a packed version of
> >> 1.0.4 from your server, and a minified version of 1.3.2 from Google's
> >> CDN.  It might help to get rid of one.
>
> > Thanks for the reply. Are you referring to the line:
> > <script type="text/javascript" src="../../includes/jquery.js"></
> > script> ?
> > If so, that actually points to a check that alerts the user if they
> > don't have javascript enabled, they need to or the page won't work.
>
> It doesn't look like such.  It looks like an old packed version of
> JQuery.
>
> Moreover, how would you alert the user that JS is not enabled by using
> JS?!

Hmm, honestly, I have no idea how it works. As I understand, if that
script loads and it detects that the browser isn't allowing javascript
to run, then it allows the div ID: <div id="noScript"> to be visible.
Display:none if javascript works. Within that div I have a message
that informs the user the page won't work without javascript enabled.

> > But, just to see if that is causing an issue, I tried again without
> > that line, and same thing.
>
> I'd have to know more of the expected behavior to have any sense of
> what's wrong.

Of course. (I was hoping the problem would be obvious to someone more
skilled than I and it wouldn't have to go this far.) :)
On that page, down there by the line: "Uploaded files:" I have this:

<p><strong>Uploaded files</strong>:</p>
<p class="text" style="color: #9898FF; font-weight:bold;"></p>
<p class="textC" style="color: #1EEF1E;"></p>
<p class="textE" style="color: #E86868;"></p>
<ol class="files">
</ol>


Now, this bit of javascript:

new AjaxUpload('button3', {
action: 'server-side/upload-handler.php',
//name: 'myfile',
onSubmit : function(file , ext){
// Allow only images. You should add security check on
the server-side.
if (ext && /^(jpg|png|jpeg|gif)$/.test(ext)){
/* Setting data */
this.setData({
'key': 'This string will be send with the file'
});
$('#example3 .text').text('Uploading ' + file + '... Please
wait....');
$('#example3 .textC').text('');
$('#example3 .textE').text('');
} else {
// extension is not allowed
$('#example3 .textE').text('Error: only images are allowed');
// cancel upload
return false;
}
},
onComplete : function(file){
$('<li></li>').appendTo($('#example3 .files')).text(file);
$('#example3 .text').text('');
$('#example3 .textC').text(file + ' Uploaded!');
}
});

will populate those <p> lines with different messages based on what is
detected with the file browse. If someone tries to select a non-image
file, a message "Error: only images are allowed" appears. Otherwise an
"Uploading Please wait" message appears. And then when the file is
uploaded, the name of the file appears...along with any subsequent
files into a list.

The files are uploading fine without refreshing the page. In fact,
it's even refusing the non-image files as well. So I know this script
is working at the basic level. It's simply not changing the HTML to
display those status message any more.
Very frustrating to have something work then not work and no idea
why. :(

>
> Have you tested in a debugger?  Firebug is pretty helpful.

Well, I used the error console. The only errors it's giving me are
errors like:
Warning: Error in parsing value for 'filter'. Declaration dropped.
Source File: http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/ui-darkness/jquery-ui.css
Line: 18

I've tried removing the http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/ui-darkness/jquery-ui.css
line from the code, but that got rid of the errors yet the problem
remained.
I don't know what firebug tool would help with diagnosing this...any
ideas?

Thanks for replying! I really appreciate it.
Liam
From: Mechphisto on
On Jul 15, 9:20 am, Mechphisto <mechphi...(a)gmail.com> wrote:
> On Jul 14, 10:05 pm, Scott Sauyet <scott.sau...(a)gmail.com> wrote:
>
> > I'd have to know more of the expected behavior to have any sense of
> > what's wrong.
>
> Of course. (I was hoping the problem would be obvious to someone more
> skilled than I and it wouldn't have to go this far.) :)
> On that page, down there by the line: "Uploaded files:" I have this:
>
>       <p><strong>Uploaded files</strong>:</p>
>       <p class="text" style="color: #9898FF; font-weight:bold;"></p>
>       <p class="textC" style="color: #1EEF1E;"></p>
>       <p class="textE" style="color: #E86868;"></p>
>                 <ol class="files">
>             </ol>
>
> Now, this bit of javascript:
>
>                 new AjaxUpload('button3', {
>                         action: 'server-side/upload-handler.php',
>                         //name: 'myfile',
>                         onSubmit : function(file , ext){
>                 // Allow only images. You should add security check on
> the server-side.
>                                 if (ext && /^(jpg|png|jpeg|gif)$/.test(ext)){
>                                         /* Setting data */
>                                         this.setData({
>                                                 'key': 'This string will be send with the file'
>                                         });
>                                         $('#example3 .text').text('Uploading ' + file + '... Please
> wait....');
>                                         $('#example3 .textC').text('');
>                                         $('#example3 .textE').text('');
>                                 } else {
>                                         // extension is not allowed
>                                         $('#example3 .textE').text('Error: only images are allowed');
>                                         // cancel upload
>                                         return false;
>                                 }
>                         },
>                         onComplete : function(file){
>                                 $('<li></li>').appendTo($('#example3 .files')).text(file);
>                                         $('#example3 .text').text('');
>                                 $('#example3 .textC').text(file + ' Uploaded!');
>                         }
>                 });
>
> will populate those <p> lines with different messages based on what is
> detected with the file browse. If someone tries to select a non-image
> file, a message "Error: only images are allowed" appears. Otherwise an
> "Uploading Please wait" message appears. And then when the file is
> uploaded, the name of the file appears...along with any subsequent
> files into a list.
>
> The files are uploading fine without refreshing the page. In fact,
> it's even refusing the non-image files as well. So I know this script
> is working at the basic level. It's simply not changing the HTML to
> display those status message any more.
> Very frustrating to have something work then not work and no idea
> why. :(

Holy...
OK, playing around, just trying different things, I took out the
#example. from all the javascript lines. They didn't seem to make
sense being there as they weren't matching the <p> tags that way. And,
now it works again!
Very perplexing! When I put this page together weeks ago and it
worked, that would mean I would have had to have done the same thing
then. It makes no sense as to how it could have possibly reverted
back. Especially since that page had a LOT of changes made to it AFTER
that core functionality was completed weeks ago, and all THOSE changes
are still intact. So it's not a matter of somehow an older copy of the
page getting reuploaded... that script section itself would have had
to have been intentionally restored to an earlier version with the
rest of the page untouched.
It makes no sense to me at all.

Thanks for replying and trying; sorry to have wasted your time.
Liam
From: Mechphisto on
On Jul 15, 9:04 am, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
wrote:
> Garrett Smith wrote:
> > Garrett Smith wrote:
> >> Mechphisto wrote:
> >>> Thomas 'PointedEars' Lahn wrote:
> >>>> Mechphisto wrote:
> >>>>> [snip ca. 92+ lines of full quote]
>
> >>>>> Well, that's embarrassing. [...]
> >>>> Embarrassing for you and annoying for your readers is the way that
> >>>> you post.
> >> [...]
> > Ah, that was ambiguous. I meant to say that he (TL) pointed out that you
> > replied by fullquoting. He also made a snide remark...
>
> What you call a snide remark, I call a correction accompanied with a
> descriptive distinct warning.  Not that either way the message got through.
> But, unfortunately, that is not surprising with a Googlodyte.

What amuses me is how much wasted space, time, and electrons have been
spent on this sub-thread just so you can prove your elitist status as
online communications intelligentsia. Biggest protocol cop on the
block since FIDO, eh? I really am amused how this thread branch is
longer than the one that's actually on-topic. Man, I bet if I top-
replied, I could get you to waste half your day making snide, smug
remarks.
Drat! Now you have me wasting MY time pointing out YOUR wasted time.
It's a recursive time-sink.
Enjoy your ivory tower. :)
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: Slide and edit within grid
Next: Bug in Safari 5