Date:  04/07/2010 01:32:42 PM Msg ID:  004161
From:  FoxWeb Support Thread:  004156
Subject:  Re: linking to a script and passing form val
The fact that your code works in some browsers does not make it correct and does not guarantee that it will work in others. The best way to ensure compatibility is to use correct HTML, CSS and Javascript code. Note that it's possible to use correct code and have it fail in some browser due to bugs in the browser itself or incomplete support of newer standards. Fortunately you are not trying to do anything complicated, so you should not have any problems. Make sure that you use double quotes where necessary (remember my comment in my first response yesterday).
You should do a web search for "HTML Validator". There are plenty of on-line options, including some running on w3c's site. And remember: Keep the first version really simple (no formatting or other extraneous HTML). Once you have the form working, you can plug it into the rest of your content.
FoxWeb Support Team email
Sent by Jeff Grippe on 04/07/2010 09:08:12 AM:
I'm sure you're right but the form does work just fine in IE and Firefox (on both PC and Mac). Could you say more about HTML validators? If you could point me to a reference, I'd appreciate it. My Javascript validation works but it is complicated and I think simpler would be better.
Sent by FoxWeb Support on 04/06/2010 07:23:01 PM:
Multiple submit buttons in HTML forms is definitely supported by all browsers in existence and has been in the HTML specification since the very beginning. I am sure that you are doing something wrong with your HTML code. I recommend that you try fixing your form before venturing into background submission via Javascript.
Try creating a really simple version of the form, stripping any non-essential elements. Validate the page with one of the many available HTML validators. Once you isolate the problem, you should be able to implement the fix in the real page.
FoxWeb Support Team email
Sent by Jeff Grippe on 04/06/2010 06:11:27 PM:
All of this is really a work-around because Safari and Chrome won't run some of my forms correctly.
I used to have a form that had 4 submit buttons that did different things. IE and Firefox have no problem with this but in Safari and Chrome, none of the submit buttons would receive focus or click.
When I changed the buttons to plain buttons that linked to some other script it worked fine with Safari and Chrome.
The problem is that I need the data that is in the form fields. 
Currently I do the validation in one script using Javascript and then another script picks up the form variables and puts them into the table.
 I'm looking to eliminate the submit buttons and pass the form data (6 variables) to another script which will grab them with QueryString, do the validation and continue.
So I need to code a button which will link to another script and hand over the six form variables.
Thanks for the help.
Sent by FoxWeb Support on 04/06/2010 05:44:06 PM:
It's not clear from your message, but it seems like you are trying to dynamically create these URLs in client-side Javascript. Is this true?
If this is the case, the URLs should not include the names of the properties, but their values. You will need to use string manipulation operators and functions to achieve this:
LinkText = "<a href=\"newscript.fwx?startdate=" + document.ReqData.StartDate.value + "&compdate=" + document.ReqData.CompDate.value + "\">Check Dates</a>";
Note the use of escape characters to allow the inclusion of double quotes in the URL string. Also, be careful with your use of double vs single quotes. The code in your message used a double opening quote, but a single closing quote. HTML links require double quotes.
FoxWeb Support Team email
Sent by Jeff Grippe on 04/06/2010 09:52:20 AM:
 I need to link to a FoxWeb script and pass some form variables. I'm not sure of exactly what to use. Would I use the document model? What would be the syntax?
For example, I have the follwoing (using the document model)
I need to hand these off to a script using the ? operator. Would this be something like
 <a href="newscript.fwx?startdate=document.ReqData.StartDate.value&compdate=document.ReqData.CompDate.value'>Check Dates</a>