Jump to content
Server Maintenance This Week. ×

CDML tags inside Javascripts?


Lange

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

Recommended Posts

Hello

I am trying to make a solution involving both Javascript and a Filemaker 5 database, but I cannot get even the simplest Javascript to work. Am I missing something out? I have searched the Net and books available to me for a solution, but no luck.I haven't found any threads here giving hints to this problem.

Example. This little test-script:

<script language="JavaScript" type="text/javascript">

<!--

alert('[FMP-CurrentRecID]')

//-->

</script>

It just displays "[FMP-CurrentRedID]" instead of, lets say "7". When I put the tag [FMP-CurrentRecID] on the page it displays the number ok, but not inside the javascript.

What am I doing wrong?

Link to comment
Share on other sites

Hi Lange,

What you can try is to create a function with a parameter that's passed to the alert() function:

<HEAD>

<SCRIPT LANGUAGE="javascript">

<!--

function showalert(message) {

alert(message);

}

// -->

</SCRIPT>

</HEAD>

<BODY>

<P><A HREF="javascript:showalert('[FMP-CurrentRecID]')">Click here to send the RecordID!</A></P>

</BODY>

This should do the trick.

Greetz,

Jorick Schram

VODW Marketing

Link to comment
Share on other sites

Hi all

Thanks for your replies. The idea of removing the comment tags was brilliant. Now it works!

I had not come across this problem before. And it did all the difference! The problems with older browsers; well I think I can live with that - gonna try at least :-)

Best wishes

Lange

Link to comment
Share on other sites

This topic is 8196 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.