473,716 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing Data without Refreshing Page

Given some recent success on a simple form validation (mainly due to
the kind folks in this forum), I've tried to tackle something a bit
more difficult. I'm pulling data down from a database and populating a
simple table. I'd like the table to contain 10 entries per page and
have the option for the user to scroll through the pages of data
without having to go back to refresh the page (I've already pulled all
the info I need from the database). So, I've taken a stab at it and
this is probably not the best way to do it (so if you have a better
idea I'm open), but I think it will work. Right now I'm encountering
an 'Object Expected' error and I don't know how to interpret what it's
telling me.

Here's an isolated example of the code that I've been playing with:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="300">
<tr>
<td width="100%" style="padding: 2px;">
<div id="panel"></div>
<script type="text/javascript">
//<![CDATA[
var dataArray = new Array();
var panel = document.getEle mentById('panel ');

dataArray[0] = "<tr valign=\"top\" class=\"rowOff\ "
onMouseOver=\"t his.className=' rowOn'\"
onMouseOut=\"th is.className='r owOff'\"><td class=\"grid\"
align=\"center\ "><a class=\"inlineA ctionLink\"
href=\"detailin fo.php?MlsNum=5 31245&nomap=tru e\" title=\"Unable to
locate on map\">Details</a></td><td class=\"tableCo ntent\"
align=\"right\" >129,900</td><td class=\"tableCo ntent\"
align=\"center\ ">3</td><td class=\"tableCo ntent\"
align=\"center\ ">3</td><td class=\"tableCo ntent\"
align=\"center\ ">1,720</td></tr>";
dataArray[1] = "<tr valign=\"top\" class=\"rowOff\ "
onMouseOver=\"t his.className=' rowOn'\"
onMouseOut=\"th is.className='r owOff'\"><td class=\"grid\"
align=\"center\ "><a class=\"inlineA ctionLink\"
href=\"detailin fo.php?MlsNum=5 13195&nomap=tru e\" title=\"Unable to
locate on map\">Details</a></td><td class=\"tableCo ntent\"
align=\"right\" >124,500</td><td class=\"tableCo ntent\"
align=\"center\ ">4</td><td class=\"tableCo ntent\"
align=\"center\ ">3</td><td class=\"tableCo ntent\"
align=\"center\ ">1,528</td></tr>";
panel.innerHTML = "<table border=\"0\" cellpadding=\"2 \"
cellspacing=\"1 \" width=\"100%\" class=\"tableGr idList\"><tr><t d
class=\"colHead \" align=\"center\ ">&nbsp;</td><td class=\"colHead \"
align=\"center\ ">Price</td><td class=\"colHead \"
align=\"center\ ">Beds</td><td class=\"colHead \"
align=\"center\ ">Baths</td><td class=\"colHead \"
align=\"center\ ">SqFt.</td></tr>";

panel.innerHTML += dataArray[0];
panel.innerHTML +="</table>";
//]]

function changePage(inde x) {
panel.innerHTML = "<table border=\"0\" cellpadding=\"2 \"
cellspacing=\"1 \" width=\"100%\" class=\"tableGr idList\"><tr><t d
class=\"colHead \" align=\"center\ ">&nbsp;</td><td class=\"colHead \"
align=\"center\ ">Price</td><td class=\"colHead \"
align=\"center\ ">Beds</td><td class=\"colHead \"
align=\"center\ ">Baths</td><td class=\"colHead \"
align=\"center\ ">SqFt.</td></tr>";
panel.innerHTML += dataArray[index];
panel.innerHTML += "</table">;
}
</script>
</td>
</tr>
<tr>
<td><a href="#" onClick="javasc ript:changePage (0);">1</a> | <a
href="#" onClick="javasc ript:changePage (1);">2</a></td>
</tr>
</table>
</body>
</html>

Oct 16 '05 #1
31 4149
"Greg Scharlemann" <gr************ **@gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Given some recent success on a simple form validation (mainly due to
the kind folks in this forum), I've tried to tackle something a bit
more difficult. I'm pulling data down from a database and populating a
simple table. I'd like the table to contain 10 entries per page and
have the option for the user to scroll through the pages of data
without having to go back to refresh the page (I've already pulled all
the info I need from the database). So, I've taken a stab at it and
this is probably not the best way to do it (so if you have a better
idea I'm open), but I think it will work. Right now I'm encountering
an 'Object Expected' error and I don't know how to interpret what it's
telling me.


[snip]

1) You're referenceing "panel" before the page has been loaded.

2) You have a typo on the line; ( "> ahould be >" ):

