Jump to content

prichardson

Members
  • Content Count

    97
  • Joined

  • Last visited

Community Reputation

0 Neutral

About prichardson

  • Rank
    Newbie
  1. Hi,LATEST UPDATE:I've tried branch and a couple others that are on the same path and they work ok! It's just not working when i put the ID in. If the code is correct as it pulls in anything else and I've got your piece of code in that you suggested. What could it be?----------------------------------------------------------------------------------------------------------------------------------The number of beds - you can see it's the last item in the code snippet (might not be very clear, sorry). It lies in 1 additional layer to the id. i.e. ...The path for the id = aspasia_data/houses/property/idThe path for beds = aspasia_data/houses/property/address/number_of_bedsIt might be the path issue as you say - it should work otherwise - that is why i'm so confused! lolI tried that bit of code you suggested, but i still don't get the result. I can see that - that the piece of the code should make it work... so it must be something before that code or like you said maybe the paths - which i've doubled checked.A quick few questions - I don't need to change the 'match' from '/' to 'id' or the path to the id... i.e. it should still be '/'?-This line <xsl:when test="aspasia_data/houses/property/address/property_location"> should that be this instead <xsl:when test="aspasia_data/houses/property/id> ?-is there a way of testing/writing out the url to see if it passes through the parmeter etc. ?- is this is correct in the asp page (the path?) - Set Node = xmldoc.selectSingleNode("aspasia_data/houses/property") Any other suggestions?Much appreciated as always.
  2. Hi,I've got website that runs fine by displaying all the properties from a 3rd party xml data. I want to now just list the individual property that matches the property id. My problem is that when i try to get it to appear like this - i dont get any result. (funny enough if i changed it from property id to lets say number of beds - it works, so i'm a little bit confused.This first bit of code is a snippet of my classic asp cod e page that connects and sends over the url... <%strSearch = 3624Set xmldoc = Server.CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")xmldoc.async = falsexmlDoc.setProperty "ServerHTTPRequest", trueURL = "http://web.aspasia.net/pls/oliverfn/aspasia_search.xml?upw=XXXXXXXXXXXXXXXXXXXXX&pp=1&pr=3624"xmldoc.load(URL)Set xsldoc = Server.CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")xsldoc.async = falsexsldoc.load(Server.MapPath("property.xsl"))Set Node = xmldoc.selectSingleNode("aspasia_data/houses/property")Set template=Server.CreateObject("MSXML2.XSLTemplate")template.stylesheet=xsldocSet processor=template.createProcessorprocessor.input = xmldocIf strSearch = "" Thenprocessor.addParameter "Search", "" & strSearch & ""End Ifprocessor.transform()Response.write (processor.output)%> This second bit is the first part of the XSLT code that displays the property...(my question here might be about the template match - i tried 'id' and also the path to the id)? <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="Search"/> <xsl:template match="/"> <xsl:choose> <xsl:when test="aspasia_data/houses/property/address/property_location"> <xsl:for-each select="aspasia_data/houses/property"> <xsl:sort order="descending" select="aspasia_data/houses/property"/> <xsl:value-of select="address/property_location"/> .......This 3rd bit is the snippet of the actual xml from the third party -you can see the tags... - <aspasia_data> − <houses> −<property id="3624" prevref="062" last_updated="03/04/2009 16:03" created_date="11/04/2008 16:28"> <id>3624</id> − <address> <address1>7a Priory Road</address1> <town>Chiswick</town> <property_location>Chiswick</property_location> </address> My Question i think is the any reason why my code is not actually able to pull the property result by using the property ID??I appreciate your help as i just can't see what my problem is.Many Thanks
  3. Is it possible to get this code to work. Trying to page. Here is a snippet of the code for the previous button. ' From the current record find the record with lower ID 'IF strFirst < strCurrent THEN do until rsNewsNav.Fields("NewsID") > strCurrent rsNewsNav.MovePrevious() loop strPrevious = rsNewsNav.Fields("NewsID")ELSE strPrevious = strFirstEND IF So when you click on the button it gets the next one by doing a loop.The error that is gives is:do until rsNewsNav.Fields("NewsID") > strCurrentI am not sure if we are able to use this " rsNewsNav.Fields("NewsID") " in the loop ?Any suggestions would be great.
  4. Thanks for the code. I tried replacing that bit of code with what you gave. But still get the error in IE.I was wondering if it or something in this bit of code could be adjusted?Or maybe i am running out of ideas to why this wont work in IE? if(this.options.orientation!='horizontal') this.tab_overflow.setStyle('float','left'); this.bodies.each(function(el,i){ el.injectInside(this.tab_body_container); }.bind(this));
  5. Hi, Cheers for your quick response.Yeah i tried contacting the author. No response yet.I looked on their forum - http://forum.mootools.net/viewtopic.php?pid=37793 and tried looking at their known bugs. I also looked up it in google too and thats where i found that help.That person saying that IE you have to code the text for style float in a particular way. It says like a do-able thing - just i know idea how to try to use it in MooTools code.Do you think it is possible to do it in Mootools code? Or would it be best to move on and find another piece of code? Any ideas or suggest some code that does the same thing?Cheers for your help.
  6. Hello,I've had a go at using this ajax/javascript code: http://people.cs.uchicago.edu/~meweltman/sliding_tabs.html It works well in Firefox but not in IE.It gives this error: "Could not get the StyleFloat property".I have had a look into it and found this article good as i think it maybe the answer to the IE problem: http://radio.javaranch.com/gthought/2007/0...9239538983.html " element.style.styleFloat "However I am not sure how to implement it in the code. (The js code is in the "source-code" tab in "http://people.cs.uchicago.edu/~meweltman/sliding_tabs.html ")My understanding is that the IE calls/uses the 'element.style.styleFloat' rather than 'element.style.cssFloat' but in the js code it does not have it, instead it has this: ... $extend(this.options,options); if(this.options.orientation=='horizontal'){ this.flow = 'left'; this.side = 'right'; this.dim = 'width'; }else{ this.flow = 'top'; this.side = 'bottom'; this.dim = 'height'; } this.bodies = bodies; this.tabs = tabs; this.tabs.setStyles({ 'position':'relative', 'float':this.flow });... Many thanks
  7. Hello,I have setup a property list which displays in lowest price to high price property as the default. I would like to change it, so the most expensive property is shown first.Here is the link to the website http://www.oliverfinn.com/pages/properties...F0207B0A16964DECan anyone please just mention the piece of code that I need to add or change to make the xslt /classic asp page display the most expensive property first.My guess is it might be in this bit of code? <xsl:when test="xyz/xyz/property/address/property_location"> <xsl:for-each select="xyz/xyz/property"> Thanks
  8. Thanks for your reply!I have tried removing the @sign with no luck.I tried removing all the parameters from the SP and passed just the @Blog_01ID which was successful. I tried it for all the parameters and finally only the E-mail function gives me this error. As I mentioned earlier, the @Blog_01ID is NOT an autonumber variable, the autonumber in the corresponding table i'm inserting is the Blog's COMMENTS table. The @Blog_01ID is just there to identify which blog the comment refers to.I will keep trying, thanks for your help, and if anyone else knows extensive info on this problem, or help me ReWrite this code in any other way, please help :) Kind regards,Baysaa.
  9. CommentID is the primary key/autonumberHOWEVER Blog_01ID is NOT an autonumber, it is a foreign key from another table, and an IntegerI'm still getting an error, cudnt' fix,Do you think it has something to do with the '@' sign in the E-mail and the '@' in the parameter name clashing or something :S i'm so confused ....Trying to prevent my site from SQL Injection ... so re-writing all the sql code with stored procedures.
  10. Hi! I wrote a simple stored procedure to add a few fields into a MsSQL table: INSERT INTO dbo.xyz769_Blog_01_Comments (Blog_01ID, Blog_01_Title, Username, Comment_Content, Email)VALUES (@Blog_01ID, @Blog_01_Title, @Username, @Comment_Content, @Email) But whenever i try to insert data thru an ASP page i get the following error: Microsoft OLE DB Provider for SQL Server error '80040e07'Error converting data type varchar to int./anti_sql/pages/blog_01/blog_item.asp, line 73 Line 73 on blog_item.asp is just my execution statement which is the following: rsEnterRecord_cmd.Execute I tested to see which parameter was causing the problem, and after I went thru each one, I found out that when I enabled the @Email parameter it gives me this error.My Parameters are created on the ASP page through following statements: rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Blog_01ID", 3, 1)rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Blog_01_Title", 200, 1, 200)rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Username", 200, 1, 50)rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Comment_Content", 200, 1, 255)rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Email", 200, 1, 200) In the database table:Blog_01ID is IntegerBlog_01_Title is nvarcharEmail is nvarcharComment_Content is nvarcharUsername is nvarcharI really don't see where the problem is, and I've run out of ideas, please help ....
  11. Found the answer .... http://www.ecodebank.com/details/?catid=6&...=54&nid=493
  12. HelloI Have a recordset that gets the content from the database, but I only want to display a certain number of characters on the page.I can do this, but my problem is when it cuts a word in half!! Can I adapt this code to say if it is not a space then add (+1) the number until equals space? Or if anyone can offer a different line that would do the trick? strReviewContent = Left(strReviewContent,100) I tried using if statement with these functions but no luck!http://www.w3schools.com/vbscript/func_space.asphttp://www.w3schools.com/vbscript/func_len.aspMany Thanks
  13. Hi boen_robot Thanks - since getting the cdata off - and i released that i had to add a bit more onto the path to the tag for it to work - <xsl:value-of select="property_summary/custom_element/element[@description = 'Testimonial']"/>this works now for one of the properties. But for some reason one of the properties seems to not display on the page (the one which i showed the property in the last post. I just can't work out why that is not displaying now - even though it is in the xml sheet???cheers
  14. Here is a property ... - <property id="2805" prevref="" last_updated="09/11/2007 09:26"> <id>2805</id> <department>RL</department> <branch>HO</branch> - <address> <address1>12 Albany Road</address1> <town>Brentford</town> <county>Middlesex</county> <postcode>TW8 0NF</postcode> <property_location>Brentford</property_location> <display_address>Albany Road, TW8</display_address> </address>- <custom_element> <element description="Testimonial">A two bedroom terraced house which has recently undergone a full refurbishment and benefits from having a 25'8 double reception. The accommodation comprises; 25'8 double reception, separate kitchen, two bedrooms, family bathroom and private rear garden. Albany Road is located with a wide selection of amenities close to hand which includes; local shopping, The Watermans art centre and the river Thames. Transport links include Brentford BR (direct to Waterloo) a selection of bus routes and the A4/M4 into town and out to Heathrow and the West Country.</element> </custom_element> </property_summary> </property> I asked the external company to remove the CDATA - which they have done now. But it still does not display the property?thanks
×
×
  • Create New...