![]() |
|
#1
|
|||
|
|||
|
my brother created this form which searchs for results and then displays them on the same page. What He want to do is to create a new page automatically if the results are more thne 10, and then 10-20 results show on the next page and so on. Can you help.
here is THE code: ----------------------- var html; function search(frm) { html = page; txt = frm.srchval.value.split(" "); fnd = new Array(); total = 0; html += "<div align=center><br>You searched for <span class=boldblue>'"+frm.srchval.value+"'</span><br><hr></div>"; for (i = 0; i < item.length; i++) { fnd[i] = 0; order = new Array(3, 2); for (j = 0; j < order.length; j++) for (k = 0; k < txt.length; k++) if (item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 && txt[k] != "") fnd[i] += (j+1); } for (i = 0; i < fnd.length; i++) { n = 0; w = -1; for (j = 0;j < fnd.length; j++) if (fnd[j] > n) { n = fnd[j]; w = j; }; if (w > -1) total += show(w, n); fnd[w] = 0; } html += "<p align=center><br><b>"+total+"</b> Enteries Founbd<br><br><a href='#top'>Back To Top</a></p>"; document.getElementById('results').innerHTML = html; } function show(which,num) { link = item[which][1] + item[which][0]; line = "<br><tr><td><a href='"+link+"'>"+item[which][2]+"</a><br><br>"; line += item[which][4] + "<br><br>"+item[which][6]+"<b>"+" "+item[which][5]+"</b><br><hr></td></tr>"; html += line; return 1; }
__________________
Respect the dead. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Flash : ACtion Script 2.0 (urgent) | Fookie | Computer Talk | 2 | 12-09-05 05:41 PM |
| Sig Rotate Script | dju | The Handicraft Shop | 3 | 22-06-04 12:16 AM |
| Java help | Kursed | Computer Talk | 25 | 05-06-04 03:01 PM |
| stats script for private lan server .. CS 1.6 | imadsani | Counter Strike | 6 | 02-06-04 08:28 PM |
| HTML /script HLP NEEDED !!!! | Dj G` | Computer Talk | 0 | 20-05-04 03:49 PM |