Hi,
I seem to be having a problem with the onSubmit event. I am doing some pui.set instructions in the onsubmit because i want these values changed before they are sent back to the server, however it doesn't seem to be submitting back with the correct information back to the server. When i run my program in debug client-side i see the values changed correctly, however when i run it in debug server-side i still have the old values in my RPG is this normal behaviour of the onsubmit or am i doing something wrong?
If it is normal where could i setup the code to change valeus before returning to the server?
Thanks
OnSubmit not sending data back.
-
- Profound User
- Posts: 49
- Joined: Wed Jan 08, 2014 11:49 am
- First Name: Michael
- Last Name: Pilote
- Company Name: Oceanex
- Phone: (514) 875-8558
- State / Province: Quebec
- Country: Canada
- Contact:
-
- Profound User
- Posts: 37
- Joined: Thu Oct 15, 2009 4:34 pm
- First Name: Dennis
- Last Name: Willett
- Company Name: Toledo CLinic
- Contact:
Re: OnSubmit not sending data back.
Not completely sure what you're doing. Rather than use onSubmit you could use onClick. Have the javascript change your data, then use the pui.click() to submit back to the program.
-
- Profound User
- Posts: 49
- Joined: Wed Jan 08, 2014 11:49 am
- First Name: Michael
- Last Name: Pilote
- Company Name: Oceanex
- Phone: (514) 875-8558
- State / Province: Quebec
- Country: Canada
- Contact:
Re: OnSubmit not sending data back.
Problem is there are many things that will submit back to the server and i need it to be set no matter how i return to the server.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: OnSubmit not sending data back.
Please make sure that the things you are setting are input-capable fields (like text boxes.)
-
- Profound User
- Posts: 49
- Joined: Wed Jan 08, 2014 11:49 am
- First Name: Michael
- Last Name: Pilote
- Company Name: Oceanex
- Phone: (514) 875-8558
- State / Province: Quebec
- Country: Canada
- Contact:
Re: OnSubmit not sending data back.
Yup, they are all hidden textboxes.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: OnSubmit not sending data back.
I see why this is not working. The response to send back to the server is built before the 'onsubmit' event is fired... so it's too late at that point to set any field values. Sorry, it looks like you'll need to do something like dennisw suggested and set the value at some point earlier in the process. (Maybe set the field when the values it's calculated from are changed?)
-
- Profound User
- Posts: 49
- Joined: Wed Jan 08, 2014 11:49 am
- First Name: Michael
- Last Name: Pilote
- Company Name: Oceanex
- Phone: (514) 875-8558
- State / Province: Quebec
- Country: Canada
- Contact:
Re: OnSubmit not sending data back.
Yea, i just managed to do it and it works but shouldn't the onSubmit logically allow me to do this?
Who is online
Users browsing this forum: No registered users and 3 guests