Pure ASP Upload 2 Support Product Page

This topic is locked
This topic was archived

Error applying behavior! Problem Solved!

Reported 19 Sep 2001 20:49:59
1
has this problem
19 Sep 2001 20:49:59 Jeff Whitfield posted:
For those who have the following error popup upon applying the ASP Upload 2.0 behavior:

"While executing applyServerBehavior in Pure ASP Upload.htm, a JavaScript error occurred."

After doing some further investigation, I have found that the problem is due to an attribute in the FORM tag. Basically, if you have an ENCTYPE already designated in your form then the above error will happen just about everytime. I have found this to be a problem with Windows 2000; the error doesn't appear to happen for 9x and XP users. Chances are this is a bug that has to do with Windows 2000 and Internet Explorer itself since Dreamweaver does use a bit of the architecture of the OS itself for some of it's Javascript routines (at least I think it does!) What's funny is that this seems to only happen if you have a combination of server behaviors installed. In my case, the behaviors in question were a combination of the Pure ASP Upload 2.0 behavior and the latest version of the BUD Recordset Navigation Suite. Weird! Anyways. . .

To keep the error from happening, simply select your FORM tag, hit the Attributes tab in the Inspector, and remove the ENCTYPE attribute from the FORM tag. Apply the behavior and the problem should go away. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Oh, and if any of you extension developers out there (Where is Waldo!) can explain this then please do so. Sure would be great to have some additional info on this phenomenon. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Keep up the good work guys!

L8r!

Jeff Whitfield


Edited by - bravado on 09/19/2001 20:52:40

Replies

Replied 20 Sep 2001 10:06:23
20 Sep 2001 10:06:23 Waldo Smeets replied:
Wow Bravado, let's hope that this will also work for the others having this problem.

Folks, please let me know how things work out for you!

