Garry Claridge Posted April 11, 2002 Posted April 11, 2002 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 ]
skuli Posted April 11, 2002 Posted April 11, 2002 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
Garry Claridge Posted April 11, 2002 Author Posted April 11, 2002 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
Garry Claridge Posted April 11, 2002 Author Posted April 11, 2002 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
skuli Posted April 12, 2002 Posted April 12, 2002 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.
Recommended Posts
This topic is 8330 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now