Chirriras Posted February 3, 2004 Posted February 3, 2004 Okay, I've had a first class education in the last month in moving into FMP and the web. Sometimes I feel like I've bitten off more than I can chew, but always manage to work my way out of the corner (with many, many thanks to my FMFORUM friends). Now here's the point that I haven't been able to clarify yet. Just when do I know it is time to use CDML rather than HTML, and when do I know I am supposed to use JavaScript instead of the other two? It seems there are some things covered by all three. How does a novice know how to choose correctly?
Justin Grewe Posted February 3, 2004 Posted February 3, 2004 You use CDML when you need to extract the data from filemaker. HTML is a standard language used in everything to make things look nice. It's for formatting or making forms which enable users to submit data to the filemaker database. Javascript is a client-side scripting language (the script executes on the users machine rather than on the web server). You can use this to control how the user has data presented to him during his visit, or control what they can do. This type of scripting language is not really secure. For example, if you are submitting multiple forms and use a javascript function like window.open to have multiple browser windows open and each one submitting a form, the user can interact with the windows and mess with what the script is performing. A better language for scripting is php, asp, or perl (server-side languages). All of these languages can be used together. For CDML, it goes inside an HTML document. You use HTML as you would normally to make your webpage, but when you need data from filemaker you can use CDML commands. If you need to control what the user can do, you can place a javascript in the html document as well. Just call the script in between the <head> tags and then call upon it later in the <body>. Thats about it with CDML and javascript. They are pretty simple. Justin Grewe
Chirriras Posted February 3, 2004 Author Posted February 3, 2004 Thanks Justin, that ties it together for me. Now it makes sense. BTW, used to travel through Berea frequently on the way to my grandparents in London (in the days before I-75). It's a lovely area.
Fenton Posted February 3, 2004 Posted February 3, 2004 Just to amplify what Justin said, JavaScript can interact with the elements of a form on a page, then submit it. This is commonly used for the "you didn't fill in your email" type alerts. It can also use the element of a form to set a FM token, before submitting the form. This can be very useful if you need to "fork" the next action depending on the entries. And it's not all that hard to do, 'cause I can do it, and I'm no JavaScript expert by any means.
Recommended Posts
This topic is 7591 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