panel.innerHTML += "</table">;

3) Try this version:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>dataArra y.htm</title>
<script type="text/javascript">
var panel;
var dataArray = new Array();
dataArray[0] = "<tr valign='top' class='rowOff'
onMouseOver='th is.className=\" rowOn\"'
onMouseOut='thi s.className=\"r owOff\"'>";
dataArray[0] += " <td class='grid' align='center'> <a
class='inlineAc tionLink' href='detailinf o.php?MlsNum=53 1245&nomap=true '
title='Unable to locate on map'>Details</a></td>";
dataArray[0] += " <td class='tableCon tent' align='right'>1 29,900</td>";
dataArray[0] += " <td class='tableCon tent' align='center'> 3</td>";
dataArray[0] += " <td class='tableCon tent' align='center'> 3</td>";
dataArray[0] += " <td class='tableCon tent' align='center'> 1,720</td>";
dataArray[0] += "</tr>";
dataArray[1] = "<tr valign='top' class='rowOff'
onMouseOver='th is.className=\" rowOn\"'
onMouseOut='thi s.className=\"r owOff\"'>";
dataArray[1] += " <td class='grid' align='center'> <a
class='inlineAc tionLink' href='detailinf o.php?MlsNum=51 3195&nomap=true '
title='Unable to locate on map'>Details</a></td>";
dataArray[1] += " <td class='tableCon tent' align='right'>1 24,500</td>";
dataArray[1] += " <td class='tableCon tent' align='center'> 4</td>";
dataArray[1] += " <td class='tableCon tent' align='center'> 3</td>";
dataArray[1] += " <td class='tableCon tent' align='center'> 1,528</td>";
dataArray[1] += "</tr>";
function loadedPage() {
panel = document.getEle mentById('panel ');
var what = "<table border='1' cellpadding='2' cellspacing='1'
width='100%' class='tableGri dList'>";
what += "<tr>";
what += " <td class='colHead' align='center'> &nbsp;</td>";
what += " <td class='colHead' align='center'> Price</td>";
what += " <td class='colHead' align='center'> Beds</td>";
what += " <td class='colHead' align='center'> Baths</td>";
what += " <td class='colHead' align='center'> SqFt.</td>";
what += "</tr>";
what += dataArray[0];
what += "</table>";
panel.innerHTML = what;
}
function changePage(inde x) {
var what = "<table border='1' cellpadding='2' cellspacing='1'
width='100%' class='tableGri dList'>";
what += "<tr>";
what += " <td class='colHead' align='center'> &nbsp;</td>";
what += " <td class='colHead' align='center'> Price</td>";
what += " <td class='colHead' align='center'> Beds</td>";
what += " <td class='colHead' align='center'> Baths</td>";
what += " <td class='colHead' align='center'> SqFt.</td>";
what += "</tr>";
what += dataArray[index];
what += "</table>";
panel.innerHTML = what;
}
</script>
</head>
<body onload="loadedP age()">
<table border="0" cellpadding="0" cellspacing="0" width="300">
<tr>
<td width="100%" style="padding: 2px;">
<div id="panel"></div>
</td>
</tr>
<tr>
<td>
<a href="#" onClick="javasc ript:changePage (0);">1</a> |
<a href="#" onClick="javasc ript:changePage (1);">2</a>
</td>
</tr>
</table>
</body>
</html>
I'd do one more thing:

Declaring an array that would hold just the values:

var data_Array = ]
"531245^129,900 ^3^3^1,720",
"513195^124,500 ^4^3^1,528"
];

Then construct the formatted dataArray() from it.

Oct 16 '05 #2
"McKirahan" <Ne**@McKirahan .com> wrote in message
news:l5******** ************@co mcast.com...
"Greg Scharlemann" <gr************ **@gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .


