April 11, 200223 yr Skuli, Try it this way: code: <script>Document.Write("FMPro?-DB=Schedule.fp5&-Lay=table&-Format=CalendarMonth.html&Date=" + dateString + "&-Find");</script> target="Display" Hope this helps. Garry [ April 11, 2002, 01:53 PM: Message edited by: Garry Claridge ]
April 11, 200223 yr Thanks Gary, I was afraid this was the way to do it. Unfortunately this means the I have to document.write the entire index.html page and all the links. I was hoping that there was a way to simply insert the JavaScript variable into the href string. I think I might try to make a text box and have the JavaScript put the answer into that box and then have the FM URL link preform a search based on the content of the box. I suppose I could also put this box in a hidden frame so the user doesn't see it. Hummm.... Thanks for your help
April 11, 200223 yr Author Skuli, I usually use forms, not urls. Hence, I can use functions like this: code: function doSubmit() { with (document.FormName) { //concatenate the dates together var sDate; sDate = (elements[12].value + "/" +elements[11].value +"/" + elements[13].value) elements[2].value = sDate; submit(); } } I can call the function from any href. Also, I can have any number of forms and only submit the relevent one. All the best. Garry
April 11, 200223 yr Author Have a look in the "adding multiple rows in a portal from web" topic. I have included a number of different form submits and href's. Hope they help. Garry
April 12, 200223 yr Hey All, I am trying to figure out a way to insert a JavaScript variable into a search string using a link. The problem is that I can't figure out the syntax for getting the variable into the string. Basically the following JavaScript (which works) returns the date in the form of the current month, day one and the current year as the variable DateString. <!-- function TheDate[] { var Datum = new Date[]; month = Datum.getMonth[]; year = Datum.getYear[]; dateString = month + "/1/" + year; } --> I had to replace the parenthesis with []for the post to work. Now what I can't figure out and maybe it isn't possible is to get dateString into the search link. "FMPro?-DB=Schedule.fp5&-Lay=table&-Format=CalendarMonth.html&Date=dateString&-Find" target="Display" Any ideas? Thanks.
Create an account or sign in to comment