Jump to content

Search the Community

Showing results for tags 'nodes'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 3 results

  1. how to read xml nodes with same name in c#? I have XML file with a users, and their personal informations(name, surname, age, photos...). I'm displaying this infos in gridview, and everything is ok. Just cannot select one photo to display in the gridview, one photo for every user, like profile photo. I cannot do this cause there is not a tag . There are more tags with same name like in example below. So i'm trying to select all infos, put in datatable, and display in gridview control with Eval("Foto") functioon. But photos cannot be displayd because in evel function cannot be inserted more photos in same time. This is the structure of the photos in the XML document: <User><Name>User name</Name><Surname>User surname</Surname><Foto>http://website.com/images/image1.jpg</Foto><Foto>http://website.com/images/image2.jpg</Foto><Foto>http://website.com/images/image3.jpg</Foto><Foto>http://website.com/images/image4.jpg</Foto></User> This is the gridview control which i use <asp:GridView ID="GridView1" ShowFooter="false" ShowHeader="false" CssClass="tablepress-id-N" runat="server" AutoGenerateColumns="false" AllowPaging="true" OnPageIndexChanging="OnPageIndexChanging" onrowdatabound="GridView1_RowDataBound"><Columns><asp:TemplateField><ItemTemplate><li class="objectListItem"><div style="float:left;width:12%;margin-right:5%;"><asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Foto")%>'></asp:Image></div></ItemTemplate></asp:TemplateField></Columns><pagerstyle cssclass="gridviewPager"></pagerstyle></asp:GridView> Where i make a mistake?
  2. I'm trying to load an xml file into an html file using jquery... i'm using jquery bc the site is built in Adobe's Business Catalyst and doesnt allow for any server-side scripting languages. The XML fIle is broken down into five sections - Corporation Builder Subdivision Plan and Spec- with child nodes within themThe following node names are in the following format (Parent Child). The data that I am trying to display are the: "Builder BrandName", "Spec SpecStreet1", "Spec SpecPrice", "Subdivision SubParentName", "Plan Description", "Spec SpecElevationImage", "Spec SpecBedrooms", "Spec SpecBaths", "Spec SpecSqft", "Spec SpecGarage"So far I've managed to .find and .append all the information in the correct format within its appropriate div with one exception - The data is being repeated around 78 times. Where there should only be one version of each address. So my question is:What can i do to continue displaying the data on my page (http://www.fallsatimperialoaks.com/home-inventory/index_copy.html) without having the data repeated?The XML File is located at http://www.fallsatimperialoaks.com/I8959.xml <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type:"GET", url:"/I8959.xml", dataType:"xml", success: function(data){ $('#load').fadeOut(); $(data).find("Builder").each(function(){ var Brandname = $(this).find("BrandName").text(); var Subdivision = $(this).find("Subdivision SubParentName").text(); $(data).find("Plan").each(function(){ var Description = $(this).find("Description").text(); $(data).find("Spec").each(function(){ var Address = $(this).find("Spec SpecStreet1").text(); var Price = $(this).find("Spec SpecPrice").text(); var Image = $(this).find("Spec SpecElevationImage").text() + '" width="220" height="124" alt="' + $(this).find("Spec SpecStreet1").text(); var Beds = $(this).find("Spec SpecBedrooms").text(); var Baths = $(this).find("Spec SpecBaths").text(); var Sqft = $(this).find("Spec SpecSqft").text(); var Garage = $(this).find("Spec SpecGarage").text();//Append to homecontainer $("#homecontainer").append(' <div class="address"> ' + Address + ' <br><span>Section: ' + Subdivision + '</span>' + '</div>' + ' <div class="price"> $' + Price + ' <br><span> ' + Brandname + ' </span>' + '</div>' + '<div class="clearboth"></div>' + ' <div class="home-image"><img src="' + Image + '"/>' +'</div>' + ' <div class="home-description"> ' + Description + '</div>' + '<div class="clearboth"></div>'); $("#homecontainer").append(' <div class="stats"><div class="beds"><img alt="" src="/images/ico-beds.png" style="border: 0px; width:22px;" /> ' + Beds + ' Bedroom(s)</div><div class="baths"><img alt="" src="/images/ico-baths.png" style="border: 0px; width:22px;" /> ' + Baths + ' Bath(s)</div><div class="sqft"><img alt="" src="/images/ico-sqft.png" style="border: 0px; width:22px;" /> ' + Sqft + ' Sq. Ft.</div><div class="garage"><img alt="" src="/images/ico-garage.png" style="border: 0px; width:22px;" /> ' + Garage + ' Car Garage</div></div>'); }); //End Data Function "Spec" }); //End Data Function "Plan" }); //End Data Function "Builder" }, error:function(){ $("#homecontainer").text('Failed to get feed'); } });}); </script> Any help is appreciated! 
  3. Hi, I am trying to create a text tag where users can add comments, delete them and also choose where to insert that comment(if not default). My problem is how to give each new node a unique id, which should be a number 1, 2 and so on. Using these numbers, the user could select where to insert the new par or even to select which one to be deleted. To be honest I want to create a checkbox next to the new par, so the user can just thick which par to delete and then press the button, but I am open to better ideas:) For start could someone help me how to make it a create a unique id for each new nodes and how to call 2 var inside appendChild() Thanks <script> function addNew(){ var inputText=form.inputText.value var para=document.createElement("p"); var node=document.createTextNode(inputText); var x = document.createElement("INPUT"); x.setAttribute("type", "checkbox"); para.appendChild(node); // I tried para.appendChild(node, x); var element=document.getElementById("div1"); element.appendChild(para); // also element.appendChild(para, x); and all other variations. } function deleteComment(){ var parent=document.getElementById("div1"); var child=document.getElementById("ggg"); parent.removeChild(child); } /* * function addBefore(){ var inputText=form.inputText.value var para=document.createElement("p"); var node=document.createTextNode(inputText); para.appendChild(node); var element=document.getElementById("div1"); var child=document.getElementById("line"); element.insertBefore(para,child); } * */ </script> </head> <body> <form id="form"> <input type="text" value="inputText" id="inputText" /> <input type="button" value="Add New Comment" onclick="addNew()" /> <input type="button" value="Delete A Comment" onclick="deleteComment()" /> </form> <div id="div1"> <p id="ggg">gggggg</p> </div> </body>
×
×
  • Create New...