Jump to content

Search the Community

Showing results for tags 'asp'.



More search options

  • 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 49 results

  1. Hi1)my requirement to display the checkbox checked data in table2)first i need to display whole data with checkboxes...then user will check the check boxes and clicks the button...then i neeed to display only the checkbox checked data....here is my code... <%DIM sXML4, oXML4, oNode4, sXMLColor, sDataPoint4sXML4= goBO.QueryXML("SELECT ISS_REL_ID, ISNULL(CONVERT(VARCHAR(11),ISS_RANK , 106),'NA') AS DATEREPORTED,ISS_TITLE AS ISSUESREPORT,ISS_IMPACT AS REPORTEDBY, "&_" ISNULL(CONVERT(VARCHAR(11),ISS_TRG_RS_DATE , 106),'NA') AS DATECLOSED, "&_" C_CATEGORY AS CATEGORY, "&_" CASE WHEN ISS_STATUS ='C' THEN 'Closed' WHEN ISS_STATUS ='O' THEN 'Work In Progress' WHEN ISS_STATUS ='K' THEN 'KIV'END AS "&_" STATUS, ISS_PROGRESS_RPT, "&_" CASE WHEN ISS_STATUS ='C' THEN 'GREEN' WHEN ISS_STATUS ='O' THEN 'ORANGE' WHEN ISS_STATUS ='K' THEN 'ORANGE'END AS COL "&_" FROM v_iss_list WHERE ISS_PROGRESS_RPT='Y' and ISS_REL_ID = 'prj0000152' order by status ","TYPES","TYPE")On Error Resume Nextif goBO.HasError then HandleErrorSet oXML4 = Server.CreateObject("MSXML.DOMDocument")oXML4.async = falseoXML4.loadXML sXML4For each oNode4 in oXML4.documentElement.childNodessDataPoint4 = sDataPoint4 + "<tr>"'sDataPoint4 = sDataPoint4 + "<td align=""center"" style=""font-family:verdana;font-size:11""> <label><input type=""checkbox"" value=""Yes"" name=""myTextEditBox""""></label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("DATEREPORTED") &"</label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("ISSUESREPORT") &"</label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("REPORTEDBY") &"</label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("DATECLOSED") &"</label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("CATEGORY") &"</label> </td>" + vbNewlineif oNode4.getAttribute("STATUS") = "Closed" thendim valval = oNode4.getAttribute("ISSUESREPORT") sDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11;background-color:"& oNode4.getAttribute("COL") &"""> <label>"& oNode4.getAttribute("STATUS") &" <input type=""checkbox"" name=""myTextEditBox"" value=""yes""""></label> </td>" + vbNewlineelse sDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11;background-color:"& oNode4.getAttribute("COL") &"""> <label>"& oNode4.getAttribute("STATUS") &"</label> </td>" + vbNewlineend if sDataPoint4 = sDataPoint4 + "</tr>" + vbNewlineNextSet oXML4 = nothingset oBO = nothing%>SUB GetResults(myTextEditBox)ON ERROR RESUME NEXTIF myTextEditBox.Checked = TRUE THENMSGBOX myTextEditBox.ValueEND IFIF ERR.Number <> 0 THENFOR i = 0 TO myTextEditBox.Length - 1IF myTextEditBox(i).Checked = TRUE THENMSGBOX myTextEditBox(i).ValueEND IFNEXTEND IFON ERROR GOTO 0END SUB<table WIDTH="80%" BORDER="1"><thead><tr><!--<td align="center" rowspan=2 width="5%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold"><input type="checkbox" name="myTextEditBox" value="checked"""></td>--><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Date Reported</td><td align="center" rowspan=2 width="30%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Issues Report</td><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Reported BY</td><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Date Closed</td><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Category</td><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Status</td></tr></thead><tbody class="clsTableBody"><%=sDataPoint4%></tbody></table> <input type="submit" class="clsNavigation" name="Get Checked" value="Checked Data" onClick="GetResults(myTextEditBox)">please can some body help me...Thank you
  2. Please provide the tutorial on ASP.NET with C# based on Visual studio, not on WebMatrix
  3. I want to changedomain.com/profile.php?user_id=100todomain.com/Danolike facebook or youtubehow can I do that in ASP classic or JavaScript??
  4. hello dear, am executing this query i dnt know why its nt working <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/sxsheet2.mdb"cid=Session("a")if cid="" thenset rs=Server.CreateObject("ADODB.Recordset")rs.open "SELECT * FROM tsf_form WHERE empid='" & cid & "'",connelsesql="UPDATE tsf_form SET " sql=sql & "Funded_by1='" & Request.Form("Funded_by1") & "'," sql=sql & " WHERE empid=" & cid & "" on error resume next conn.Execute sql if err<>0 then response.write("No update permissions!") else response.write("Record " & cid & " was updated!") end ifend ifconn.close%>
  5. I'm trying to set a cookie for a user *only* when they click a certain link. My code is in ASP.The code I'm using looks like this: <a href="/backend/" rel="external" id="footlink" onclick="<% Response.Cookies("mobile") = "Full" Response.Cookies ("mobile").Expires = DATE + 30%>"> Full Site </a> But it's not working, it's setting the cookie even though the link isn't clicked. What can I do to fix this?
  6. I am creating a form that is captured and placed in an email. I have managed to do this fine with the exception of one item. when getting the value of a text area it will not maintain the user entered format. Thsi will be important when recieving the information in the email. what I need is this, when a user enters the below info in a textarea;---example---Reference line 1Reference line 2Reference line 3Reference line 4----------------- I need it to popluate in the email the same way. When I pull this infor like a normal input it comes out like this; Reference line 1Reference line 2Reference line 3Reference line 4 can anyone help? I am not able to use PHP in my environment I am working with, as I understand it now. I also do not know much about asp.net
  7. I need help getting a value from a rather complicated JSON string. I am using eval() in a javascript function called json and then doing the following on a classic ASP page: X = {"status": "ok","error": [],"method": "get_metadata","result": [{"metadata": {"med": {"action": "search", "": "0", "type": "int"},"F206": {"action": "search", "": "0", "type": "int"},"sty": {"action": "search", "": "3", "type": "int"},"F701": {"action": "search", "": "0", "type": "int"},"rtl": {"action": "mixed", "": "41.98", "type": "float"},"hev": {"action": "search", "": "0", "type": "int"},"use": {"action": "search", "": "2", "type": "int"},"rank": {"action": "mixed", "": "0.1428", "type": "float"},"dsc": {"action": "mixed", "": "ICON 4 NAVY", "type": "string"},"avl": {"action": "search", "": "46.05", "type": "float"},"whs": {"action": "mixed", "": "20.99", "type": "float"},"phs": {"action": "mixed", "": "1", "type": "int"},"ufac": {"action": "search", "": "0", "type": "int"},"dt": {"action": "mixed", "": "14701", "type": "int"},"con": {"action": "search", "": "28", "type": "int"},"cabu": {"action": "search", "": "0", "type": "int"},"col": {"action": "mixed", "": "300", "type": "int"},"out": {"action": "search", "": "0", "type": "int"}},"filepath": "ICON-4.jpg"}]} dim Meta : set Meta = json(X) 'this is done serverside I am looking to get the value for 'sty' which should be '3'. I can't wrap my head around it in ASP (and yes it has to be done in ASP) thanks
  8. I want to include a form in my website for visitors to enter there name, email and message. I have yet not learnt how to do it so i am looking for help...If sending form data to an email is too complicated, I dont mind having a system in which the form data is written on to a file in my server directory. Eg: a note which i can read manully.
  9. Why?i set permission ady. security even advanced [An error occurred on the server when processing the URL. Please contact the system administrator.If you are the system administrator please click here to find out more about this error.] <html> <head><title>Reading from text files</title></head><body><%Dim fso, f, filespec Set fso = CreateObject("Scripting.FileSystemObject")filespec = Server.Mappath("/tutorials/asp/textfile.txt") Set f = fso.OpenTextFile(filespec,2) f.WriteLine "VBScript and ASP is fun!" Set f = fso.OpenTextFile(filespec,1)Response.write f.ReadLine f.Close%> </body></html>
  10. Hey guys.i got a little problem here. Anyone Error at this test?why i can't Open it by IIS?<html> <head><title>Writing form a text files</title></head><body> <%Dim fso, f, filespec Set fso = CreateObject("Scripting.FileSystemObject")filespec = Server.Mappath("/tutorials/asp/textfile.txt")Set f= fso.OpenTextFile(filespec,2) f.WriteLine("VBscript and ASP are fun!") f.close %></body></html>
  11. salman.pirani

    fetch asp

    my query is i want that a client type a id in text box and then on the submit button the asp will fetch the all data from the server placed in other filed against the id which mention in the text box so what changes i want to do in the code html <form action="fetch.asp" method="post">em id <input name="id" type="text" /></form> asp <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind1.mdb"set rs = Server.CreateObject("ADODB.recordset")sql="SELECT pt, pdate FROM Customers"rs.Open sql, conn%><table border="1" width="100%"><tr><%for each x in rs.Fieldsresponse.write("<th>" & x.name & "</th>")next%></tr><%do until rs.EOF%><tr><%for each x in rs.Fields%><td><%Response.Write(x.value)%></td><%nextrs.MoveNext%></tr><%looprs.closeconn.close%> am getting so much help from this forum am really thankfull to this forum and the people
  12. i want to excutes some value with a varialble these are the code <%z = 85If z=<60 Then Response.Write("The training attended did not make a substantial difference on the employee’s performance. It is requested to nominate the respective employee for training in the same area")If z=80 Then Response.Write("The training attended reflects the employee reception to the subject. Please note personal counseling, refreshers at work, reading material and other such methods can be used to reinforce better impact")If z>80 Then Response.Write("Congratulations your employee’s performance shows above average impact. The training loop for the identified need is considered closed")If z>60 Then Response.Write("The training attended reflects the employee reception to the subject. Please note personal counseling, refreshers at work, reading material and other such methods can be used to reinforce better impact")%> the problem is that its printing both the last 2 codes i want that when value come between 60 to 80 so it will print ("The training attended reflects the employee reception to the subject. Please note personal counseling, refreshers at work, reading material and other such methods can be used to reinforce better impact")
  13. salman.pirani

    asp with MYSQL

    how can i connect asp with mysqlfor example if i want to send first name and last name into the columns of mysql so what will be the code . thanks
  14. Any pro please come here and help me.Please.the tutorial ask me to install "iss7.5" from the control panel and find out the "inetpub" after create a asp.filebut nothing at my control panel. so i download from the web and install by myown. Now the problem. i can't find the inetpub file.anyone can Lead me??what i need to do.i'm stuck T.Tapologize my english's level.i'm improving, thank you.
  15. Hi all, Sorry tried to attach but the upload failed. Anyway I have the above code to connect to my Access database. Now my database has 3 tables: People, Address and Contact. Currently the only way I know to display all three tables is to have 3 vars, loops etc. I was wandering if there was a better way to display all 3 Access tables? PS, all 3 tables have an ID field which I only want to display once (ID is primary key in people and a foreign key in the other two). Any help would be much appreciated
  16. Ok i am trying to build up a template site for my project.and I am using webmatrix 2, and on my way everything went fine, but then an error popped up. WebSecurity is not in this content and i was like what ?? my Register.cshtml and Login.cshtml pages dont run because of this error..and i am thinking to get it fixed how in the world am I gonna fix this ..
  17. Hi, I wonder if someone can help. I am trying within a WebGrid to create a link on the (using the HTML anchor tag) Asset Tag column - so then when the user clicks on an asset tag it directs them to a Display Report page - where it displays a transaction report on that particular asset. I have searched and searched the internet, and found the solution below. However it displays the following error message: Server Error in '/' Application. Object reference not set to an instance of an object.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Here is my code: var db = Database.Open("assetManagement"); var sqlExtractEventDescription = "SELECT * FROM [event]";}<h2>Devices</h2>@{if(addNewOutput.IsEmpty() == false){<p class="informationMessage">@addNewOutput</p><br />}}<a href="addNew.cshtml?type=device" class="button">Add New</a><a href="editExisting.cshtml?type=device" class="button">Edit Existing</a>@{var sql = "SELECT assetTag, imei, serialNumber, eventId FROM [device] ORDER BY assetTag";var data = db.Query(sql);var grid = new WebGrid(data, canPage: true, rowsPerPage: 10);grid.Pager(WebGridPagerModes.NextPrevious);}<div id="webGridDiv">@grid.GetHtml( tableStyle: "userWebGrid", htmlAttributes: new { id = "deviceDataTable" }, headerStyle: "header", alternatingRowStyle: "alt", columns: grid.Columns( grid.Column("assetTag", "Asset Tag", format: @<text><a class="button" href="@Href("~/reports/displayReport.cshtml?type=assetTag&assetTag=" + assetTag")">@assetTag</a></text>), grid.Column("imei", "IMEI"), grid.Column("serialNumber", "Serial Number"), grid.Column("eventId", "Event ID"), grid.Column("", "Edit"))) </div> If someone could perhaps point me in the right direction as to where I am going wrong that would be great. Thanks. Kevin
  18. Hi. Wonder if anyone can help. I have a page (which hopefully when finished) will allow a administration user to go in and update the availability of products. I have done a query first to pull the records from the SQL database, and have then used a loop to display the records in a table: @{ Layout="~/Shared/accountArea.cshtml"; Page.Title="Update Product Availability | Sarnies For All"; if (WebSecurity.IsAuthenticated == false) { Response.Redirect("~/"); } var db = Database.Open("sarniesForAllCurrent"); var extractBread = "SELECT * FROM bread ORDER BY breadId"; if (IsPost) { var sql = "UPDATE [bread] SET available = @0 WHERE @1 = @2"; foreach(var row in db.Query(extractBread)) { } }} <h1>Update Products</h1><p>Here are all the details which we hold on our system about you. Should any of these details change please update them as necessary and click on the Update button below.</p><form method="post" action=""> <table> <tr> <th>ID</th> <th>Description</th> <th>Available</th> <th>Price</th> </tr> @foreach(var row in db.Query(extractBread)) { <tr> <td>@row.breadId</td> <td>@row.breadDescription</td> <td><input type="text" name="@row.breadId" id="@row.breadId" value="@row.available" /></td> <td align="right">£@row.price</td> </tr> } </table> <input type="submit" value="Update" /></form> I am now at a loss at how to then input any changed values back into the SQL database. I have already used the SQL update record for my "Update Profile" page as that is for one record in my user table - but am unsure of the process/code to use to update multiple records at once using the above loop method. Thanks. Kevin
  19. Hi. Quite new to ASP.NET, doing a web design course. I have built a website, and am just building the order part - this is for an assignment. This is the code I have so far: @{ Layout="~/Shared/accountArea.cshtml"; Page.Title="New Order | Sarnies For All"; if (!WebSecurity.IsAuthenticated) { Response.Redirect("~/"); } var db = Database.Open("sarniesForAllCurrent");} <h1>New Order</h1> <p>Here you can create your own sandwich. First of all select your desired bread type from the drop down box below. Then move on to select the filling which you would like in your sandwich/wrap/baguette.</p> <p>All the products shown on this page are in stock, there will be no ringing you informing you that we can't make your order! If you have any issues with this, or have a special request don't hesitate to give us a call or use the Contact Us page.</p> <form id="newOrder" method="post" action="mailto:kevin.upshaw@live.co.uk"> <h2>Choose Bread Type</h2> <fieldset class="newOrder"> <div class="panel"> @{ var extractAvailableBread = "SELECT breadId, breadDescription, price, imgReference FROM [bread] WHERE UPPER(available) = 'YES' ORDER BY breadId "; } @foreach (var row in db.Query(extractAvailableBread)) { <div class="productArea"> <div class="productTitleArea"> <p class="productTitle">@row.breadDescription</p> </div> <div class="productImageArea"> <img class="productImage" src="@row.imgReference" alt="| Sarnies For All" /> </div> <div class="productPriceArea"> <p class="productPrice">£@row.price</p> </div> <div class="productSelectionArea"> <p class="productSelection"><input type="radio" name="breadSelection" value="@row.breadDescription" /></p> </div> </div> } </div> <p class="flip">Open/Close Available Bread Selection</p> </fieldset> <h2 class="clearBreak">Choose Your Filling</h2> <fieldset class="newOrder"> <div class="panel1"> @{ var extractAvailableFilling = "SELECT fillingDescription, price, imgReference FROM [filling] WHERE UPPER(available) = 'YES' ORDER BY filling "; } @foreach (var row in db.Query(extractAvailableFilling)) { <div class="productArea"> <div class="productTitleArea"> <p class="productTitle">@row.fillingDescription</p> </div> <div class="productImageArea"> <img class="productImage" src="@row.imgReference" alt="| Sarnies For All" /> </div> <div class="productPriceArea"> <p class="productPrice">£@row.price</p> </div> <div class="productSelectionArea"> <p class="productSelection"><input type="radio" name="fillingDescription" value="@row.fillingDescription" /></p> </div> </div> } </div> <p class="flip1">Open/Close Available Fillings Selection</p> </fieldset> <h2>Choose Salad Type</h2> <fieldset class="newOrder"> <div class="panel2"> @{ var extractAvailableSalad = "SELECT saladDescription, price, imgReference FROM [salad] WHERE UPPER(available) = 'YES' ORDER BY saladId "; } @foreach (var row in db.Query(extractAvailableSalad)) { <div class="productArea"> <div class="productTitleArea"> <p class="productTitle">@row.saladDescription</p> </div> <div class="productImageArea"> <img class="productImage" src="@row.imgReference" alt="| Sarnies For All" /> </div> <div class="productPriceArea"> <p class="productPrice">£@row.price</p> </div> <div class="productSelectionArea"> <p class="productSelection"><input type="radio" name="saladDescription" value="@row.saladDescription" /></p> </div> </div> } </div> <p class="flip2">Open/Close Available Salad Selection</p> </fieldset> <h2 class="clearBreak">Confirmation</h2> <p>Please confirm your selections and then hit the "Create" order button below. Your order will then be submitted and you will be redirected to your account.</p> <input type="submit" id="submit" name="submit" value="Create Order" /> <input type="reset" id="resetOrderForm" name="resetOrderForm" value="Reset Order Form" /> </form> All the code I have works absolutely fine so far. It queries the "bread" table in the database for "available" bread. The idea I had now is that for each section the user would select one option (hence the use of radio buttons) and when the user selects the option in each section the "*Id" for the option selected is stored in a variable - in which I can then do a SQL INSERT INTO - into the order database. However everything I try code wise has failed on me and wondering if anyone has any suggestions/advice?
  20. hello . i want information about properties and methodas of compare validator in asp.netthanks.my mail: ali.daroudi@gmail.com
  21. I have an asp form where a user can select their campus and class section. I want to use their answers (variables) in the xsl file to pull only those options from the xml file. Anybody have an idea of how to make this work? Here is my xsl file: <?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <table cellpadding="5" cellspacing="0" border="1"> <thead> <tr> <th>Class</th> <th>Type</th> <th>Day</th> <th>Time</th> <th>Tutor</th> <th>Location</th> </tr> </thead> <tbody> <xsl:for-each select="schedule/course[@section='<% response.write(section) %>' and @campus='<% response.write(campus) %>']"> <xsl:sort select="class" order="ascending"/> <tr> <td><xsl:value-of select="class"/></td> <td><xsl:value-of select="type"/></td> <td><xsl:value-of select="day"/></td> <td><xsl:value-of select="time"/></td> <td><xsl:value-of select="tutor"/></td> <td><xsl:value-of select="location"/></td> </tr> </xsl:for-each> </tbody> </table> </xsl:template></xsl:stylesheet> this is my asp file <%dim campus, sectioncampus = request.form("campus")section = request.form("section")'Load XMLset xml = Server.CreateObject("Microsoft.XMLDOM")xml.async = falsexml.load(Server.MapPath("tutor.xml"))'Load XSLset xsl = Server.CreateObject("Microsoft.XMLDOM")xsl.async = falsexsl.load(Server.MapPath("tutor.xsl"))'Transform fileResponse.Write(xml.transformNode(xsl))%>
  22. I want to edit xml from asp and xslt like the demo from w3schools. I am running into some snags.What I am trying to do is create a job list that has an approval function. I already have the form uploading to the xml document that allows users to submit their jobs. I am using xslt to be able to change the status of them from pending to approve. so the new xslt file will display for users all of the approved jobs.Here is my xml file <?xml version="1.0" encoding="utf-8"?><blast><job status='approve'> <position>developer</position> <posted>01/19/2012</posted> <company>JCC</company> <city>Jackson</city> <state>MI</state> <process>webaddress.com</process> <contact>da boss</contact></job><job status='pending'> <position>lunch lady</position> <posted>01/19/2012</posted> <company>high school</company> <city>lansing</city> <state>MI</state> <process>website.com</process> <contact>da boss lady</contact></job></blast> Here is my xslt file that displays the pending jobs for approval <?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <head> </head> <body> <form method="post" action="editBlast.asp"> <h2>Job Approval</h2> <table cellpadding="5" cellspacing="0" border="1"> <tr> <th>Status</th> <th>Approval Action</th> <th>Position</th> <th>Company</th> <th>City</th> <th>State</th> <th>Contact</th> <th>Posted</th> </tr> <xsl:for-each select="blast/job[@status='pending']"> <tr> <td><xsl:value-of select="@status"/></td> <td> <input type="textbox" id="status" name="status" > <xsl:attribute name="value"> <xsl:value-of select="@status"/> </xsl:attribute> </input> Approve </td> <td><xsl:value-of select="position"/></td> <td><xsl:value-of select="company"/></td> <td><xsl:value-of select="city"/></td> <td><xsl:value-of select="state"/></td> <td><xsl:value-of select="contact"/></td> <td><xsl:value-of select="posted"/></td> </tr> </xsl:for-each> </table> <p><input type="submit" id="submit" name="submit" value="Submit"/> <input type="reset" id="reset" name="reset" value="Reset"/></p> </form> </body> </html></xsl:template></xsl:stylesheet> Here is my asp file: <%'-----------------------------------------------------------'The "loadXMLFile" Function accepts two parameters.'strXMLFile - The path and file name of the XML file.'strXSLFilee - The path and file name of the XSL file.'-----------------------------------------------------------Function loadXMLFile(strXMLFile, strXSLFile)'Declare local variablesDim objXMLDim objXSL 'Instantiate the XMLDOM Object that will hold the XML file.set objXML = Server.CreateObject("Microsoft.XMLDOM")'Turn off asyncronous file loading.objXML.async = false'Load the XML file.objXML.load(strXMLFile) 'Instantiate the XMLDOM Object that will hold the XSL file.set objXSL = Server.CreateObject("Microsoft.XMLDOM")'Turn off asyncronous file loading.objXSL.async = false'Load the XSL file.objXSL.load(strXSLFile) 'Use the "transformNode" method of the XMLDOM to apply the'XSL stylesheet to the XML document. Then the output is'written to the client.Response.Write(objXML.transformNode(objXSL))End Function '-----------------------------------------------------------'The "updateXML" Function accepts one parameter.'strXMLFile - The path and file name of the XML file.'-----------------------------------------------------------Function updateXML(strXMLFile)'Declare local variables.Dim objDomDim objRootDim objFieldDim x 'Instantiate the XMLDOM Object.set objDOM = Server.CreateObject("Microsoft.XMLDOM")'Turn off asyncronous file loading.objDOM.async = false'Load the XML file.objDOM.load strXMLFile 'Set the objRoot variable equal to the root element of the'XML file by calling the documentElement method of the'objDOM (XMLDOM) object.Set objRoot = objDom.documentElement 'Iterate through the Form Collection and write the'submitted values to the XML file.For x = 1 to Request.Form.Count 'Check see if "btn" is in the submitted value, if so, 'it is a button and should be ignored. If instr(1,Request.Form.Key(x),"btn") = 0 Then 'Set objField variable equal to a field_value element by 'calling the selectSingleNode method of the objRoot '(documentElement) object. The SelectSingleNode method 'accepts a string parameter for querying the XML document. 'In this case, the current value of the key property of 'the Form Collection is used to find the appropriate 'field_value element (more on this later). Set objField = objRoot.selectSingleNode("job[@status='" & _ Request.Form.Key(x) & "']") 'Set the text property of the objField (field_value) 'element equal to the value of the current form field. objField.Text = Request.Form(x) End IfNext 'After the XML file has been edited, is must be saved.objDom.save strXMLFile 'Release all of your object references.Set objDom = NothingSet objRoot = NothingSet objField = Nothing 'Call the loadXMLFile method, passing in the newly edited'XML file and the updatedcontact.xsl style sheet. This will'allow the client to see the edited information. More on the'updatedcontact.xsl file later.loadXMLFile strXMLFile,server.MapPath("blast_approved.xsl")End Function 'Test to see if the form has been submitted. If it has,'update the XML file. If not, transform the XML file for'editing.If Request.Form("btnSubmit") = "" Then loadXMLFile server.MapPath("../../forms-results/xml/text.xml"), _ server.MapPath("blast_pending.xsl")Else updateXML server.MapPath("../../forms-results/xml/text.xml")End If%> and finally my xslt file to display the approved jobs <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <body><h2>Job Blast</h2> <table cellpadding="5" cellspacing="0" border="1"> <thead> <tr> <th>Position(s)</th> <th>Company</th> <th>City</th> <th>State</th> <th>Contact Information</th> <th>Posted</th> </tr> </thead> <tbody> <xsl:for-each select="blast/job[@status='approve']"> <xsl:sort select="posted" order="descending"/> <tr> <td><xsl:value-of select="position"/></td> <td><xsl:value-of select="company"/></td> <td><xsl:value-of select="city"/></td> <td><xsl:value-of select="state"/></td> <td><xsl:value-of select="contact"/></td> <td><xsl:value-of select="posted"/></td> </tr> </xsl:for-each> </tbody> </table> </body> </html></xsl:template></xsl:stylesheet> Thanks for your help!
  23. Hi all, I am trying to display an RSS feed on my ASP website. Currently, the date is displayed as "Dec 07 2011." I would like to display it as "December 7, 2011." Here is the code I've put together so far: <html><head><title>RSS Feed Using ASP Classic - For Texas Longhorns Football Schedule from TicketCity.com</title><style> *{font-family:verdana;} td{vertical-align:top;padding:5px 5px 5px 5px;}</style></head><body><%' change the RSSURL variable to the exact URL of the RSS Feed you want to pullRSSURL = "http://blog.surepayroll.com/feed/?alt=rss"Dim objHTTP ' this object is used to call the RSS Feed remotelyDim RSSURL,RSSFeed ' these variables hold the URL and Content for the RSS FeedDim xmlRSSFeed ' this variable hold the XML data in a DOM ObjectDim objItems,objItem, objChild ' these variables are used to temporarily hold data from the various RSS ItemsDim title,pubdate,description,link ' these are local variables that will hold the data to be displayedDim OutputHTML_1,OutputHTML_2,OutputHTML_3 ' these variables will hold the HTML that was converted from the RSS Feed' this code requests the raw RSS/XML and saves the response as a string <RSSFeed>Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")objHTTP.open "GET",RSSURL,falseobjHTTP.sendRSSFeed = objHTTP.responseText' this code takes the raw RSSFeed and loads it into an XML ObjectSet xmlRSSFeed = Server.CreateObject("MSXML2.DomDocument.4.0")xmlRSSFeed.async = falsexmlRSSFeed.LoadXml(RSSFeed)' this code disposes of the object we called the feed withSet objHTTP = Nothing' this is where you determine how to display the content from the RSS Feed' this code grabs all the "items" in the RSS FeedSet objItems = xmlRSSFeed.getElementsByTagName("item")' this code disposes of the XML object that contained the entire feedSet xmlRSSFeed = Nothing' loop over all the items in the RSS FeedFor x = 0 to objItems.length - 8 ' this code places the content from the various RSS nodes into local variables Set objItem = objItems.item(x) For Each objChild in objItem.childNodes Select Case LCase(objChild.nodeName) Case "pubdate" pubDate = objChild.text Case "title" title = objChild.text Case "link" link = objChild.text Case "description" description = objChild.text End Select Next ArrayTemp = split(pubDate, " ") pubDate2 = ArrayTemp(2) & " " & ArrayTemp(1) & " " & Cint(ArrayTemp(3)) ' Here are some various display samples. OutputHTML_1 = OutputHTML_1 & pubDate2 & "<br /><a href=""" & link & """>" & title & "</a><br /><br />" OutputHTML_2 = OutputHTML_2 & "<a href=""" & link & """>" & title & "</a><br />" OutputHTML_3 = OutputHTML_3 & "<a href=""" & link & """>" & title & "</a><hr />"Next%><!-- This is the HTML Layout that will render content from the RSS Feed -->Here is the output, with content provided by the RSS Feed located at:<br /><%=RSSURL%><hr /><table border="1"><tr> <td>Ouput Style 1</td> <td>Ouput Style 2</td> <td>Ouput Style 3</td></tr><tr> <td><%=OutputHTML_1%></td> <td><%=OutputHTML_2%></td> <td><%=OutputHTML_3%></td></tr></table></body></html> I've been looking for a script online as I'm not skilled enough to create code of my own. Can anyone give me some advice?
  24. Sir; I am developing student muster roll for my school.See below given part of the files for the problem that I am facing. 1) grade_details.asp : ( Form with the values ) <%Do while not Rs.EOF if grade = Rs("student_homegrade") then Response.Write "<OPTION NAME = stuid VALUE = '" & RS("student_id") & "' SELECTED>" 'stuid is not passed to enter_stu_recs.asp. I am making mistake somewhere. Please guide. Response.Write replace(Rs("student_name"),"""","'") & "</Option>" Rs.MoveNext else Response.Write "<OPTION NAME = stuid VALUE = '" & RS("student_id") & "'>" Response.Write replace(Rs("student_name"),"""","'") & "</Option>" Rs.MoveNext end ifloop%> 2) enter_stu_recs.asp ( The page where the values are to be transferred ) <% Dim objExec,dayab,monthab,yearab,stu_id,abdayab=request.form("rdate")monthab=request.form("rmonth")yearab=request.form("ryear")stu_id=request.form("stuid")ab=request.form("absent")%> <hr><%response.write dayab %><hr><%response.write monthab%> <hr><%response.write yearab%> <hr><%response.write stu_id%> ?<hr><%response.write session("username")%><hr><%response.write ab%><hr>---------------------------------------------------- Output as shown below: 2392011(THIS CALUE IS NOT SHOWN)?12345ABSENT Iam facing a problem. Values from, form in grade_details.asp file show up in enter_stu_recs file except stuid. ( Student's id is not passed to the enter_stu_recs from grade_details.) Will somebody help me out with this problem? Thanks in advance. Squareonthehypotenuse.
×
×
  • Create New...