- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
50 Posted Topics
Hi all. Suppose I have the following JSON Object: "WorkPhone": { "Phone": { "FixedPhone": "98221234", "Fax": { "CountryCode": "61", "AreaCode": "", "text": "" }, "Mobile": "" } } How can I manipulate the 'FixedPhone' object to look more like the 'Fax' object in Javascript / JQuery? That is: - Remove … | |
Not entirely sure what's happening. I've managed to narrow down the template where this error is occurring <xsl:template match="Application/Comment"> <xsl:copy> <xsl:choose> <xsl:when test="string($ImportXML/Application/Comment)"> <xsl:apply-templates select="$ImportXML/Application/Comment/text()"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="."/> </xsl:otherwise> </xsl:choose> </xsl:copy> </xsl:template> $ImportXML/Application/Comment = "test". Essentially, I'm trying to update my document so that the XPath Application/Comment is now … | |
I need a function that allows a string to be passed in that strips out everything before a decimal place. For example, 40.00% should be 40. However, it needs to be flexible enough to check if there are no decimals and still maintain the same result. For example, 70% becomes … | |
Say I have the following XML: <People> <Group id="1"> <Person FirstName="Bob" Surname="The Builder"/> <Person FirstName="Jane" Surname="Doe"/> </Group> <Group id="2"> <Person FirstName="Billie" Surname="Jean"/> </Group> </People> How can I update Group 1 dynamically by replacing it from an imported xml file (for this sake, we'll store it in a variable called $ImportXML)? … | |
Say I have a code like: `<div id="mydiv">This text is supposed to stay at the bottom of the window regardless of scrolling</div>` How can I program that (or use css) to keep at the bottom of my browser window, even when scrolling? Help is very much appreciated | |
I have an ASP page written in JavaScript that writes a CSV file into a database table. while (!oFile.AtEndOfStream) { var s = oFile.ReadLine(); var sArr = s.split(","); var sPostcode = String(sArr[0]).replace(re, ""); var sSuburb = String(sArr[1]).replace(re, ""); ...stored procedure to write into database... } It works fine for smaller … | |
Anyone know what this means and a step-by-step guide on how to fix it? Line 14: Line 15: <system.web> Line 16: <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" /> Line 17: Line 18: <authentication mode="Forms"> I'm fairly new to ASP.net. Help will be greatly appreciated. Thanks in advance | |
Hi all, SQL definitely is not my area of expertise, so I need help with something. Suppose I have 3 tables (I'll try and keep this is as simple as possible): - User (with UserID). There are 13,000 records - Status (StatusID as the PK). There are 10 records - … | |
Re: Need the Java code to be able to help you mate. | |
Hi all, I'm having issues with two tables that are lined up side by side (a little complicated reason as to why I created two tables instead of having two columns in one table). They contain only one row each with a single td element. The first table contains only … | |
Say I have the following XML variable: [CODE] var oResult = Server.CreateObject("MSXML2.DOMDocument.4.0"); oResult.async = false; oResult.setProperty("ServerHTTPRequest", true); [/CODE] How do I get the encoding to display in the header section? For example: [CODE] <?xml version="1.0" encoding="UTF-8"?> [/CODE] when I run it in the browser? Any help will be greatly appreciated. | |
Say I have the following code: [CODE] poNode = poEvent.target ? poEvent.target : poEvent.srcElement; [/CODE] Is there a way I can force Internet Explorer to use the poEvent.target object? | |
I'm trying to get the properties for the following objects: 0: [object Object] 1: [object Object] 2: [object Object] 3: [object Object] This was generated by using the following code: [CODE] var s = ""; for (var property in this.oProducts.Product) { s = s + "\n "+property +": " + … | |
Could someone please explain why this does not display properly on any other browser except IE: [CODE] <span id="NextOfKinUniqueIDBuddy" class="ReadOnly" style="width:400px;height:50px; border:2px inset threedhighlight;padding:1px"> <span id="1309819582156"> <div>Dr Dre Aftermath</div> <div>1 Test Street, SYDNEY, NSW 2000 AU</div> <div>Phone: +61 02 98222222 Fax: +61 02 91111111 Mobile: 0415875421</div> <div>Email: testing@test.com.au</div> </span> </span> … | |
Hi all, I have an input box that should only contain decimal point numbers (including negative values), but I'm not sure how to remove invalid characters and replace it with something that is valid (i.e. the value e3.45 should be replaced with 3.45). If all the characters in the textbox … | |
Re: An example: <input> <xsl:choose> <xsl:when test="I want to disable it"> <xsl:attribute name="disabled">disabled</xsl:attribute> </xsl:when> </xsl:choose> </input> try that =o) | |
Hi all, I'm fairly new to XML and XPath. I was wondering if someone could help me in understanding the following line of code and what element(s) it is pointing to: [CODE]<xsl:variable name="EmpPos" select="[COLOR="Green"]count(preceding-sibling::Employment)+1[/COLOR]"/>[/CODE] Any help is greatly appreciated. | |
Re: Always best to use curly braces, even if you are sure you don't need that. I've had countless stress attacks because of leaving out such a fundamental character | |
Suppose I have two tables: [CODE] Table1: Pets PetID----------|Name----------|Type----------| 1 |Shaz |Dog | 2 |Molly |Cat | 3 |K9 |Dog | 4 |Billy |Goat | ______________________________________________ Table 2:PetAttributes PetID----------|AttributeName-|AttributeValue| 1 |HairColor |Black | 1 |Breed |GermanShepherd| 1 |Age |12 | ______________________________________________ [/CODE] As you can see from the sample, the … | |
Re: You can use Javascript to collapse and hide the section (probably stored as DIV) and just add an event handler on the image link. Something like: [CODE] function collapseExpand() { if(document.getElementById("divToShowOrHide").style.display==="none") { document.getElementById("divToShowOrHide").style.display="block"; } else { document.getElementById("divToShowOrHide").style.display="none"; } } [/CODE] That's the very basic of the code. I'll let you … | |
Re: Hope this helps: [CODE] if ("You even attempted to do this homework yourself") { alert("Good for you"); } else { alert("Put some effort in you lazy one"); } [/CODE] | |
Hi all, I'm a newbie when it comes to SQL and I have 2 tables that I need to update. Let's say, for argument's sake that the first table (Products) has an identity column (automatically incremented) with the name of ApplicationValueID. It stores a bunch of data about a product … | |
Re: Have an onsubit="[B]return [/B]validate(paramters)". If the form detects something is wrong (depending on your script), it will return as false and won't submit the form. | |
Say I have 2 input fields, both containing dates with the format (dd mmm yyyy), for example, 07 Mar 2010 (Yes, there is a space between date, month and year). Well basically I need the second input box to calculate 60 days (not 2 months) after the first text box. … | |
Say I have some code: [CODE]<input type="text" name="{$valcompname}/@LikelyWeeklyUnfRental" value="{$valcompdata/@LikelyWeeklyUnfRental}" id="RentalValue" style="text-align:right">[/CODE] I want the text box to output a value in a format $#,##0.##. At the moment I can only get it to display only decimal place. I have tried using the format-number function with that regular expression, but no … | |
Re: Hope this helps : [url]http://w3schools.com/ajax/default.asp[/url] | |
Hi all, I have a task that needs to be written in Javascript. I need to change a date e.g. '07/05/2010' to a format of '07 May 2010'. How can I do this? Help is greatly appreciated. Thanks again | |
Re: Instead of id="odd" or id="even", it would be better to have a class="odd" or class="even". This would make it more W3 compliant | |
Re: Definitely a trojan virus. I was hit with this some time ago. | |
I'm having an issue regarding how Safari displays my page. A snippet of the HTML includes: [CODE] <div class="MenuBar"> <ul>...List of Menu Items</ul> <div class="QuickSearch"><input type="textbox" /><a>Go</a></div> </div> [/CODE] the CSS code: [CODE] * html DIV.MenuBar DIV.QuickSearch { margin-top:-0.3em;color:black;} DIV.MenuBar {font-weight:bold; font-size:1.1em; font-family:verdana, Arial, sans-serif;background:#FFF url("../images/Gradient.jpg") repeat-x bottom left;border:1px solid … | |
Hi peoples, Suppose I have an XML file [CODE] <Application> <Segment1> <ID>Sam</ID> <Fee>2.50</Fee> <Fee>1.00</Fee> </Segment1> </Application> [/CODE] In a nutshell, I want to move the two <Fee> Elements to another section so it looks like this; [CODE] <Application> <Segment1> <ID>Sam</ID> </Segment1> <Segment2> <Fee>2.50</Fee> <Fee>1.00</Fee> </Segment2> </Application> [/CODE] It would invlove … | |
Re: What are the values of the array? And which item in the array do you want to pass to a variable? | |
I have a site that is generated by XSLT. However, a particular div is displaying a top border on IE, but not on other web browsers. How can I get the border to display on other browsers? If I put a margin of 76px around that div, it will display, … | |
Say I have a line of CSS code: DIV.MenuBar {font-weight:bold; font-size:1.1em; font-family:verdana, Arial, sans-serif;background:url("../images/image.jpg") repeat-x;border:1px solid black;} This line of code displays the background image on IE just fine, but all other browsers don't. Is there a reason why other browsers won't display this properly? | |
Re: Use a switch statement instead: switch(grade) { case(grade<100 && grade>90):System.out.println("Your grade is A"); break; case(grade<90 && grade >80):System.out.println("Your grade is B"); break; ... default:System.out.println("Failed"); } Essentially, a switch statement grabs a variable (in this case grade) and compares it against numerous cases. If a case is met, it will run … | |
Re: Check line 3. You may have a spelling error (sname instead of sename)? | |
I have a client-side form and it submits to itself using the 'GET' method. When the form is submitted, I can get the results, but I can't seem to hide the form itself. Is there a way of doing this using Javascript in an ASP file? The document.getElementById("myDiv").style.display="none" doesn't seem … | |
I have a bunch of code [CODE] var xmlDoc = new ActiveXObject("MSXML2.DOMDocument.3.0"); xmlDoc.async=false; xmlDoc.loadXML(sHTTP); var rootElement = new String(xmlDoc.documentElement.Name); Response.Write(rootElement); [/CODE] The problem is that when I try to display the rootElement Node Name, it appears as 'undefined' on my browser. I also tried xmlDoc.documentElement.NodeName. Any help will be greatly … | |
Say I have an element <pets animals="dogs, cats, donkey, turtle, rabbit" /> How can I break the long string to when it hits the comma, it separates the animals into substrings? An example output is shown below: dogs cats donkey turtle rabbit Help is appreciated. Thanks | |
Say I have an XML file as such: <contacts> <contact id="1"> <name>Steven</name> <address>Here</address> <phone>11111111</phone> </contact> <contact id="2"> <name>John</name> <address>There</address> <phone>22222222</phone> </contact> </contacts> ...etc. How can I transform that to HTML with XSLT so that it can be a collapsable/expandable tree? For example, If I click a button that shows contact{@id="1"] … | |
<comment> <content> This is a really long string. It is really long because it contains plenty of characters. The purpose of this exercise is to separate this content element into blocks containing one hundred each </content> </comment> I have the XML file above and I need to use XSLT to … | |
Hi all, I have 2 xsl variables (currentBillDate and lastBillDate), both having access to dates in format of yyyy-mm-dd. How can I calculate the number of days in between both days? Example: 2006-08-28 - 2006-11-06 I tried it this way but it kept giving me NaN <xsl:value-of select="$currentBilldate - $lastBillDate" … | |
Hi all, I have an XML File: staff_record> <staff> <username>user1</username> <password>password1</password> </staff> <staff> <username>user2</username> <password>password2</password> </staff> <staff> <username>user3</username> <password>password3</password> </staff> </staff_record> I have a form (login.html) and I need to use an ASP page (login.asp) to redirect the user to home.asp when they have successfully logged in, based on the … | |
<?xml version="1.0" encoding="ISO-8859-1"?> <catalog> <cd country="USA"> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <price>10.90</price> </cd> <cd country="UK"> <title>Hide your heart</title> <artist>Bonnie Tyler</artist> <price>9.90</price> </cd> <cd country="USA"> <title>Greatest Hits</title> <artist>Dolly Parton</artist> <price>12.90</price> </cd> </catalog> Hi, I'm sure it's very simple, but I'm new at ASP and XML. I just want to know how I … | |
Hi all, I have a Subscription database running and i am trying to insert values into it from an ASP web form when i click on a button with an id of 'confirm'. The name of the field is 'startdate' (date data type) and i need to enter today's date … | |
Hi all, I have an SQL Datasource: [code=asp.net]<asp:SqlDataSource ID="shownMovie" runat="server" ConnectionString="<%$ ConnectionStrings:MovieTix %>" SelectCommand="SELECT movie.title, movie.category FROM [movie],[session],[theatre],[cinema] WHERE cinema.cinemaLocation=theatre.cinemaLocation AND theatre.theatreNumber=session.theatreNumber AND session.movieID=movie.movieID AND ([movieID] = @movieID)"> <SelectParameters> <asp:ControlParameter ControlID="GridView1" Name="movieID" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource>[/code] However, i get the following error message: Ambiguous column name 'movieID'. Basically I … | |
I think this is more of a SQL query but how do I change my Grid Viewso that it displays a currency in the proper format of $ with 2 decimal places only? As it stands it is only like 194.9500 format. Cheers again. | |
Hi peoples. I have a button: [icode]<asp:Button ID="nextView4" runat="server" Text="View Summary" CommandName="NextView" />[/icode] ...a label... [icode]<asp:Label ID="LastNameResult" runat="server" Text="">[/icode] ...and a textbox... [icode]<asp:TextBox ID="TextBoxLastName" runat="server"> </asp:TextBox> [/icode] And basically i need to get the text written in the textbox into the label when the button is pressed. As you can … | |
Hi peoples, I have a textbox: [code=asp.net]<asp:TextBox ID="TextBoxFirstName" runat="server"> </asp:TextBox>[/code] I need to make sure that it captures data for a first name allowing letters from a-z, A-Z and special characters like - (dash) and the space characters. The validator will block all other characters. How do I go about … | |
Hey peoples, im a complete newbie to ASP.NET. Basically i just need to validate a textbox so that only a 4 digit number can be inserted. Wat code should i use (im using VB as my source language and it's not a code-behind). This is the asp textbox validation attributes: … |
The End.