June 23, 200817 yr I am very new, so pardon if this is obvious, but I have a dataset of projects with various fields that describe the projects, included in each general description is a html link to the project site. My problem is the links do not work. I've tried dumping the data so the field is just the link, but that doesn't work either. Here's an example - http://oxford.seiinc.org:8012/baasc/browserecord.php?-action=browse&-recid=11 Do I need to do something special in the original filemaker database to make the html link active?
June 23, 200817 yr What you could do is create a button for it. Have the button do the script step "Open URL" when it's pressed, and specify that the URL comes from your URL field. When you press the button, it should go to the URL of the record you are currently viewing. Would that be an acceptable solution?
June 23, 200817 yr Author Sorry again for my ignorance - but this is a php page, not a IWP page. Do you mean create a button in the php page? Is there no way to have text in a database field also be active hypertext? Thanks!
June 25, 200817 yr For this to work you'd need to actually make it an html link i.e. http://oxford.seiinc.org:8012/baasc/browserecord.php?-action=browse&-recid=11
June 25, 200817 yr Author I tried that before and it didn't work - I also tried pasting in what you provided (just to see if I was missing something). No dice. Just reads as written. see here http://oxford.seiinc.org:8012/baasc/browserecord.php?-action=browse&-recid=1 Do you need to make some changes to the field format to have it read the html when output?
June 25, 200817 yr Your HTML characters have all been escaped, so they no longer work as HTML. This seems to work (remove extra spaces). <?php echo html_entity_decode('http://oxford.seiinc.org:8012/baasc/browserecord.php?-action=browse&-recid=11'); ?> Another possibility, if you're producing this HTML via xml/xsl, is to use the attribute in the xsl tag: disable-output-escaping="yes" I don't really know where this HTML is coming from nor how. I'm not a web expert in any case; though learning, slowly, with much gnashing of teeth -] Edited June 25, 200817 yr by Guest
June 25, 200817 yr Author Can you explain what you mean by the "html characters have all been escaped"? I assumed you meant for me to add the additional code right into the field. I tried this, but I'm still not getting anything active - just the exact text I enter. I edited the link for simplification, but otherwise added the text you describe. You can see here. http://oxford.seiinc.org:8012/baasc/browserecord.php?-action=browse&-recid=1 The site was created using the FM server 9 PHP site assistant. Edited June 25, 200817 yr by Guest
June 25, 200817 yr Can you explain what you mean by the "html characters have all been escaped"? What this means is that your document thinks you want to see this text: So it 'escapes' the Less than and greater than symbols into: & lt;a href="link"& gt; Since & lt; (without the space) is the code to display a <
June 25, 200817 yr Author Thanks for the explanation, so how do I get it to see it as html, not as characters?
June 25, 200817 yr Well, I haven't used Site Assistant. It is not wrong. It's trying to make it so that the data from your FileMaker field is displayed on the web just like the data that was entered. Which means it is "escaping" special characters, such as "<". These escaped characters are then rendered to the screen correctly by the web browser, for reading. It's a 2-step process. It is pretty much automatic; at least it is if you use xml/xsl. But you want it to render as functional HTML, which is kind of a special case. There are ways to do that. I posted two (xsl and php). But as long as you pass them directly through Site Assistant, it is just going to escape them, so they won't work. It will be tricky to get it to work. But we don't have enough access to how you're getting this.
June 25, 200817 yr Author Could it be a specification in the style sheet (.css file)? I notice the data is coming from this kind of structure - COUNTY MAR In the case where I have a html text it escapes as described above the critical characters. When I look at the CSS file there is a reference to the "field_data" as in the source page td.field_data { color:#585858; font-size:12px; text-align: left; padding-top:5px; padding-bottom:5px; Is there a section of code I could add to the CSS file field_data so that it does not escape characters?
June 25, 200817 yr No, CSS changes the way it looks. You are requiring it to "decode" those characters. Which would require something like a PHP function (like I posted, but which didn't work, because you just put it in the FileMaker field, so it got escaped also). If you cannot stop it being escaped, you're going to have to add the PHP function to decode it. But not within the field itself. You'd could set a PHP variable to the field's value, then enclose that within the PHP function. Something like that. All you're showing us with your posted link is the result of the browser processing your php page. There's nothing we can do with that. We'd need to see the php page's code itself to tell you how to decode it. You could zip and upload it. It would be this page: browserecord.php
June 25, 200817 yr Author You all are great. I'm learning so much from this activity. I appreciate you're bearing with me. attached is the file. browserecord.php.zip
June 25, 200817 yr No guarantees; and I can't really test, as it uses your FileMaker file's records. But try replacing this line: <?php echo nl2br( $record->getField('Project Program Policy', 0))?> with this: <?php $proj = $record->getField('Project Program Policy', 0); echo html_entity_decode($proj); ?> [Once again, remove extra spaces. I'd post it inside code brackets, but then the closing tag gets cut off, which is worse.] Edited June 25, 200817 yr by Guest
June 26, 200817 yr Author I am bowing down before your feet! thanks so much. It's working (where I code the html right) http://fm.seiinc.org/baascdb/browserecord.php?-action=browse&-recid=1
Create an account or sign in to comment