[snip]
(so if you have a better idea I'm open)

[snip]

Try this version:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> dataTable.htm</title>
<script type="text/javascript">
var dataArray = [
"531245^129,900 ^3^3^1,720",
"513195^124,500 ^4^3^1,528"
];
var dataTable = [
"<table border='1' cellpadding='2' cellspacing='1' width='100%'
class='tableGri dList'>",
"<tr>",
" <td class='colHead' align='center'> &nbsp;</td>",
" <td class='colHead' align='center'> Price</td>",
" <td class='colHead' align='center'> Beds</td>",
" <td class='colHead' align='center'> Baths</td>",
" <td class='colHead' align='center'> SqFt.</td>",
"</tr>",
"<tr valign='top' class='rowOff' onMouseOver='th is.className=\" rowOn\"'
onMouseOut='thi s.className=\"r owOff\"'>",
" <td class='grid' align='center'> <a class='inlineAc tionLink'
href='detailinf o.php?MlsNum=#0 &nomap=true' title='Unable to locate on
map'>Details</a></td>",
" <td class='tableCon tent' align='right'># 1</td>",
" <td class='tableCon tent' align='center'> #2</td>",
" <td class='tableCon tent' align='center'> #3</td>",
" <td class='tableCon tent' align='center'> #4</td>",
"</tr>",
"</table>"
];
function changePage(inde x) {
var dataBuild = "";
for (var i=0; i<dataTable.len gth; i++) {
dataBuild += dataTable[i];
}
var dataValue = dataArray[index].split("^");
for (var j=0; j<dataArray[index].length; j++) {
dataBuild = dataBuild.repla ce("#"+j,dataVa lue[j]);
}
document.getEle mentById("panel ").innerHTM L = dataBuild;
}
</script>
</head>
<body onload="changeP age(0)">
<table border="0" cellpadding="0" cellspacing="0" width="300">
<tr>
<td width="100%" style="padding: 2px;">
<div id="panel"></div>
</td>
</tr>
<tr>
<td>
<a href="#" onClick="javasc ript:changePage (0);">1</a> |
<a href="#" onClick="javasc ript:changePage (1);">2</a>
</td>
</tr>
</table>
</body>
</html>
Oct 16 '05 #3
Internet Explorer is giving me a Object Expected error on line 50:

<body onload="changeP age(0)">

What the heck is it looking for when it says Object Expected?

Oct 16 '05 #4
"Greg Scharlemann" <gr************ **@gmail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Internet Explorer is giving me a Object Expected error on line 50:

<body onload="changeP age(0)">

What the heck is it looking for when it says Object Expected?


The JavaScript function "changePage ()" is an "object";
did you change the spelling?

Did you try my version "as is"?
My line 50 is a "<td>" tag.
If you made any change then post your version.
Oct 17 '05 #5
Greg Scharlemann wrote:
Given some recent success on a simple form validation (mainly due to
the kind folks in this forum), I've tried to tackle something a bit
more difficult. I'm pulling data down from a database and populating a
simple table. I'd like the table to contain 10 entries per page and
have the option for the user to scroll through the pages of data
without having to go back to refresh the page (I've already pulled all
the info I need from the database). So, I've taken a stab at it and
this is probably not the best way to do it (so if you have a better
idea I'm open), but I think it will work. Right now I'm encountering
an 'Object Expected' error and I don't know how to interpret what it's
telling me.

Here's an isolated example of the code that I've been playing with:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Why XHTML? Does it provide any useful benefits for your situation? If
not, you are better off to use HTML 4.01.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="300">
<tr>
<td width="100%" style="padding: 2px;">
<div id="panel"></div>
<script type="text/javascript">
//<![CDATA[
var dataArray = new Array();
var panel = document.getEle mentById('panel ');
This will cause an error (and almost certainly failure of your script).
You are attempting to get a reference to an element that doesn't exist
yet.

dataArray[0] = "<tr valign=\"top\" class=\"rowOff\ "
onMouseOver=\"t his.className=' rowOn'\"
onMouseOut=\"th is.className='r owOff'\"><td class=\"grid\"
When posting code, always wrap it manually at about 70 characters to
prevent news readers wrapping it automatically. It nearly always
introduces errors and make helping you a chore.

[...]
panel.innerHTML = "<table border=\"0\" cellpadding=\"2 \"
cellspacing=\"1 \" width=\"100%\" class=\"tableGr idList\"><tr><t d
class=\"colHead \" align=\"center\ ">&nbsp;</td><td class=\"colHead \"
align=\"center\ ">Price</td><td class=\"colHead \"
align=\"center\ ">Beds</td><td class=\"colHead \"
align=\"center\ ">Baths</td><td class=\"colHead \"
align=\"center\ ">SqFt.</td></tr>";

panel.innerHTML += dataArray[0];
panel.innerHTML +="</table>";
Using innerHTML this way is dangerous. incrementally writing bits of
the table to the document will nearly always fail. If you must use
innerHTML (and I can't think why you'd have to), create the HTML as a
single string then write the entire table at once.

It is much safer to use DOM modifying tables using script.

But why not create the the table in HTML? It seems you'd be better off
if the table was generated at the server. Your links can be to
subsequent pages with more data. If the user has scripting available,
the links can have onclick attributes that update the table without
getting a new page.

Your script is then vastly simpler and users without scripting (or with
a script engine that doesn't like your scrip) still get a page that
works. You will probably also reduce the size of your page.

Below is a sample script, all the detail is generated but it should give
you the idea. For extra data, you can create another script element
that loads new variables and adds to the page. If the amount of data is
less than say 5kB (and that's quite a bit of data), just put it all in
the page to start with.
//]]

function changePage(inde x) {
panel.innerHTML = "<table border=\"0\" cellpadding=\"2 \"
cellspacing=\"1 \" width=\"100%\" class=\"tableGr idList\"><tr><t d
class=\"colHead \" align=\"center\ ">&nbsp;</td><td class=\"colHead \"
align=\"center\ ">Price</td><td class=\"colHead \"
align=\"center\ ">Beds</td><td class=\"colHead \"
align=\"center\ ">Baths</td><td class=\"colHead \"
align=\"center\ ">SqFt.</td></tr>";
panel.innerHTML += dataArray[index];
panel.innerHTML += "</table">;
}
</script>
</td>
</tr>
<tr>
<td><a href="#" onClick="javasc ript:changePage (0);">1</a> | <a


'javascript:' is not needed when using script for intrinsic events and
the link should probably do something useful.

[...]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Table</title>
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<style type="text/css">
#catalogue {
border-collapse: collapse;
border-top: 1px solid #999999;
border-left: 1px solid #999999;
}
#catalogue td, #catalogue th {
text-align: right;
border-bottom: 1px solid #999999;
border-right: 1px solid #999999;
padding: 2px 5px 2px 5px;
}
#catalogue th {
width: 4em;
text-align: center;
}
#catalogue th:first-child, #catalogue td:first-child {
width: 5em;
text-align: left;
padding: 0 0px 0 5px;
}
..clickable {
cursor: pointer;
color: #2222ff;
text-decoration: underline;
}
#scriptLinks li {
display: inline;
list-style-type: none;
padding: 0 0 0 5px;
}
</style>
<script type="text/javascript">