ps: I can not explain this... sounds very weird <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 25 Sep 2001 17:38:41
25 Sep 2001 17:38:41 Alex Evans replied:
I get the same problem and i removed the enctype code but the error still appears...i am using UD4.01 on an ASP page (called "upload.asp". My OS is Win98.

Please someone help me get this upload extension working...???

Cheers,

Alex Evans -

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
For those who have the following error popup upon applying the ASP Upload 2.0 behavior:

"While executing applyServerBehavior in Pure ASP Upload.htm, a JavaScript error occurred."

After doing some further investigation, I have found that the problem is due to an attribute in the FORM tag. Basically, if you have an ENCTYPE already designated in your form then the above error will happen just about everytime. I have found this to be a problem with Windows 2000; the error doesn't appear to happen for 9x and XP users. Chances are this is a bug that has to do with Windows 2000 and Internet Explorer itself since Dreamweaver does use a bit of the architecture of the OS itself for some of it's Javascript routines (at least I think it does!) What's funny is that this seems to only happen if you have a combination of server behaviors installed. In my case, the behaviors in question were a combination of the Pure ASP Upload 2.0 behavior and the latest version of the BUD Recordset Navigation Suite. Weird! Anyways. . .

To keep the error from happening, simply select your FORM tag, hit the Attributes tab in the Inspector, and remove the ENCTYPE attribute from the FORM tag. Apply the behavior and the problem should go away. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Oh, and if any of you extension developers out there (Where is Waldo!) can explain this then please do so. Sure would be great to have some additional info on this phenomenon. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Keep up the good work guys!

L8r!

Jeff Whitfield


Edited by - bravado on 09/19/2001 20:52:40
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 26 Sep 2001 10:21:51
26 Sep 2001 10:21:51 Jeff Whitfield replied:
Hmm. . . appears that it doesn't work for everyone. . . bummer! Back to the ole' drawing board! LOL! Looks like I spoke too soon!

Jeff Whitfield

Replied 06 Oct 2001 18:53:35
06 Oct 2001 18:53:35 Jack Neary replied:
Same Problem. "...a JavaScript error occurred."

Configuraiton: Win 2K Pro SP2. Ultradev4.01, BD-Nav Suite 2.

I'll try and uninstall BD and see what happens...

-Jack

Replied 06 Oct 2001 22:24:19
06 Oct 2001 22:24:19 Jeff Whitfield replied:
Hmm. . . well. . . after further investigation, I have found more problems. Umm, well, let's just say that there appears to be nothing in the Pure ASP Upload 2.0 suite that is causing any real problems. Seems the culprit lies in the BUD Recordset Navigation Suite 3. One of the other strange problems I've been having is a error that pops up whenever I use the Insert Fireworks HTML command. . . .I get one of those nasty messages telling me that the Swap Image behaviors were not copied properly. . . sigh! Guess we'll have to pass this info on to Tom!

L8R!

Jeff Whitfield

Replied 20 Oct 2001 19:10:40
20 Oct 2001 19:10:40 boyd ringrose replied:
I too have had the javascript error .I have windows 98 and ud v 4.01 with the T Muck recordset nav suite installed.The fix of removing the form enctype does sort of work ..but when i go to save the page i get a weird message along the lines of ...

While executing onLoad a javascript error occured ...
line 65 "PureUpload_beforeSave.htm" object is not currently contained in a document ...

However the upload works ok when it is on the server .
also if you revisit the behavior to change parameters, you must always delete the enctype form info or you get the main "javascript error" again .

All very strange.However at least the thing does work .
Replied 31 Oct 2001 08:15:23
31 Oct 2001 08:15:23 Stephen Cox replied:
This error does happen on XP. I haven't figured out why. And frankly I don't have the time to start swapping different extensions around. I hate to ask this - Is there a refund available? I may have to buy ASPUpload instead.

Stephen Cox
web.net geek for nonprofits and political campaigns.
Replied 31 Oct 2001 08:19:53
31 Oct 2001 08:19:53 Stephen Cox replied:
Also, after removing the extension from the page the javascrit error still occured. I had to edit the the ASP and the JS. I'm a little surprised that removing the extension did not at least remove the ASP.

Stephen Cox
web.net geek for nonprofits and political campaigns.
Replied 19 Nov 2001 14:53:39
19 Nov 2001 14:53:39 Charles Harris replied:
I'm in Win2k, UD4.01. I deleted all extensions - no joy. Reinstalled UD4.01 with no extensions - no joy. Removed enctype tag - no joy. ASP Upload 2.0 still not working <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

Replied 24 Nov 2001 09:44:42
24 Nov 2001 09:44:42 Eric Jennings replied:
I am on Win2K, UltraDev 4.01. Same problem on workstation or server. I get the error...

Form was submitted with no ENCTYPE="multipart/form-data"
Please correct and try again

I have removed the ENCTYPE="multipart/form-data" and reapplied the behavior and the error persists. However it still uploads the image and inserts the info into the database. There is a syntax error in the script but that was easily removed. You can find that here...
_____________________________________________________________
document.PU_uploadForm = form;
re = new RegExp(".(gif|jpg|png|bmp|jpeg)$","i";
if(re.test(field.value) && (sizeLimit != '' || minWidth != '' || minHeight != '' || maxWidth != '' || maxHeight != '' || saveWidth != '' || saveHeight != '')) {
checkImageDimensions(field,sizeLimit,minWidth,minHeight,maxWidth,maxHeight,saveWidth,saveHeight);
} } }
}
&gt; REMOVE THIS DELIMITER that is causing the syntax error

