I must admit I'm really struggling to make this work. Could you take a look at the web page please John and see if you can figure out what's wrong?
At the bottom of the page you'll see the 'old style' Submit button, which is actually a button. Then on the LHS of the page (3rd button down) you'll see the 'new style' Xara button, which is actually a png graphic. Try as I might, I just can't make them do the same thing. The old style button executes this code:-
Code:
onClick="MM_validateForm('Your Name','','R', 'Your E-mail','','RisEmail', 'Vendor Name','','R', 'Vendor Ref','', 'R', 'Purchase Date','', 'R', 'Installation ID','', 'R', 'Site Code (1)','', 'R', 'Site Code (2)','', 'R', 'Reg Code (1)','', 'R', 'Reg Code (2)','', 'R' );return document.MM_returnValue
whereas the new style button executes this code:-
Code:
href="javascript:my_form_submit(%27form1%27)" onclick="return(xr_nn());
which gets translated to this:-
Code:
<script type="text/javascript">function my_form_submit(form_name)
{MM_validateForm('Your Name','','R', 'Your E-mail','','RisEmail', 'Vendor Name','','R', 'Vendor Ref','', 'R', 'Purchase Date','', 'R', 'Installation ID','', 'R', 'Site Code (1)','', 'R', 'Site Code (2)','', 'R', 'Reg Code (1)','', 'R', 'Reg Code (2)','', 'R' };document.getElementById(form_name).submit;};</script>
The two buttons (almost) do the same thing if the form is completed incorrectly - but if it's completed correctly, the new button doesn't submit the form, nor does it display a message to the user.
If you just try the two buttons, you'll see the difference immediately. In fact, that'll probably be easier than me trying to explain the differences. You can enter any old data into the form. The only requirement is that the email field must contain something that looks vaguely like an email address - but the other fields can all contain garbage.
Bookmarks