Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8890589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:32:13+00:00 2026-06-14T22:32:13+00:00

My code is: var userName = document.getElementById(txtSearch).value; var xhr = new XMLHttpRequest(); xhr.open(POST, http://www.rest.net/services/abc.svc/json/GetXml,

  • 0

My code is:

var userName = document.getElementById("txtSearch").value;
    var xhr = new XMLHttpRequest();
    xhr.open("POST", "http://www.rest.net/services/abc.svc/json/GetXml", true);
    xhr.responseType = "text";
    xhr.setRequestHeader("Content-Type", "text/xml;charset=UTF-8");
    var packet = '<?xml version="1.0" encoding="utf-8" ?><CompanyRequest xmlns="http://schemas.datacontract.org/2004/07/abc.DomainModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><CompanyName>company</CompanyName></CompanyRequest>';
    xhr.onreadystatechange = function () {
        if (xhr.readyState==xhr.DONE) {            
            var parser = new DOMParser();
            var response = parser.parseFromString( xhr.responseText, "text/xml");
            var n = response.getElementsByTagName("CompanyResponse");               
            for (var i = 0; i < n.length; i++) {
                var p = n[i].getElementsByTagName("CompanyList1");
                for (var j = 0; j < p.length; j++) {
                    var l = p[j].getElementsByTagName("Company");
                    for (var k = 0; k < l.length; k++) {
                        var a = l[k].getElementsByTagName("Id")[0].firstChild.nodeValue;

                        if (a != null) {
                            sessionStorage.setItem(1, a);
                            WinJS.Navigation.navigate("Search.html");
                        }
                    }
                }
            }
        }
    }

    xhr.send(packet);

I am very new to this. I want to navigate to search.html page on button click. But it is not going so…what’s wrong with it i cant understand…help me..

Thanks in advance……….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:32:14+00:00Added an answer on June 14, 2026 at 10:32 pm

    If you are using the Navigation Template from visual studio, then you need to:

    • Make sure your Page is registered with that name
    • Make sure that Page control is being instantiated

    The WinJS.Navigation namespace is not intended for navigating the application to internet-urls; it’s intended to manage navigation within the application e.g. files already in your package.

    If your trying to navigate the whole application, you can set window.location.href to the full URL you wish to navigate to. This will tear down your current script state and move you wholesale to that page.

    If you really are using single page navigation, I suggest stepping into the navigate call you have, and seeing where it leads you to verify you’ve correctly registered the destination & the Navigation Template sample code is doing it’s work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

function getUsername() { var userName = document.form.screen_name.value; document.getElementById(display).innerHTML = userName; var apiName = https://api.twitter.com/1/users/lookup.json?screen_name=
I have the following JavaScript code - function addOnClickEventHandler() { var userNameElement = document.getElementById(currentUser);
<button type=button value=click me onclick=check_me(); /> function check_me() { //event.preventDefault(); var hello = document.myForm.username.value;
The code: var Appointment = Backbone.Model.extend({}); var appointment = new Appointment(); appointment.set('title', 'My knee
My code: var parent = document.createElement('div'); var pen = document.createElement('div'); var dog = document.createElement('div');
This is my code: var boo = new RegExp(\\Bis\\B,gi); var result = boo.exec(this AisA
Ok: I have HTML code such as: <form method=post> <ul> <li> <label for=username>Username</label> <input
Here is the JavaScript I am using: <script type=text/javascript> $(document).ready(function(){ var left_pos= document.getElementById('login_button').offsetLeft; var
var data; $(document).ready(function(){ var rows = document.getElementById(orderlist_1).rows; var cell = rows[rows.length - 1].cells[3]; data
Code: var result = db.rows.Take(30).ToList().Select(a => AMethod(a)); db.rows.Take(30) is Linq-To-SQL I am using ToList()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.