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 8206953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:50:54+00:00 2026-06-07T08:50:54+00:00

This is my html page. <body> <div id=form1> <root xmlns:NS=’www.yembi.com’> <NS:ENTRY Action=’Users’> <div class=colm1>

  • 0

This is my html page.

<body>
<div id="form1">
    <root xmlns:NS='www.yembi.com'>
    <NS:ENTRY Action='Users'>
    <div class="colm1">
        <NS:DISPLAY datafield="FirstName"></NS:DISPLAY>             
    </div>
    <div class="colm2">
        <NS:Text datafield='FirstName'/>
    </div>
    <div class="colm1">
        <NS:DISPLAY datafield="MiddleName"></NS:DISPLAY>
    </div>
    <div class="colm2">
        <NS:Text datafield='MiddleName'/>
    </div>
    <div class="colm1">
        <NS:DISPLAY datafield="LastName"></NS:DISPLAY>
    </div>
    <div class="colm2">
        <NS:Text datafield='LastName'/>
    </div>
    <div class="colm1">
        <NS:DISPLAY datafield="Phone"></NS:DISPLAY>
    </div>
    <div class="colm2">
       <NS:Text datafield='Phone'/>
    </div>
    <div class="colm3">
        <NS:BUTTON ></NS:BUTTON>
    </div>
    </NS:ENTRY>
    </root>
</div>

I wanna get this html into a temp variable. so tried like below

var Text = $("#form1").html();

I am getting full html content, But with small exceptions.
It not displaying the double quotes in div attributes.

I am getting the below output:

<ROOT xmlns:NS='www.yembi.com'>
    <NS:ENTRY Action='Users'>
    <DIV class=colm1>
        <NS:DISPLAY datafield="FirstName"></NS:DISPLAY>             
    </DIV>
    <DIV class=colm2>  // Here it automatically removes the double quotes. how to retain this double quotes ?
        <NS:Text datafield='FirstName'/>
    </DIV>
    <DIV class=colm1>
        <NS:DISPLAY datafield="MiddleName"></NS:DISPLAY>
    </DIV>
    <DIV class=colm2>
        <NS:Text datafield='MiddleName'/>
    </div>
    <DIV class=colm1>
        <NS:DISPLAY datafield="LastName"></NS:DISPLAY>
    </DIV>
    <DIV class=colm2>
        <NS:Text datafield='LastName'/>
    </DIV>
    <DIVclass=colm1>
        <NS:DISPLAY datafield="Phone"></NS:DISPLAY>
    </DIV>
    <DIV class=colm2>
       <NS:Text datafield='Phone'/>
    </DIV>
    <DIV class=colm3>
        <NS:BUTTON ></NS:BUTTON>
    </DIV>
    </NS:ENTRY>
    </ROOT>

As mentioned above it automatically remove the double quotes in DIV. How to retain this double quotes??

  • 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-07T08:50:55+00:00Added an answer on June 7, 2026 at 8:50 am

    I suspect you are using jQuery or an equivalent:

    See here from the documentation:
    “This method uses the browser’s innerHTML property. Some browsers may not return HTML that exactly replicates the HTML source in an original document. For example, Internet Explorer sometimes leaves off the quotes around attribute values if they contain only alphanumeric characters.”

    http://api.jquery.com/html/

    So this is really browser dependent. You could use a javascript regex to make sure the quotes are where you need them to be:
    Regex to put quotes for html attributes

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

Sidebar

Related Questions

On this page: http://www.anasiamusic.com/bio.html in the body text (Ana Sia's DJ crate is a
The main structure of the page is like this: <html> <body> <div id=Menu> <h1>Menu</h1>
This is my first HTML page: <!--first.html--> <html> <body> <div data-role=page data-theme=a data-url=first id=first>
I open a html page with a myApp.js included like this: <html> <body> ......
imagine this html on a page <div id=hpl_content_wrap> <p class=foobar>this is one word and
I have this HTML in my page <div id='masterDIV'> <div id='divItemNumber'>23</div> <div id='divDesc'>This is
In this html I basically have a sidebar-div and a page-div with the header,
This is the code I have: <body> <form id=form1 runat=server> <div> <asp:TextBox ID=txtInsertComments CssClass=expanding
my master page is inside a form runat=server like this: <body> <form id=Form1 runat=server>
Here is a simplified version of my page: <html xmlns=http://www.w3.org/1999/xhtml> <head runat=server> <title></title> <script

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.