Click here to Skip to main content
15,897,273 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: ??Ajax Pop-up Window?? Pin
Christian Graus17-Jun-09 11:28
protectorChristian Graus17-Jun-09 11:28 
GeneralRe: ??Ajax Pop-up Window?? Pin
CSharpBeginner17-Jun-09 15:22
CSharpBeginner17-Jun-09 15:22 
GeneralRe: ??Ajax Pop-up Window?? Pin
Christian Graus17-Jun-09 16:01
protectorChristian Graus17-Jun-09 16:01 
QuestionHow can I pass a asp.net text box value to an input text box name txtSearch2 Pin
HistoricalSocietyMember17-Jun-09 8:44
HistoricalSocietyMember17-Jun-09 8:44 
AnswerRe: How can I pass a asp.net text box value to an input text box name txtSearch2 Pin
Christian Graus17-Jun-09 11:04
protectorChristian Graus17-Jun-09 11:04 
GeneralRe: How can I pass a asp.net text box value to an input text box name txtSearch2 Pin
HistoricalSocietyMember17-Jun-09 11:48
HistoricalSocietyMember17-Jun-09 11:48 
GeneralRe: How can I pass a asp.net text box value to an input text box name txtSearch2 Pin
Christian Graus17-Jun-09 13:30
protectorChristian Graus17-Jun-09 13:30 
GeneralRe: How can I pass a asp.net text box value to an input text box name txtSearch2 Pin
HistoricalSocietyMember18-Jun-09 4:56
HistoricalSocietyMember18-Jun-09 4:56 
I get an error when I create the <asp:textbox> control. it says search() is not a recognized member the .aspx page....The search engine is a Javascript search engine with the search() implemented in the javascript. Once the user hits the search button I wanted this to trigger the search engine preferably with the <asp:text> but the only way I can get it to work is with in the input text....This is a copy of my javascript search():

title = new Object();
desc = new Object();
links= new Object();
matched= new Object();
keywords= new Object();
found= new Object();
var temp=0;
// actual location or the item to be searched
// description of the location
// actual link
// percentage match found
// keywords as parsed from the input
// # of titles present in the database
title[0]=45
//no of keywords after parsing
keywords[0]=0
//no of matches found.
found[0]=0

<!-- Begin List of Searchable Items -->

<!--put the list of the links and descriptions here!!-->

&lt;!-- list of the 45 Searchable items (deleted for security purposes)--&gt;

<!-- End list of Searchable items -->

function search(){
var skeyword=document.searchengine.keywords.value.toLowerCase();
var check=1;
var pos=0;
var i=0;
var j=0;
var itemp=0;
var config='';

while (true)
{
if (skeyword.indexOf("+") == -1 )
{
keywords[check]=skeyword;
break;
}
pos=skeyword.indexOf("+");
if (skeyword !="+")
{
keywords[check]=skeyword.substring(0,pos);
check++;
}
else
{
check--;
break;
}
skeyword=skeyword.substring(pos+1, skeyword.length);
if (skeyword.length ==0)
{
check--;
break;
}

}
// the keywords have been put in keywords object.
keywords[0]=check;

// matching and storing the matches in matched
for ( i=1; i<=keywords[0];i++)
{
for (j=1;j<=title[0];j++)
{
if (title[j].toLowerCase().indexOf(keywords[i]) > -1 )
{
matched[j]++;
}
}
}
// putting all the indexes of the matched records in found

for (i=1;i<=title[0];i++)
{
if (matched[i] > 0 )
{
found[0]++;
// increment the found
found[found[0]]=i;

}
}



for (i=1;i<=found[0]-1;i++)
{
for(j=i+1;j<=found[0];j++)
{
if ( matched[found[i]]< matched[found[j]] )
{
temp= found[j];
found[j]=found[i];
found[i]=temp;
}
}
}

// end of sort

output = self;
output.document.write('<html>');
output.document.write('<head>');
output.document.write('<script>');
output.document.write('window.onerror=new Function("return true")');
output.document.write('<\/script>');
output.document.write('<title> Search Results </title>');
output.document.write('</head>');
output.document.write('<BODY bgcolor=#ffffff text=#000000 link=#990099 vlink =#339966 >');

output.document.write('<center> <h1> Search Results </h1></center>');
output.document.write('<hr>');
output.document.write(' The Keyword(s) you searched :: '.big() )
for (i=1; i<=keywords[0]; i++)
{
output.document.write( keywords[i].bold() +" ");
}
output.document.write('<br>');

if (found[0]==0)
{
//alert(found[0]);
output.document.write('<hr>');
output.document.write("<b>No matches resulted in this search </b> <br>");
output.document.write("You may close the results and reduce the length/number of the keywords <br>");
}
else
{
// data has been found
output.document.write(" <hr> <b> The Results of the search are : </b> ");
output.document.write( found[0] +" Entries found ".italics());
output.document.write("<table border=1 width=100%>");
for (i=1; i<=found[0];i++)
{
output.document.write("<tr><td valign=top bgcolor=#9999ff>");
output.document.write("<h3>" +i +"</h3>");
output.document.write("<td valign=top>");
itemp=found[i];
output.document.write(desc[itemp].bold() +"<br>" +
links[itemp].link(links[itemp])+"<br>");
temp= (matched[itemp]/keywords[0])*100
output.document.write("<i> Matched with keywords :: " +temp+" % </i>" );
matched[itemp]=0
}
found[0]=0;
output.document.write("</table>");
}
//output.document.write ('This search was created by &copy <a href="http:\\dutta.home.ml.org"> Satadip Dutta</a> 1997');
output.document.write ("<hr>");
//output.document.write ("<form><center>");
output.document.write("<center>Hit the refresh button to return to the search<center>");
//output.document.write ("<input type='button' value='Start Another Search' onClick = 'self.close()'");
//output.document.write ("<center></form>");

output.document.write ("</body></html>");
output.document.close();
}

