May 13, 200025 yr Newbies 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!
May 15, 200025 yr 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
May 31, 200025 yr 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
Create an account or sign in to comment