Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change displayed TEXT when submitting twice 1

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
Hello all
I'm trying to display different color text when a user searches multiple times and no records are found.

My search now is based on
Name
Account Number

When a user searches for account #12345 a page on my main frame loads displaying "No records match your search, search again"
I want to change the "No records match your search, search again" text color when any other search is done and not found.

"The reward of one duty done is the power to fulfill another"
<%
Jr Clown
%>
 
Howabout setting a hidden variable that you pass back and forth between the pages -- If you're doing it with a post method, then no sweat, yes?

And if it isn't really a form, then you can still have the hidden variable stuck in there somewhere, and all your links point to a javascript function that would first read the value of the hidden variable, and then smack that baby on the end of a querystring, and then use the:

location='blahblah.com/blah.asp?numOfMisses=2'

to shoot them off to wherever you're going, and then pick it up again on every page --

Either that, or set a session variable to hold the value, and then just check that --

session(&quot;soandso&quot;) = session(&quot;soandso&quot;) + 1

For completeness (though I'm sure you knew this), you would change the text by saying:

<font color=
<%
if var > 1 then
response.write(&quot;RED&quot;)
else
response.write(&quot;BLACK&quot;)
end if
%>
>Sorry, nothing matches</font>

I was on my way out the door here when I saw your post, so I hope it was clear enough.

good luck! :)
Paul Prewett
penny.gif
penny.gif
 
What's that at the bottom bro, your two pennies worth? LOL
I'll try it Paul, thanks &quot;The reward of one duty done is the power to fulfill another&quot;
<%
Jr Clown
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top