Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 8330 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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 ]

Posted

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

Posted

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

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.