Newbies MrHappy Posted May 13, 2000 Newbies Posted May 13, 2000 Hello! I need your help! I'm using javascript on a page to change a jumpbox dynamically. This page also connects a FMP database and I'm having difficulties using [FMP-tags] within my javascript! It just won't work. Here are some details about my script. The script checks to see what selection the user makes on a "select-tag" (i mean <select> ) and then dynamically loads a second "select-tag" accordingly to his choice. I use writeln(...) to display the text and also the <script>...</script> does not produce all the html page but only a certain part, the part that needs to be dynamic. Since I'm using a script to load and modify the user's selection into the db, I have to work with <script>...</script>. My problem is the following: when a user enters the site to modify his "profile", the script has no memory so it cannot put the proper user selection in the select-tag. I have to go take it in the database. My solution was to display the field as the first option. But since I'm inside a <script> I cannot access the database with [FMP-tags]... I'm sure there is a way to do this, but how? Is this cause the javascript is executed/parsed before the [FMP-tags] ? Thanx inadvance and PLEASE help me!
Keith M. Davie Posted May 15, 2000 Posted May 15, 2000 The shopping cart solution which comes with FMPro 4 (I don't know about 5) uses javascript and includes. You may find an answer in that solution through the includes. Hope this is useful. Good luck. ------------------ Keith M. Davie
Anatoli Posted May 31, 2000 Posted May 31, 2000 quote: Originally posted by MrHappy: Hello! I need your help! .......... ..... I'm sure there is a way to do this, but how? Is this cause the javascript is executed/parsed before the [FMP-tags] ? [FMP-tags] are processed on Server and they are not in page code at all, they are replaced by data from FM. JS is send with page to the browser and then executed there in browsers. Try do the IF from HTML and FM: [FMP-If: LeftSide Operator RightSide ] ...HTML if condition is true... [FMP-Else] ...HTML if condition is false... [/FMP-If] Hth
Recommended Posts
This topic is 9010 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