var details0 = {
data0 : ['typeA','31,528 ','3','1','24'],
data1 : ['typeB','21,500 ','2','1','22'],
data2 : ['typeC','11,528 ','1','0','14']
};

var details1 = {
data0 : ['typeD','301,52 8','30','10','2 40'],
data1 : ['typeE','201,50 0','20','10','2 20'],
data2 : ['typeF','101,52 8','10','00','1 40']
};

function updateTable(id, dObj)
{
var tB = document.getEle mentById(id);
while (tB.firstChild) tB.removeChild( tB.firstChild);
var d, oR, oT, i=0, j, k;
while( (d = dObj['data' + i++]) ){
oR = document.create Element('tr');
for (j=0, k=d.length; j<k; j++){
oT = document.create Element('td');
oT.appendChild( document.create TextNode(d[j]));
if (!j) {
oT.onclick = showDetails;
oT.className = 'clickable';
}
oR.appendChild( oT);
}
tB.appendChild( oR);
}
}

function showDetails()
{
alert(this.firs tChild.data + ': some details');
}

</script>
</head>
<body onload="updateT able('catDetail s',details0);">

<table id="catalogue" >
<tbody id="catHead">
<tr>
<th>&nbsp;</th>
<th>Price</th>
<th>Beds</th>
<th>Baths</th>
<th>Size<br>(sq . ft)</th>
</tr>
</tbody>
<tbody id="catDetails" >
</tbody>
</table>
<ul id="scriptLinks ">
<li>Show:
<li><a href="page0.htm l" onclick="
updateTable('ca tDetails',detai ls0);
return false;
">Details 0</a>
<li><a href="page1.htm l" onclick="
updateTable('ca tDetails',detai ls1);
return false;
">Details 1</a>
</ul>
</body>
</html>
--
Rob
Oct 17 '05 #6
The line wrapping made my script not work correctly. I modified it and
now it works. Thanks McKirahan.

Oct 17 '05 #7
Rob

I'll give this a shot, you make some interesting points. One site I
did run across doing the same technique that I'm shooting for is
Yahoo's Fantasy Football site. I looked at the source and tried to cut
and paste the stuff I thought I needed but it was way over my head.

Greg

