General discussion

Locked

Refreshing a page

By mvipat ·
Hi,

We are developing a screen with the help of JavaScript and HTML. The screen has 3 frames. One on left which has strip structure and contains a main menu. At Bottom we have frame which corresponds to menu of the screen which is in central portion. On central frame we have a list box of customers. On selecting a customer I have to display the further information about that customer such as his age, card no etc in a table. When the screen is loaded at that time I have full information aboutcustomer in and array so what I want is as soon as I select a customer I have all the information I would not like to go to server and unnecessarily increase the traffic. So I want that the table should grow dynamic ally depending on the number of customers selected. I do not want to split the screen further into more frames.

Can anybody please suggest some solution to this ?

Thanks in advance

Mahesh

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Refreshing a page

by gnhtreasurer In reply to Refreshing a page

You can use the change event in javascript to determine each time the select box receives a change. You can then create a function in javascript which will write the table based on the array you have stored through the document.write method you can generat a table and with a style sheet position it on the page. Then each time the event occurs you will need to accomadate another row from the array.

Collapse -

Refreshing a page

by mvipat In reply to Refreshing a page

The question was auto-closed by TechRepublic

Collapse -

Refreshing a page

by basvg In reply to Refreshing a page

Hi,

Besides letting the table grow dynamically, you could also use Dynamic-HTML to display the customer information in a layer. So when clicking on a customer record, show a layer and write the information in it, by using JavaScript. If needed I could provide some example code.

Regards,
Bas

Collapse -

Refreshing a page

by mvipat In reply to Refreshing a page

The question was auto-closed by TechRepublic

Collapse -

Refreshing a page

by Adwait Gupte In reply to Refreshing a page

Just add the maximum no. of rows and coulmns you will need they will not take any space. They will now expand with the amont of data.
Adwait

Collapse -

Refreshing a page

by mvipat In reply to Refreshing a page

The question was auto-closed by TechRepublic

Collapse -

Refreshing a page

by billf In reply to Refreshing a page

Try this:

<html>
<head><title>Dynamic Table</title>
<script language="Javascript"><!--
function settable() {
for (i=0;i<document.all.noop.options.length;i++) {
if (document.all.noop.options.selected) {
document.all.knob.rows(i).style.display="inline";
} else {document.all.knob.rows(i).style.display="none";}
}
}
// --></script>
</head>
<body>
<form><dl><b>Dynamic Table Function</b>
<dd><hr>
<select id="noop" name="noop" multiple size="2" onchange="settable()">
<option>Gnip<option>Gnop
<option>Blensnerm
</select>
<dd><hr>
<table id="knob" border="1" width="250">
<tr style="display:none">
<td>Gnip</td><td>Blue</td><td>Hostile</td>
</tr>
<tr style="display:none">
<td>Gnop</td><td>Red</td><td>Friendly</td>
</tr>
<tr style="display:none">
<td>Blensnerm</td><td>Red</td><td>Friendly</td>
</tr>
</table>
</form>
</body>
</html>

The table is sent pre-populated, but rows are hidden until 'turned on' with styles. Hope this helps!

Good Luck! -Bill

Collapse -

Refreshing a page

by mvipat In reply to Refreshing a page

The question was auto-closed by TechRepublic

Collapse -

Refreshing a page

by mvipat In reply to Refreshing a page

This question was auto closed due to inactivity

Back to Web Development Forum
9 total posts (Page 1 of 1)  

Software Forums