this is the html input boxes

<form name="searchengine" onSubmit="search()">

<center>
Keywords:
<input type = text name ="keywords" value="" maxlength=40>
<input type = submit name="go" Value="SEARCH" onClick="search()">
<br>
<hr>
</center>
</form>

How can I implement the <asp:text> and still get the same results.....
Thanks for your time!!!!
QuestionHIde Image links from public Pin
Ricardo Luceac17-Jun-09 7:50
Ricardo Luceac17-Jun-09 7:50 
AnswerRe: HIde Image links from public Pin
Christian Graus17-Jun-09 11:05
protectorChristian Graus17-Jun-09 11:05 
QuestionSimple Sample Web Project Pin
Dave Clark QED17-Jun-09 6:38
Dave Clark QED17-Jun-09 6:38 
AnswerRe: Simple Sample Web Project Pin
led mike17-Jun-09 7:18
led mike17-Jun-09 7:18 
AnswerRe: Simple Sample Web Project Pin
Baran M17-Jun-09 7:27
Baran M17-Jun-09 7:27 
QuestionLogin timeout in webfarm Pin
Xmen Real 17-Jun-09 5:45
professional Xmen Real 17-Jun-09 5:45 
QuestionAfter publishing the site , the linkbuttons are not working. Pin
er.puneet17-Jun-09 3:18
er.puneet17-Jun-09 3:18 
AnswerThis is rude Pin
Manas Bhardwaj17-Jun-09 3:42
professionalManas Bhardwaj17-Jun-09 3:42 
GeneralRe: This is rude Pin
Abhijit Jana17-Jun-09 3:52
professionalAbhijit Jana17-Jun-09 3:52 
GeneralRe: This is rude Pin
er.puneet18-Jun-09 1:33
er.puneet18-Jun-09 1:33 
GeneralRe: This is rude Pin
er.puneet18-Jun-09 1:29
er.puneet18-Jun-09 1:29 
AnswerRe: After publishing the site , the linkbuttons are not working. Pin
Manas Bhardwaj17-Jun-09 3:45
professionalManas Bhardwaj17-Jun-09 3:45 
QuestionSplitting words Pin
shijivijayan17-Jun-09 2:10
shijivijayan17-Jun-09 2:10 
AnswerDon't repost Pin
Not Active17-Jun-09 2:17
mentorNot Active17-Jun-09 2:17 
AnswerRe: Splitting words Pin
SeMartens17-Jun-09 2:19
SeMartens17-Jun-09 2:19 
AnswerRe: Splitting words Pin
Baran M17-Jun-09 2:21
Baran M17-Jun-09 2:21 
AnswerRe: Splitting words Pin
Abhishek Sur17-Jun-09 2:33
professionalAbhishek Sur17-Jun-09 2:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.