Osman Posted September 21, 2005 Posted September 21, 2005 Hi, I am having trouble with cookies. I search old topics but i cant find a solution for me. Here is the problem I cant use cookies. I am adding the fallowing code to results.xsl (which site assistant automatically create) I am using firefox 1.0.6 on windows xp. I cant see my cookie in the settings window. And i am using FMSA7 How can i use cookies? Sorry for poor english. Thanks in advance Adam Djuby
Martin Brändle Posted September 21, 2005 Posted September 21, 2005 Did you add the <?xslt-cwp-buffer buffer-content="true"?> processing instruction directly after <?xml version="1.0" encoding="UTF-8"?> ? See CWP Guide on p. 63 and p. 58. And replace 'localhost' by the name of your host, e.g. by "somehost.com" (without www). Martin
Osman Posted September 21, 2005 Author Posted September 21, 2005 <?xslt-cwp-buffer buffer-content="true"?> was in third line now i took it to second line as you say. And i replace localhost as adamdjuby.com (but there is no domain as i write is it important?) Finally I cant see my cookie i firefox settings. (Note: There is a cokkie named "JSESSIONID" from localhost, I think wpe created it.) Thanks Adam Djuby
Martin Brändle Posted September 21, 2005 Posted September 21, 2005 Does Firefox allow to set cookies? (see preferences or options) Is there any other software firewall which prohibits cookies?
Osman Posted September 21, 2005 Author Posted September 21, 2005 Other pages can register cookies. My settings allows cookies. And there is no other software which prevents cookies. I can browse fmforums and other web pages without any problem caused by cookie settings. And there is also one cookie named JSESSIONID from localhost (when i open recordlist.xsl the cookie is created) I am very new to xsl and developing web via FMSA. Thanks Adam Djuby
Martin Brändle Posted September 21, 2005 Posted September 21, 2005 Can you post this file here in the forum? Thanks, Martin
Martin Brändle Posted September 21, 2005 Posted September 21, 2005 I would do 2 things: - take the variable outside of xsl:attribute (it might be that there the XSLT engine does not start to interpret the variable, because the final result would be empty anyway) - write "fmxslt:set_cookie()" not "fmxslt:set_cookie () " Home If, however, you want that the cookie is set when the link is clicked, then you should use the fmxslt:set_cookie() in the XSLT file that will display the "Home" page.
Osman Posted September 22, 2005 Author Posted September 22, 2005 I changed code but still i cant register my cookie. I update FMSA 7 to 7v3 but still not working (I dont like to add cokie lint to home, i just place it randomly.) I only want use a simple cookie for my pool to prevent multiple votes. I will be very glad if somebody send me a simple xsl which register a cookie. Thanks lot Adam Djuby
Osman Posted September 26, 2005 Author Posted September 26, 2005 Thaks It is working on real server but not my own computer via local host. Thats not problem. Thanks again. Adam Djuby
Martin Brändle Posted September 26, 2005 Posted September 26, 2005 Did you try with 127.0.0.1 instead of localhost?
Osman Posted September 27, 2005 Author Posted September 27, 2005 Thaks a lot now it works fine. Adam Djuby
Newbies Darren Burns Posted October 24, 2005 Newbies Posted October 24, 2005 Martin, thanks for your help on this issue. I noticed you also responded to me on the FSA site. I have now got the cookies to work but am stumped as to how to set the cookie to a dynamic value that is parsed and coming from filemaker. I have tried a variable but am getting a syntax error as a result. Any thoughts? Thanks Darren
Newbies Darren Burns Posted October 25, 2005 Newbies Posted October 25, 2005 Martin, thanks for your help on this issue. I noticed you also responded to me on the FSA site. I have now got the cookies to work but am stumped as to how to set the cookie to a dynamic value that is parsed and coming from filemaker. I have tried a variable but am getting a syntax error as a result. Any thoughts? Thanks Darren
Martin Brändle Posted October 26, 2005 Posted October 26, 2005 Darren, can you post the XSLT file? Thank you.
Newbies Darren Burns Posted October 27, 2005 Newbies Posted October 27, 2005 Front end of the set cookie xsl, I have not problem insterting the cookie in the result xsl file. I have tried to use the attribute tag to break out the value of statment but is does not seem to set the cookie when I do this. Either way I need to get the cookie definition statement of the the '<','>' to be able to insert the value-of the projectid field from Filemaker. The code hear works but I would like the value of 2197 to be dynamic as it is the record identifier. This is all to get around the fact the xsl does not support framesets. I works but I just need to set the cookie value to be a dynamic value from filemaker. Any advice you could provide would be helpfull thanks Darren <?xml version="1.0" encoding="UTF-8"?> <?xslt-cwp-query params="-db=Projects&-lay.response=Intranet&-grammar=fmresultset&-encoding=UTF-8"?> <?xslt-cwp-buffer buffer-content="true"?> Welcome to iprojects
Martin Brändle Posted October 27, 2005 Posted October 27, 2005 A few comments: - eliminate the first variable definition of projectid (the one before xsl:output ...), its value will not be defined (because the XPath is wrong). - are you sure that you get only one record? Otherwise you should specify the record number in your XPath with fmrs:record[1] . - according to the Apache Xalan XSLT processor documentation, the construct is not treated efficiently by the XSLT processor. Replace it by - variables can be accessed with a $ before the name The code should therefore look like:
Recommended Posts
This topic is 6967 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