When a user clicks on any of the links, for instance Manage Clients, s/he is taken to that section.
Works similarly for Manage Sermon and Mange Logs.
There are a couple of additional requirements that I am struggling with.
If a user clicks any of the sections, for instance, Panel with control ID of ClientPanel, we would like that section to be highlighted (with any color) and enabled for editing at the same time disabling the other sections.
If a user clicks any of the sections, for instance, Panel with control ID of ClientPanel, we would like that section to be highlighted (with any color) and enabled for editing at the same time disabling the other sections.
The Panel control will become a div element in html. How do you want to highligt it? Change background color of the div element?
What do you mean by "disabling"? Want set style display:none?
Actually, if I could change the background color of the panel, that would be better. Otherwise, changing the background color of the div would work also and yes with any color.
Did you include all of the above script files in your code? If so, it is causing the conflict. To me it is unbelievable. You should NOT do that but put ONLY ONE jquery.js of appropriate version (v2.1.1 is OK).
I advised that you "Copy & paste the following code and try" the sample code in my reply above. But I guess that you didn't accept my advise "Copy & paste" and did something else that I do not know.
That is probably the reason why you could not see "activate one section of a page while disabling other sections" although I have confirmed that my sample code works as it is before posting it.
Because my sample code is working in my environment with IE, Chrome, Edge and Firefox as expected and I don’t see any reason other than you are doing something else.
See following screen shots (click url if not shown on this thread):
According to your problems and Suerfer's codes,I have created a test. When I click the link,the corresponding panel will display yellow background and other two panels are disabled.
I don't understand your requirement clearly.I'm guessing that you have another requirement. When you click the part of one of the panel, the panel will highlight and other two panels will be disabled.
Could you post your current codes and tell us more details of your requirement? It will help us to solve your problems.
Best regards,
Yijing Sun
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
I don't understand your requirement clearly.I'm guessing that you have another requirement. When you click the part of one of the panel, the panel will highlight and other two panels will be disabled.
It doesn’t matter. He said “Your code is not doing anything at all.” That is a current issue. Please do not mix up.
Member
258 Points
1178 Posts
How to activate one section of a page while disabling other sections?
Jan 29, 2021 10:32 PM|simflex|LINK
Greetings mates.
Hope all is well and safe.
I have form with three sections separated by panels.
Example:
Then we have another section with menu items and links to each of the panels above:
When a user clicks on any of the links, for instance Manage Clients, s/he is taken to that section.
Works similarly for Manage Sermon and Mange Logs.
There are a couple of additional requirements that I am struggling with.
If a user clicks any of the sections, for instance, Panel with control ID of ClientPanel, we would like that section to be highlighted (with any color) and enabled for editing at the same time disabling the other sections.
Are these possible?
Many thanks in advance
Member
330 Points
232 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 29, 2021 11:23 PM|SurferOnWww|LINK
The Panel control will become a div element in html. How do you want to highligt it? Change background color of the div element?
What do you mean by "disabling"? Want set style display:none?
Member
258 Points
1178 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 30, 2021 02:45 AM|simflex|LINK
Hi SurfOnWww,
Thanks much for your response.
Actually, if I could change the background color of the panel, that would be better. Otherwise, changing the background color of the div would work also and yes with any color.
What I mean by disable is something like this:
Member
330 Points
232 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 30, 2021 09:37 AM|SurferOnWww|LINK
Copy & paste the following code and try:
Member
258 Points
1178 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 30, 2021 06:35 PM|simflex|LINK
Hi,
Your code is not doing anything at all.
It is not highlighting the div or panel that you linked to and it is not disabling the other panels.
Member
330 Points
232 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 30, 2021 10:12 PM|SurferOnWww|LINK
I guess you do not have jQuery.js. Please confirm.
Member
258 Points
1178 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 31, 2021 02:31 AM|simflex|LINK
I do sir:
Member
330 Points
232 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 31, 2021 03:23 AM|SurferOnWww|LINK
No, you didn’t before. I have received the mail that states:
> I do sir:
jQuery v1.5 does not work in the script of my sample code. I believe that is why you said “Your code is not doing anything at all.”
Now it seems that you use v2.1.1. It should work in the script of my sample code. I have confirmed.
Member
258 Points
1178 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 31, 2021 05:20 AM|simflex|LINK
I don't know what you mean by I did not before i posted "I do sir"
I have three scripts, two of those are for my popup calendar which I initially posted in error.
Then I quickly replaced them with the one you saw. No need for me to make up story sir. If I didn't, I would not be embarrassed to admit it.
Anyway, after adding these two you posted, it still didn't work.
I tried putting them at the top of the page, then at the bottom right after </form> but no cigar.
Could it be that those panels or divs which i just added contain gridview?
Or is the order of the scripts that is causing the conflict?
Here is my entire script:
This one below is at the bottom of my page just after </form>
Thanks again very much for your help
Member
330 Points
232 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 31, 2021 06:28 AM|SurferOnWww|LINK
Did you include all of the above script files in your code? If so, it is causing the conflict. To me it is unbelievable. You should NOT do that but put ONLY ONE jquery.js of appropriate version (v2.1.1 is OK).
I advised that you "Copy & paste the following code and try" the sample code in my reply above. But I guess that you didn't accept my advise "Copy & paste" and did something else that I do not know.
That is probably the reason why you could not see "activate one section of a page while disabling other sections" although I have confirmed that my sample code works as it is before posting it.
Member
258 Points
1178 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 31, 2021 06:39 AM|simflex|LINK
Even though you are helping, I do not enjoy dealing with people who like bark a lot.
Why are you assuming that I didn't use your code?
I removed my entire code and tried yours. It still doesn't work.
just NOW, I removed all the scripts except yours. It still is not working.
I asked if it has to do with the fact that the divs contain GridView but instead of responding, you are barking.
Thanks for your help
Member
330 Points
232 Posts
Re: How to activate one section of a page while disabling other sections?
Jan 31, 2021 07:11 AM|SurferOnWww|LINK
Because my sample code is working in my environment with IE, Chrome, Edge and Firefox as expected and I don’t see any reason other than you are doing something else.
See following screen shots (click url if not shown on this thread):
Initial
http://surferonwww.info/BlogEngine/image.axd?picture=2021%2f1%2f0130Initial.jpg
Sermon selected
http://surferonwww.info/BlogEngine/image.axd?picture=2021%2f1%2f0130Sermon.jpg
Contributor
3730 Points
1412 Posts
Re: How to activate one section of a page while disabling other sections?
Feb 02, 2021 09:10 AM|yij sun|LINK
Hi simflex,
According to your problems and Suerfer's codes,I have created a test. When I click the link,the corresponding panel will display yellow background and other two panels are disabled.
I don't understand your requirement clearly.I'm guessing that you have another requirement. When you click the part of one of the panel, the panel will highlight and other two panels will be disabled.
Could you post your current codes and tell us more details of your requirement? It will help us to solve your problems.
Best regards,
Yijing Sun
Member
330 Points
232 Posts
Re: How to activate one section of a page while disabling other sections?
Feb 02, 2021 10:48 AM|SurferOnWww|LINK
It doesn’t matter. He said “Your code is not doing anything at all.” That is a current issue. Please do not mix up.
Member
258 Points
1178 Posts
Re: How to activate one section of a page while disabling other sections?
Feb 02, 2021 04:31 PM|simflex|LINK
I finally got your script to work.
First, I didn't pay too much attention to notice the version of jquery you are using.
I went and got the library:
After this, the three sections started highlighting but disabling was still not working until I was able to make this change:
Instead of this:
I tried this:
and finally, I added the class to each panel control:
Now, everything is working perfectly.
Thanks for your help.