473,320 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Opening a Xml in a new window

Hi Friends,

I'm getting a string that contains the Xml content, and i ve loaded tht string and opened it in a new window, but its just displayed as Text rather in an XML format, please help me out, have been breaking my head on this for days...

I'm Pasting my code below,
Expand|Select|Wrap|Line Numbers
  1.     function openxml()
  2.     {
  3.         alert('In');
  4.         myWindow = window.open("", "XML", 'menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,status=yes,location=yes');
  5.         var xml = document.getElementById("headerForm:fileDisplay").value;
  6.         myWindow.document.open ('content-type: text/xml');
  7.         myWindow.document.write(xml);
  8.         myWindow.document.close();
  9.     }
  10.  
Please post the solution as fast as possible...

Thanks in Advance,
Vikram.
Feb 27 '08 #1
1 7083
hsriat
1,654 Expert 1GB
Hi Friends,

I'm getting a string that contains the Xml content, and i ve loaded tht string and opened it in a new window, but its just displayed as Text rather in an XML format, please help me out, have been breaking my head on this for days...

I'm Pasting my code below,
function openxml()
{
alert('In');
myWindow = window.open("", "XML", 'menubar=yes,toolbar=yes,resizable=yes,scrollbars= yes,status=yes,location=yes');
var xml = document.getElementById("headerForm:fileDisplay"). value;
myWindow.document.open ('content-type: text/xml');
myWindow.document.write(xml);
myWindow.document.close();
}

Please post the solution as fast as possible...

Thanks in Advance,
Vikram.
Not sure, but may be your DOCTYPE for XML is missing or invalid.

Is it working fine if you open it without the JS code but giving the address in the browser?
Feb 27 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dena Leiter | last post by:
I want to send people to a new page using a redirect but I want a new window to open. Is this possible? I've tried this: <meta http-equiv="refresh"...
44
by: Carlos Andr?s | last post by:
Hi everybody. I've got a problem. I'd like to avoid opening a new window when you have pressed the shift key and you click in the left button of the mouse. I've tried the next solution, in the...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
2
by: Keshav Gadia | last post by:
Hi, I am an ASP.net newbie. I am writing a user control that is made up of datagrid with one of the columns opening a new window to display some details on click of the set image. I have...
5
by: Roger Withnell | last post by:
This is a framed webpage with the navigation bar in "NavBar" and the main window in "Main". When opening a new page in "Main" from "NavBar" with: function OpenFrameWindow(src) { var...
3
by: Larry Bud | last post by:
Wanting to use a technology I saw for one of our apps. We have several apps that a user logs in at on the same page. The app is determined by a drop down. User credentials are checked,...
3
by: Bonzol | last post by:
Vb.Net 2003, 1.1. Web application. Hey there I have this, Response.Redirect("FileFiew.aspx") to go to a new page, but how do I open that page in a new window? So I will have 2 pages...
1
by: sandy21380 | last post by:
Hello, Is there a way of opening an Access form without opening the Access window? Right now when I open the form, the Access window is a lot bigger than the form so I have to resize the Access...
1
by: coolsidsin | last post by:
I have a apsx form (Form A), which on submiting does a time consuming task. So i want to open a new aspx window (Form B) in which I want do do that time consuming task and show progress to the user...
0
by: bbrewder | last post by:
I am struggling with some MSAccess automation issues. Basically, we have a .Net application that uses MSAccess for reporting (legacy code). We are able to launch MSAccess fine and even work with...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.