Re: html:image doesn't submit the page in netscape???
check out the source in the browser. Would you please send it to here... F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 1:22 PM Subject: html:image doesn't submit the page in netscape??? I'm using html:image to submit a page. It works fine in IE, but not in Netscape 4.7. Did anybody face this issue before? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:image doesn't submit the page in netscape???
Title: RE: html:image doesn't submit the page in netscape??? Firat The source is attached. Sriram -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED]] Sent: Friday, July 11, 2003 4:23 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? check out the source in the browser. Would you please send it to here... F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 1:22 PM Subject: html:image doesn't submit the page in netscape??? I'm using html:image to submit a page. It works fine in IE, but not in Netscape 4.7. Did anybody face this issue before? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] html lang=en head title:: Users ::/title base href=http://localhost:8080/mm/jsp/userview.jsp; SCRIPT LANGUAGE=JavaScript src=../js/validations.js /SCRIPT SCRIPT LANGUAGE=javascript //function to make a field read-only function disableField(field) { if(isIE) field.disabled=true; else field.blur(); } //function to validate zip function checkZip(val) { var str=0123456789 var found=false; var ch; for (i=0;i=val.length;i++) { ch=val.charAt(i); if(str.indexOf(ch)0) {found=true; break; } } if (found==true) return false; else return true; } // function to validate userViewForm function validateUserViewForm(form) { if (form.userName.value==) { alert('liInvalid format or value for Username/li'); form.userName.focus(); return false; } if (form.domainId.disabled==false){ if (form.domainId[form.domainId.selectedIndex].value==notInt) { alert('liInvalid format or value for Domain ID/li'); form.domainId.focus(); return false; } } if (form.userRole[form.userRole.selectedIndex].value==notInt) { alert('liInvalid format or value for User role/li'); form.userRole.focus(); return false; } if (form.firstName.value==) { alert('liInvalid format or value for First name/li'); form.firstName.focus(); return false; } if (form.lastName.value==) { alert('liInvalid format or value for Last name/li'); form.lastName.focus(); return false; } if (form.mobileNo.value==) { alert('liInvalid format or value for Mobile number/li'); form.mobileNo.focus(); return false; } if (form.address1.value==) { alert('liInvalid format or value for Address 1/li'); form.address1.focus(); return false; } if (form.city.value==) { alert('liInvalid format or value for City/li'); form.city.focus(); return false; } if (checkZip(form.zip.value)==false) { alert('liInvalid format or value for Zip/li'); form.zip.value=; form.zip.focus(); return false; } if (form.countryId[form.countryId.selectedIndex].value==notInt) { alert('liInvalid format or value for Country/li'); form.countryId.focus(); return false; } if (isNaN(form.smsRcvLimit.value)==true) { alert('liInvalid format or value for SMS Receive Limit/li'); form.smsRcvLimit.value=; form.smsRcvLimit.focus(); return false; } if (form.smsRcvLimit.value!=) { if (parseInt(form.smsRcvLimit.value)0) { alert('liInvalid format or value for SMS Receive Limit/li'); form.smsRcvLimit.value=; form.smsRcvLimit.focus(); return false; } } if (isNaN(form.smsSendLimit.value)==true) { alert('liInvalid format or value for SMS Send Limit/li'); form.smsSendLimit.value=; form.smsSendLimit.focus(); return false; } if (form.smsSendLimit.value!=) { if (parseInt(form.smsSendLimit.value)0) { alert('liInvalid format or value for SMS Send Limit/li'); form.smsSendLimit.value=; form.smsSendLimit.focus(); return false; } } if (isNaN(form.emailRcvLimit.value)==true) { alert
Re: html:image doesn't submit the page in netscape???
Providing validations.js would also be useful.. On Friday, July 11, 2003, at 11:49 AM, sriram wrote: Firat The source is attached. Sriram -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 4:23 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? check out the source in the browser. Would you please send it to here... F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 1:22 PM Subject: html:image doesn't submit the page in netscape??? I'm using html:image to submit a page. It works fine in IE, but not in Netscape 4.7. Did anybody face this issue before? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] source.txt--- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:image doesn't submit the page in netscape???
RE: html:image doesn't submit the page in netscape???It seems that you don't have the function preSubmit , instead you have a function named selpreSubmit. try writing javascript: in the addressbar in netscape, you will see the error console tells you what's wrong with the script you wrote. F. - Original Message - From: sriram To: 'Struts Users Mailing List' Sent: Friday, July 11, 2003 1:49 PM Subject: RE: html:image doesn't submit the page in netscape??? Firat The source is attached. Sriram -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 4:23 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? check out the source in the browser. Would you please send it to here... F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 1:22 PM Subject: html:image doesn't submit the page in netscape??? I'm using html:image to submit a page. It works fine in IE, but not in Netscape 4.7. Did anybody face this issue before? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:image doesn't submit the page in netscape???
Title: RE: html:image doesn't submit the page in netscape??? Validations.js (in .txt format) is attached.. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED]] Sent: Friday, July 11, 2003 4:37 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? Providing validations.js would also be useful.. On Friday, July 11, 2003, at 11:49 AM, sriram wrote: Firat The source is attached. Sriram -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED]] Sent: Friday, July 11, 2003 4:23 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? check out the source in the browser. Would you please send it to here... F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 1:22 PM Subject: html:image doesn't submit the page in netscape??? I'm using html:image to submit a page. It works fine in IE, but not in Netscape 4.7. Did anybody face this issue before? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] source.txt-- - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] //Function to chk if browser is IE function isIE() { // convert all characters to lowercase to simplify testing var agt=navigator.userAgent.toLowerCase(); var is_ie = ((agt.indexOf(msie) != -1) (agt.indexOf(opera) == -1)); if (is_ie) { return true; } else return false; } //Function to validate email address function isValidEmailAddress(emailAddress) { if (emailAddress.indexOf(@) == -1) { return false; } if (emailAddress.indexOf(@) == 0) { return false; } if (emailAddress.indexOf(.) == -1) { return false; } if (emailAddress.indexOf(.) emailAddress.length - 4) { return false; } if (emailAddress.indexOf(@) emailAddress.lastIndexOf(.)) { return false; } invalidChars = !#$%^{}amp;*()[]:;',?|~`\\/; for (i=0; iinvalidChars.length; i++) { if (emailAddress.indexOf(invalidChars.charAt(i)) != -1) { return false; } else { return true } } if (emailAddress.indexOf() = 0) { if (emailAddress.indexOf() == -1) { return false; } if (emailAddress.indexOf() != emailAddress.length - 1) { return false; } if (emailAddress.indexOf(\) != 0) { return false; } if (emailAddress.lastIndexOf(\) == 0) { return false; } if (emailAddress.indexOf() emailAddress.lastIndexOf(\)) { return false; } } else { if (emailAddress.indexOf() = 0) { return false; } } return true } //Function to validate alphabets function checkZip(val) { var str=0123456789 var found=false; var ch; for (i=0;i=val.length;i++) { ch=val.charAt(i); if(str.indexOf(ch)0) {found=true; break; } } if (found==true) return false; else return true; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:image doesn't submit the page in netscape???
preSubmit() code is given below: function preSubmit(form, action_value) { alert(form); alert(action_value); document.forms[0].lrAction.value=action_value; selPreSubmit(); //form.submit(); } // end of preSubmit -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 5:03 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? RE: html:image doesn't submit the page in netscape???It seems that you don't have the function preSubmit , instead you have a function named selpreSubmit. try writing javascript: in the addressbar in netscape, you will see the error console tells you what's wrong with the script you wrote. F. - Original Message - From: sriram To: 'Struts Users Mailing List' Sent: Friday, July 11, 2003 1:49 PM Subject: RE: html:image doesn't submit the page in netscape??? Firat The source is attached. Sriram -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 4:23 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? check out the source in the browser. Would you please send it to here... F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 1:22 PM Subject: html:image doesn't submit the page in netscape??? I'm using html:image to submit a page. It works fine in IE, but not in Netscape 4.7. Did anybody face this issue before? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:image doesn't submit the page in netscape???
Use eval() function while constructing a form element by the function parameter given. may be netscape takes them as strings not objects. F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 2:27 PM Subject: RE: html:image doesn't submit the page in netscape??? preSubmit() code is given below: function preSubmit(form, action_value) { alert(form); alert(action_value); document.forms[0].lrAction.value=action_value; selPreSubmit(); //form.submit(); } // end of preSubmit -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 5:03 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? RE: html:image doesn't submit the page in netscape???It seems that you don't have the function preSubmit , instead you have a function named selpreSubmit. try writing javascript: in the addressbar in netscape, you will see the error console tells you what's wrong with the script you wrote. F. - Original Message - From: sriram To: 'Struts Users Mailing List' Sent: Friday, July 11, 2003 1:49 PM Subject: RE: html:image doesn't submit the page in netscape??? Firat The source is attached. Sriram -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 4:23 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? check out the source in the browser. Would you please send it to here... F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 1:22 PM Subject: html:image doesn't submit the page in netscape??? I'm using html:image to submit a page. It works fine in IE, but not in Netscape 4.7. Did anybody face this issue before? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:image doesn't submit the page in netscape???
My apologies for not responding sooner... And I wont have time to look at this in detail.. But image submit buttons behave differently on NS4 to other browsers.. My quickest suggestion is to use a link to call your onclick function.. It was a while ago when i encountered this and the details escape me. But I seem to recall using a link was one way of solving this sort of thing.. I've never found a case where eval is required, but if anyone knows of a case where it is actually required I'd be interested to know. To my mind the way your drilling through your forms looks fine and dandy.. Cheers Mark On Friday, July 11, 2003, at 01:11 PM, Firat TIRYAKI wrote: Use eval() function while constructing a form element by the function parameter given. may be netscape takes them as strings not objects. F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 2:27 PM Subject: RE: html:image doesn't submit the page in netscape??? preSubmit() code is given below: function preSubmit(form, action_value) { alert(form); alert(action_value); document.forms[0].lrAction.value=action_value; selPreSubmit(); //form.submit(); } // end of preSubmit -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 5:03 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? RE: html:image doesn't submit the page in netscape???It seems that you don't have the function preSubmit , instead you have a function named selpreSubmit. try writing javascript: in the addressbar in netscape, you will see the error console tells you what's wrong with the script you wrote. F. - Original Message - From: sriram To: 'Struts Users Mailing List' Sent: Friday, July 11, 2003 1:49 PM Subject: RE: html:image doesn't submit the page in netscape??? Firat The source is attached. Sriram -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 4:23 PM To: Struts Users Mailing List Subject: Re: html:image doesn't submit the page in netscape??? check out the source in the browser. Would you please send it to here... F. - Original Message - From: sriram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, July 11, 2003 1:22 PM Subject: html:image doesn't submit the page in netscape??? I'm using html:image to submit a page. It works fine in IE, but not in Netscape 4.7. Did anybody face this issue before? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]