Oct 17 '05 #8
JRS: In article <11************ **********@z14g 2000cwz.googleg roups.com>
, dated Sun, 16 Oct 2005 11:21:44, seen in news:comp.lang. javascript,
Greg Scharlemann <gr************ **@gmail.com> posted :
Given some recent success on a simple form validation
... ...


Repeatedly changing the same innerHTML is untidy and might be
inefficient, although AIUI it will not be rendered until the code stops.

The body of an article should stand alone independent of the subject
line : so if the subject line is relevant it should be repeated or
restated in the body of the article.

You should read the newsgroup FAQ. Section 4.15 "How do I modify the
current page in a browser?" answers the subject question.

If you are prepared to assume that your page will only be used by
"DocDom" browsers, DynWrite could be much simplified (and it would be
well if the FAQ were to show that). However, it is still IMHO highly
beneficial to code dynamic writing like DynWrite("aID", Str) ,
however simple DynWrite becomes, for reasons of legibility.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 17 '05 #9
JRS: In article <l5************ ********@comcas t.com>, dated Sun, 16 Oct
2005 16:33:33, seen in news:comp.lang. javascript, McKirahan
<Ne**@McKirahan .com> posted :
var what = "<table border='1' cellpadding='2' cellspacing='1'
width='100%' class='tableGri dList'>";
Code posted to Usenet should be executable code. Do not let your
posting agent wrap code : THAT IS YOUR JOB.
And try to get your spelling right : there are many here who have put
considerable effort into learning English as a second language, and it
is unhelpful to set a bad example.

what += "<tr>";
what += " <td class='colHead' align='center'> &nbsp;</td>";
what += " <td class='colHead' align='center'> Price</td>";


That's a tedious construction.

what = "<tr>" +
" <td class='colHead' align='center'> &nbsp;</td>" +
" <td class='colHead' align='center'> Price</td>" +

is perfectly satisfactory in all systems AFAIK (it's conceivable that
the array.join method might be faster, but ISTM unlikely to be
significantly so in any real case.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2482
by: Ben | last post by:
Hi, One ASP.NET transactional page conducts a long transaction in a button click function. I want to display the transaction progress info in label control without refreshing page. It is because page refreshing will commit the transaction automatically. How to do it?
4
3639
shoonya
by: shoonya | last post by:
can i change the url of any page from abc.php?foo=test1 --> abc.php?foo=test2 without refreshing the page? shoonya
1
4200
by: viral123 | last post by:
Hi all I have created one dropdown list box which contains all the employee name. By selecting the name from that list, it returns the details of that particular employee from the database. It refreshes the page all the time when user selects the new employee. It is really very annoying when it refreshes the page without needed. I have to stop that happning. does anyone know how to do dropdownlist selectchange event without refreshing...
2
1532
by: madhu7sudan | last post by:
hi In a whole page i have one box and in that box there are many name ( like 1000) and i have display only 10 names and a link button more if i press on that linkbutton it shold display the next 10 members without refreshing the page. Could u plz tell me the answer its very urget!!!!!!!!!!!!!!!! plz reply to this mail id **** - email removed (against site rules)
9
24146
by: cleary1981 | last post by:
Hi, I am trying to improve the usabilty of an app I have written and it would be great if I could refresh the content of my select boxes without refreshing the whole page. I am sure this could be done. perhaps using iFrames. Can anyone shed some light?
1
2100
by: greggui9029 | last post by:
Hi, I have some querytables using OLE DB provider in Excel workbook. Is there any way to connect to the external data programmly without refreshing querytables? i.e. I don't want to refresh Excel cells. I only want to create connection to the OLE DB provider.
3
4162
by: manuitpro | last post by:
Hi All, I have page with many tabs, in one of the tab i have a form (only a input box) and i want to show some output on the same tab view based on the user input. (bvy using php function) I dont want to refresh the page becuase other tabs already has some outputs that i dont want to touch. I know ajax is a solution for this, but i have gone through many ajax examples, it passes values to another page (.php). I dont want to do this...
2
5486
by: athar258 | last post by:
hi all, I am developing a web application related to the share market, what i want to accomplish is that i want to present the user share market data that will be updated every 40 seconds. but i dont want a page refresh do do that, i wanna do it the way it happens on say facebook, in which the page is updated with new contents without refreshing the page. somebody suggested me to use AJAX to do so. can anyone give me a starting point to...
0
8823
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9047
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7980
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5969
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3177
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2543
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2119
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.