function showImageDimensions(fieldImg) { //v2.0
var isNS6 = (!document.all && document.getElementById ? true : false);
var img = (fieldImg && !isNS6 ? fieldImg : this);

___________________________________________________________________
Replied 06 Dec 2001 06:12:14
06 Dec 2001 06:12:14 Barbara ONeal replied:
Well did any one find a fix for the Java Script problem. I just purchased it on a recommendation from Massimo. I really need to get this to work. Platform Windows 2000 Ultra Dev 4.1

Ms. Barbara S. ONeal
Replied 06 Dec 2001 08:15:16
06 Dec 2001 08:15:16 massimo massimo replied:
quote:
--------------------------------------------------------------------------------

Explorer itself since Dreamweaver does use a bit of the architecture of the OS itself for some of it's Javascript routines (at least I think it does!)

--------------------------------------------------------------------------------

Just a quick note, this is not true. DW/UD has its own JavaScript 1.2 interpreter build inside it

Massimo Foti

Edited by - tmt on 06 Dec 2001 08:15:47
Replied 06 Dec 2001 10:23:43
06 Dec 2001 10:23:43 George Petrov replied:
I've been researching the problem a long time now. I think I finaly solve it!
It was indeed some very weird Dreamwever Javascript problem - that happens only in very special situations.

I'm building the next update now (free for reg. users) where it will be solved.

I do need a few reg. users a s beta testers, so if you want to help - please mail me privately ( )

Thank you all - and sorry it took so long.

Greetings,
George

---------------------------------------
George Petrov - CTO, www.UDzone.com

www.UDzone.com : A Dreamweaver,
Dreamweaver Ultradev and Fireworks site
by developers for developers.
---------------------------------------

Replied 06 Dec 2001 10:29:05
06 Dec 2001 10:29:05 Waldo Smeets replied:
George, I assume that every customer will be informed by email when the update arrives?

Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 06 Dec 2001 10:34:22
06 Dec 2001 10:34:22 George Petrov replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
George, I assume that every customer will be informed by email when the update arrives?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Yes of course - every customer will get a mail notify explaining what is new in the new update and where to download it.

Again it will be a free update.

Greetings,
George

---------------------------------------
George Petrov - CTO, www.UDzone.com

www.UDzone.com : A Dreamweaver,
Dreamweaver Ultradev and Fireworks site
by developers for developers.
---------------------------------------

Replied 12 Nov 2002 07:38:29
12 Nov 2002 07:38:29 Vivian Eersels replied:
I buyed yesterday the extension, but I have also that error:
I have win xp an dreamweaver mx
The hole error:
Whiele executing applyServerBehavior in Pure ASP Upload.htm, the following Javascripts error(s) occured:
At line 1754 of file "C:\Program Files\Macromedia\Dreamweaver MX\Configuration\Shared\Ultradev\Scripts\sbManager.js":
TypeError: paramObj[j]has no properties

When I click ok the window of the SB close

I created a new form with no form enctype, but that doen't help.

You can answer in Dutch if you like, that's easyer for me <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 12 Nov 2002 09:39:35
12 Nov 2002 09:39:35 Martha Graham replied:
Hi Vivian,

I send you an email. Let me know if it works.

Martha Graham
Replied 24 Nov 2002 21:53:14
24 Nov 2002 21:53:14 Tony Eriksson replied:
I have the same problem XP DWMX and exactly the same error message. Can someone please post a solution?

-T-

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi Vivian,

I send you an email. Let me know if it works.

Martha Graham
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 01 Dec 2002 07:56:37
01 Dec 2002 07:56:37 Don Glasgow replied:
This is probably not the answer you're looking for, but:

I had exactly the same problem on an average ASP page-- had an Insert Record behavior and used Templates. Using Dreamweaver MX and Windows XP SP1.

Got the 'A Javascript Error has Occured' error when executing the server behavior for PureASP Upload.

I tried uninstalling, reinstalling, deleting all other extensions, removing the ENTYPE, and always got the same error.

Finally went away after I detached the page from templates. Once I detahced it, the behavior worked fine. I suspect it may have worked fine without all the other things I tried, but I don't know for sure.

Just a thought! I'd love to know if anyone figures out a way to make it work without detaching though. (or maybe it's just a wierd problem on my machine <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

-Don

Replied 12 Mar 2003 22:27:04
12 Mar 2003 22:27:04 mike sutton replied:
Hi,

Just found this after searching through the web..

I to am using XP ie6 and DMX and Templates.

I also get the same javascript error, but not on the first time i set the SB up. However when running in IE6 i got another error.

Mike

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
This is probably not the answer you're looking for, but:

I had exactly the same problem on an average ASP page-- had an Insert Record behavior and used Templates. Using Dreamweaver MX and Windows XP SP1.

Got the 'A Javascript Error has Occured' error when executing the server behavior for PureASP Upload.

I tried uninstalling, reinstalling, deleting all other extensions, removing the ENTYPE, and always got the same error.

Finally went away after I detached the page from templates. Once I detahced it, the behavior worked fine. I suspect it may have worked fine without all the other things I tried, but I don't know for sure.

Just a thought! I'd love to know if anyone figures out a way to make it work without detaching though. (or maybe it's just a wierd problem on my machine <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

-Don


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Regards
Mike
Replied 24 Mar 2003 06:26:25
24 Mar 2003 06:26:25 Maria Angeloni replied:
George and everyone else...

You should also know that other delimiters are also placed BEFORE the following code, and need to be removed (I found many clogging up my code):

<pre id=code><font face=courier size=2 id=code>
function checkFileUpload(form,extensions,requireUpload,sizeLimit,minWidth,minHeight,maxWidth,maxHeight,saveWidth,saveHeight) { //v2.09
</font id=code></pre id=code>

~MVA
Replied 01 Nov 2005 16:30:07
01 Nov 2005 16:30:07 JB Willers replied:
Had the same error with the newer versions of Pure ASP Upload.

Fix is easy albeit a bit annoying.

Just make sure that all the parameters of the &lt;FORM&gt; is specified including NAME, ID, ENCTYPE & METHOD
Remember ENCTYPE will be "multipart/form-data" if your form will only be doing file uploads.

Worked for me.

JB

Reply to this topic