Jump to content
Sign in to follow this  
ahill

Dynamic header changes

Recommended Posts

Here is what I have right now. I want the page to change the header when the page is reloaded based on what is selected.

 

 

<h2>

<%

If tom = " " and jan = " " and jake= " " then

response.write (" welcome")

ElseIf tom <> " " and jan = " " and jake= " " then

response.write ("hello")

%>

</h2>

 

<%

 

If tom = " " and jan = " " and jake= " " then

SQL statement

ElseIf tom <> " " and jan = " " and jake = " " then

SQL statement

End If

 

 

 

SOME OTHER CODE

 

Reload

%>

Edited by ahill

Share this post


Link to post
Share on other sites

Which part do you need help with? Is that all the code? Where are those variables coming from?

Share this post


Link to post
Share on other sites

no all of the code is not there. i have a string of code that pulls from my sql so my page posts a table with clickable images that reloads into the same page.

Now I am trying to make my header of the <div> change every time the page reloads with the next selection in the page. Everything on the page works, I just wana make the header change based on the selection of the page when it reloads. I unfortunately cant post the full code because it is for a company.

 

 

 

Share this post


Link to post
Share on other sites

Well, the general idea behind the code you posted above will work. I guess I can't say if it's the best way to do something like that in your case, but the idea should work.

Share this post


Link to post
Share on other sites

It works for the first greeting but does not change to the second greeting when selected, as it still displays the first one.

Edited by ahill

Share this post


Link to post
Share on other sites

There's not enough code there for me to suggest anything. Does that mean that the conditions in your if statements aren't correct?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×