WCCFtech.com | Forum  

Chinese (Simplified) French German Italian Spanish Swedish By Hybr!d
Go Back   WCCFtech.com | Forum > Propellerheads: > Computer Talk
Forgot Password?
Login using Facebook


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 21-03-05, 11:30 PM
MALIK MALIK is offline
W0O0O0OT
 
Join Date: Apr 2004
Age: 23
Posts: 693
MALIK will become famous soon enough
Default java script help

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 22-03-05, 05:15 PM
MALIK MALIK is offline
W0O0O0OT
 
Join Date: Apr 2004
Age: 23
Posts: 693
MALIK will become famous soon enough
Default

anyone?
kisi ko bhi java nai ati?
__________________
Respect the dead.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT +6. The time now is 08:46 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
Copyright © 2004 - 2010 WCCFtech.com. All Rights Reserved.
The views, comments and opinions of authors/users/members expressed on this website/forum(s)/system do not state or reflect those of the administration of WCCF/WCCFTECH. The administration of WCCF/WCCFTECH does not in any capacity endorse, solicit, or promote these views, comments and opinions and is not responsible for them.