Hmm, I'm not sure. It seems like everything is working the way it's supposed to now, as far as my script, except that it's not.... I'm still looking. We'll figure it out, this is all part of testing.
Hmm, I'm not sure. It seems like everything is working the way it's supposed to now, as far as my script, except that it's not.... I'm still looking. We'll figure it out, this is all part of testing.
Change your form to method="POST" instead of method="post" and add enctype="multipart/form-data"
still nothing, but at least I'm not getting the file upload error anymore.
Done that and Tested it. No joy so far but I like your enthusiasm :)Code:Change your form to method="POST" instead of method="post" and add enctype="multipart/form-data"
Just until we figure out what's causing the problem, let's change the ValidateForm() to stop form submission so we can see all the HTML changes that occur.
At the very bottom of ValidateForm(), you'll see a line that says "return true;". Let's change that to "return false;" temporarily. I'm talking about in the valid.js file.
Use this file: DISREGARD, SEE BELOW
oooohhhhh....:eek:
I was wondering what you mean earlier when you said!!!!Quote:
By the way I removed the JavaScript code from the head and the one after the form which you suggested earlier.
The new function is calling those functions, but I guess you thought we were replacing them. That's not the case. We need to add them back in! :p
I stepped through the JS using Firebug, cause I guess you're headed home, and I discovered that it was calling a function that wasn't there.
So, disregard our last version, and use this one. (I just went ahead and added them to the valid.js)
I'm home now and transferred over the new js file you sent over. I noticed on that file the "return is true" on the last line. Do you want me to change it to "return false"?
No, that fixed the problem, but fixing that shows there's one last (hopefully) problem to deal with. Since we're not adding them manually, there are no pre-existing inputs to look at, so we need to adjust the PPopSort array to handle that.
Hopefully, one last upload:
Just Googled PPopSort array and guess what came up? Our thread in webdeveloper.com came up lol.
Ok I'm watching part 2 of 4 of the videos...difficult when you have kids running around.
Well keep trying my friend, I'm sure we'll get there. I just added firebug and will play with it and learn a bit more. Again thanks to you.
check my post again, I just edited and add the new file (where I said "Hopefully, one last upload"). It was actually the same problem we had the first time around, and I added the ternary operator... I used the original script :P
I uploaded the valid.js script from the (hopefully) post. I checked it and now that "Add object or person" keeps showing up. What can I do to get rid of this?
Hi James
I emailed a few other developers and one of them got back to me and suggested the following:
Code:You might try something like this in HTML:
<input id=”on0” type="hidden" name="on0" value="Photo manipulation">
<input id=”os0” type="hidden" name="os0" value="Whatever addons the customer selects">
With this corresponding javascript:
var on0 = document.getElementById('on0');
on0.setAttribute("on0", "My Desired value”);
Can this help?
Rafi
No, that's essentially what I was doing with the script. The script is fine now and is working. The problem is it's not getting run because of some other error on the page.
When I finish filling out the form, and I run ValidateForm() using the FireBug watch script, it adds the options perfectly.
I actually found out something interesting by looking at it. Remember I kept asking you about the HTML page? Look at the code below:
Before the HTML page had these lines:
Code:<INPUT type="hidden" name="item_name" value="Add object or person">
<INPUT type="hidden" name="amount" id="amount" value="9.99">
I changed the name from the first line & got rid of the value of the 2nd line:
Now when I run the form and go to the PayPal page, the good news is: It shows:Code:
<INPUT type="hidden" name="item_name" value="Retouching Photos">
<INPUT type="hidden" name="amount" id="amount" value="">
Retouching Photos then it shows the first Add-on I select.
So you (the man!) have solved the original problem (where nothing used to show up in the PayPal page) but now faced with a new problem which is:
No matter how many Add-ons I select, the JavaScript only shows the first Add-on on the PayPal page.
If firebug is showing that the script runs perfectly, then what is causing it not to run on the form page and then the PayPal page?
I guess you knew all this before and I just figured it out. I'm slow... like a tortoise heh heh.
Over 400 smart people read this thread!
James we should open a *witter account for this problem. Atleast we'd have a large number of followers lol.
Anyone out there know what the problem is on this Form or the JavaScript?
I am offering to retouch your photo for free.
Yeah, it's only adding one add-on. I just realized that the checkboxes at the bottom may be causing the problem. When writing this, I wasn't even thinking of them. I'm working on it. I should be able to get this working fully using firebug before I get back to you