HTML - Form Returns Xml Data, How Do I Display Nicely?
Greetings everyone.
I have a form which i use to send information to one of our partners via POST. What the partner then returns is an XML response that looks like: Code: <?xml version="1.0" encoding="utf-8"?> <SendSMSResponseType xmlns="https://partnersite.com/"> <ServiceResult>ACCEPTED or MESSAGE_TOO_LONG or INVALID_CREDENTIALS or REJECTED or NOTFOUND</ServiceResult> <SequenceNumber>int</SequenceNumber> </SendSMSResponseType> what i want to do is have the form posted to an iframe in my site, and then return just the ServiceResult (or another message depending on what the ServiceResult is...), but i'm not certain how to do that. i have it posting to the iframe just fine, but it just displays the XML - which isn't very user friendly... How can i format their response, or parse their response and display my own message? I've got PHP and AJAX already happening on the page, so using either one is a possibility, i just don't know where to even start for some reason... Similar TutorialsSo I've got a form with some input text. In addition to the data in the input text I want to send some other data that has already been predetermined on initial page load. How would I declare the other data within the form element? Thanks Hi everybody! I have a jsp page with a form and a table. My aim is that when i press the submit button of the form,collect the data and fill the table with it. I am working with J2EE. I have already collected the data in a Java class,but I dont know how to introduce this data into the table. Best Regards! I have been using my site for some time now and it carries the image name over when you clicked on purchasing the print. It carries it still, but when you submit the form, the image name isnt there and the form errors because the field is blank. Here is the site: www.sthompsonphoto.com I cant seem to figure out why it disappears when you click Submit? Any help would be great! Hi, I am very, very new to XML and I am not able to get my .xsl data file to read into the table in my .xsl file. Thank you, kriscann This is what I need: User opens HTML file---->data from XML file is displayed in order in HTML file This is my problem: User opens HTML file----> Only the heading "current log" and "tstamp" and "entry" are displayed I took the HTML and SXL from http://www.w3schools.com/xsl/xsl_client.asp HTML: Code: <html> <body> <script type="text/javascript">// Load XML var xml = new ActiveXObject("Microsoft.XMLDOM") xml.async = false xml.load("CurrentLog.xml")// Load XSL var xsl = new ActiveXObject("Microsoft.XMLDOM") xsl.async = false xsl.load("CurrentLog.xsl")// Transform document.write(xml.transformNode(xsl)) </script> </body> </html> XML: Code: <?xml version="1.0" standalone="yes" ?> - <IncrepDataset xmlns="http://tempuri.org/IncrepDataset.xsd"> - <Control> <Control_ID>0</Control_ID> <Name>DocViewer</Name> <Filename>docviewer.dll</Filename> <Icon>doc</Icon> <IncrepLoadable>true</IncrepLoadable> <Version>4.0.0.28546</Version> <TStamp>2006-11-06T18:00:09.4160070-06:00</TStamp> </Control> - <Control> <Control_ID>-1</Control_ID> <Name>RIDS</Name> <Filename>ridswrapper.dll</Filename> <Icon>tool</Icon> <IncrepLoadable>true</IncrepLoadable> <Version>4.0.0.28559</Version> <TStamp>2006-11-06T18:00:32.8518090-06:00</TStamp> </Control> - <Control> <Control_ID>-2</Control_ID> <Name>Explosives</Name> <Filename>atfwrapper.dll</Filename> <Icon>tool_bomb</Icon> <IncrepLoadable>true</IncrepLoadable> <Version>4.0.0.28559</Version> <TStamp>2006-11-06T18:01:01.2952610-06:00</TStamp> </Control> - <Control> <Control_ID>-3</Control_ID> <Name>ChecklistViewer.Bomb Response</Name> <Filename>checklistwrapper.dll</Filename> <Icon>tool_checklist</Icon> <IncrepLoadable>false</IncrepLoadable> <Version>4.0.0.28559</Version> <TStamp>2006-11-06T18:01:21.5461976-06:00</TStamp> </Control> - <DataType> <Datatype_id>1</Datatype_id> <name>String</name> <description /> </DataType> - <IncidentLog> <IncidentLog_ID>-10</IncidentLog_ID> <TStamp>2006-11-06T18:01:26.7541536-06:00</TStamp> <Entry>- 'COMMENCE IED SOP/ERG ACTIONS. GATHER ALL INFO.' checked</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> <Control_ID>-3</Control_ID> </IncidentLog> - <IncidentLog> <IncidentLog_ID>-11</IncidentLog_ID> <TStamp>2006-11-06T18:01:26.8142454-06:00</TStamp> <Entry>- 'SET INITIAL EXCLUSION AREA.' checked</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> <Control_ID>-3</Control_ID> </IncidentLog> - <IncidentLog> <IncidentLog_ID>-12</IncidentLog_ID> <TStamp>2006-11-06T18:01:26.8943678-06:00</TStamp> <Entry>- 'MAKE ALL NOTIFICATIONS.' checked</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> <Control_ID>-3</Control_ID> </IncidentLog> - <IncidentLog> <IncidentLog_ID>-13</IncidentLog_ID> <TStamp>2006-11-06T18:01:26.9644749-06:00</TStamp> <Entry>- 'IDENTIFY ON-SCENE COMMAND (OSC)/ COMMAND POST (CP) LOCATION.' checked</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> <Control_ID>-3</Control_ID> </IncidentLog> - <IncidentLog> <IncidentLog_ID>-14</IncidentLog_ID> <TStamp>2006-11-06T18:01:38.6222841-06:00</TStamp> <Entry>Incident Summary selected</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> </IncidentLog> </IncrepDataset> XSL: Code: <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Edited with XML Spy v2006 (http://www.altova.com) --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/> <xsl:template match="/"> <html> <body> <h2>Current Log</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">TStamp</th> <th align="left">Entry</th> </tr> <xsl:for-each select="tstamp/entry"> <tr> <td><xsl:value-of select="TStamp"/></td> <td><xsl:value-of select="Entry"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> I have two other versions of the HTML file that don't require XSL but they only half work. One displays everything I want but not in the right order the other displays in the right order but only displays the first TStamp and Entry. Dear all, May I have sulotion to solve my problem in: I have one of web page product_A.html. It have product information and the price. May I link with xls(price_list.xls) to update the product price with out edit the html each time? It is better with out .net/ php/ Java ..etc May I use html only to do that? product_A.html and price_list.xls save it web server do not support MYSQL / MSSQL current I need chage it each time: http://www.nova-etrade.com/allpmp.html Thank you very much. Hi all, I have a simple newsletter form, so just the email field and a submit, what I would like to do is to send this data to a larger subscriber form, so one that has name, email (with the data previously entered already added), list to subscribe to etc. Can this be done? Thanks I have a simple signup form on my site that I want to pass the input to the larger signup form. Here is the code for the simple form: <form action="http://bigdogcattle.com/?a=Cattle_Mailing-List_SignUp" method="post" accept-charset="UTF-8"> The larger signup form is located he http://bigdogcattle.com/?a=Cattle_Mailing-List_SignUp I want the email address from the simple form to move to the larger form when the submit button is pressed. Ideas? Hi! I'm new to creating websites and this forum. I recently created a website with a "mailto" form in Dreamweaver MX 2004. I have a fairly new laptop that came with Windows Vista and IE 7. When I go to display the form, you cannot scroll to the bottom of the form. The window just ends. However, if you display the form in Fire/Fox or an earlier version of IE you can scroll down to the end of the form. I searched the MS website FAQ's but there was noting listed for this particular issue. Does anyone know how to fix this? Or is there a script I can add to the form code for it to display properly in IE 7? Or is there a patch (assuming it is a IE 7 issue) available? Any help or insite to this problem would be most appreciated! Thanks, Sonja I have a form where a user makes selections from selection lists. As they make selections a counter displayed in the form keeps them up to date with how many selection they have made. To display this counter I have been using an input box as follows; <input type="text" id="counter" name="counter" value="0" size="2" /> A JavaScript function updates the value of this input box every time the user makes another selection from any selection list on the form. The JavaScript funtion is called from the selection lists' attribute declaration as follows; onchange="calllFunction()" However I feel the input box is not the right element to use to display the counter's value. An input box does the job but it allows the user to enter stuff in it, and I don't want this to be allowed. Any suggestions? Dear all, I am new to html. If I create a html form, after a visitor input the data to the form and click submit, this form will send data to another web page with the form data, e.g. http://www.mydomain.com/confirm.html...m&name=someone What is the html command to display the passed form value in the destination page? e.g. If I want to show the following: Hi, someone, You subscription with email abc@yahoo.com has been received. Thanks! Hello all, I searched the board for an answer and didn't have any luck. This makes me wonder if what I want to do is possible. I have a webpage that uses divs to section the page into four sections (top, bottom, content, and navigation). On the navigation side is where users select a set of form options and based on those options details should display in the content section. Frames is not an option as we're trying to get away from frames and I need to make subsequent pages for other things without the frames. Thanks in advance for you helpm ~ML Hello all! I've been lurking in these forums for a good while as I've recently started dabbling in web design. As such, I find myself stumped. Despite my relatively thorough search on Google I've yet to find anything that points me in the right direction. I assume I'm simply not using the right terminology in my searches. Hopefully the community here can help me out. In short I have a chat applet that I'm trying to get a "Report Member" function working in. Users can right click on a member and select "Report Member". From there I have a page on my site called Report.htm and that particular URL. The chat applet provides information on the end of that URL. Here is an example URL: Code: http://www.siteurl.com/report.htm?username=JohnDoe&roomname=Main+Room&showuser=2264826&uid=2264826&srcuid=2264826&srcusername=JaneDoe Essentially, JaneDoe is reporting JohnDoe for who knows what. When the report is made they're sent to the placeholder report page with all the details at the end of the URL. If possible, I'd like the Report.htm page to have a form in it where the information for the form is prefilled (and uneditable) from the information provided by the URL. Essentially the form would roughly look like the following: Username of Member: JohnDoe Your Username: JaneDoe Room: Main Room Report: (This would be the only editable section) After filling out the report they'd hit submit and it'd get emailed to the moderating staff. Is this something handled on the server side of things? If so I've potentially posted this in the wrong subforum, but I assumed it was something that could be done via form tags in HTML (though I do know some script would be needed for the actual submission of the form). My server uses PHP, if that information is useful. With all that said, is this possible? If so, what can help get me started in learning how to do this? I've spent a good deal of time looking around on Google but nothing seems to be quite what I want or, more likely, I'm simply not using the right search terms. Any help would be greatly appreciated! I got this form in simple html HTML Code: <form name="input" action="display.html" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> </form> When the user clicks the submit button the user should be directed to display.html and should display the name he entered on the form previously. I want the coding in either javascripts or html. y javascript or html ? I want to upload form to a site, so that users can download the form and then fill that form and view what they entered.. To fill the form when running in local machine, you cannot have php scripts, Not all will hav ephp installed in their Pc's.That's y i want in javascript or html... I want to know whats the script to be in display.html page to view the name entered by the user on the form page.......... This is a problem that i driving me crazy. I have this forms on my website that people can use to post comments. They have one textarea that they should write their name in and another that they should write their comment. I try to make the default text "Namn" and "Kommentar", but only "Namn" is showing in firefox. The weird thing is though, that if I change places between the two textareas, both are showing fine. I provide the site with the source code, and for a quicker check, the code for the two textareas. <textarea name="db_comment_namn" type="text" value="Namn" rows="1" cols="15" style="font-size: xx-small; font-family: Verdana; font-weight: Bold; font-style: Italic; border: 1px inset #CCCCCC; padding: 1px;">Namn</textarea> <textarea name="db_comment_kommentar" type="text" value="Kommentar" rows="1" cols="50" style="font-size: xx-small; font-family: Verdana; font-weight: Bold; font-style: Italic; border: 1px inset #CCCCCC; padding: 1px;">Kommentar</textarea> http://foto.jaxell.se Thanks in advance. I have a html form which calls a servlet when a submit button is clicked.Now,I want to display a CONFIRM FORM before calling the servlet. The form must call the servlet only if the OK button is clicked in the confirm form. Any suggestions please!! Hi there, quite a lame question i think.. Anyone have on idea on a script, (which i believe should be quite simple) which can extract the line from an csv file and show ot in a html page at search request. In more details it should look like this : somebody enters some word in simple html search form and pushes search button, the script searches through the csv file and copies whole line with matchin word in the web page. Or maybe there is a simplier way, since csv file can be converter to any other format... Thanks in advance. Hey all, This is probably a stupid question, but it's driving me nuts - I have a simple form with 2x file uploads on it, and when the user clicks a button a PHP script is run. This scrip is picked up by checking the global $_POST variable for 'upload'. This works fine and my PHP script does the upload when I only select one file (using either one), but when both are filled in for some reason the global $_POST variable is empty, so my script will not run. Before looking down the PHP route I'm wondering if everything is ok with my form, or if there is some error that I am missing that is causing this problem? Any help is greatly appciated. Thanks. Code: <form action="" method="post" name="client-balances-selection" enctype="multipart/form-data"> <div id="current-balances"> <h3>Current client balances</h3> <input type="file" name="current_balances" class="file_upload" /> </div> <div id="past-balances"> <h3>Past client balances</h3> <input type="file" name="past_balances" class="file_upload" /> </div> <input type="submit" name="upload" class="button-primary" value=<?php _e('Compare'); ?> /> <input type="submit" name="delete" class="button-delete" value=<?php _e('Delete old files'); ?> /> </form> hi, i have a form wich consist username and password. i want to read these content and store in the local system( my system) also i want to read the same thing from the file. can any one please send me the code for that. Many thanks in advance... Ok, this sounds extremely easy but I'm more of a designer and less of a coder. I'll try and explain what I want to accomplish. I spent the better part of the afternoon yesterday searching for a solution. Alas, I need some assistance! We have a page where users can view a report in a PDF format from a drop down. Also on that page we need to have a place where they can select an option from a drop down and email the PDF to them. Now, we have the link set up. I can take a sample link, add my email address to the end of it, hit enter and it shoots me an email. The question is how can I take what the user inputs into a form and pass it into a URL. All that needs to happen is to send the user to that URL and have the URL be correct. At that point the email gets sent automatically. My best attempt so far gets me to the URL but things like &, =, etc are replaced by %3D and %26. The URL won't work that way. I'll post that code: Code: <FORM METHOD="LINK" ACTION="https://fusion.bennettware.com:4443/drivers/getfueltaxreport?"> <select name="unitfuel"> <option selected>Select Month</option> <option value="year=09&month=01&reportName=UnitTax">January 2009 </option> <option value="year=09&month=02&reportName=UnitTax">February 2009</option> </select> Type in your email address: <INPUT TYPE="text" NAME="&email="> <INPUT TYPE="submit" VALUE="Send email"> </FORM> Here is what I get in the URL: (sorry had to place it in html tags because the link was only half showing up.) HTML Code: https://fusion.bennettware.com:4443/drivers/getfueltaxreport?unitfuel=year%3D09%26month%3D01%26reportName%3DUnitTax&%26email%3D=test@testmail.com Also, notice that "unitfuel" gets appended to the URL as well. It gets passed into the URL and that will likely cause the report to fail. The URL needs to look like this: HTML Code: https://fusion.bennettware.com:4443/drivers/getfueltaxreport?year=09&month=01&reportName=UnitTax&email=myemail@mydomain.com If a user were logged in and ran that link, a page would appear stating that an email had been sent. So, all I need it for the input to get placed into the URL without all of the additional characters. The report cannot run when the URL looks like the above and thus cannot get emailed. Also, that link probably won't work since the site is password protected, so you'll likely get a 'page cannot be displayed' error if you try to access it. Solution is likely simple, then again, my luck would have it not being so simple! I thank you all in advance for your help. At least a point in the right direction would be nice. |