Go Back   Access World Forums > Apps and Windows > Web Design and Development > ASP and ASP.NET

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-08-2014, 06:08 AM   #1
BlueIshDan
 
Join Date: May 2014
Posts: 1,122
Thanks: 155
Thanked 159 Times in 156 Posts
BlueIshDan is on a distinguished road
JQuery wont work :(

I'm currently diving into the complicated ways of web design by trying to create a forum from scratch.

My problem is I cannot figure out how to hide table rows using JQuery.
My thoughts are the problem lies within the fact that the button resides in a table row?

I'm coming to you because I'm getting no errors thrown by Chrome's console & Response information =/

Yes: JQuery is referenced.

Anywho here is the body code.

PHP Code:

@functions{
    
    public 
int GetGroupID(){
 
        
int group_id 0;

        if(
Session["logged_in"] == "YES"){
            
group_id Convert.ToInt32
                            
Database.Open("forum")
                                    .
QueryValue("SELECT user_group_id FROM users WHERE ID = @0"Session["user_id"]));
        }

        return 
group_id;
    }
        
}
@{

    var 
db Database.Open("Forum");    
}
    <
div id="area_group">
        <
table style="width=100%">
            <
thead>
                <
tr>
                
                </
tr>
            </
thead>
            <
tbody>

            @{
                foreach (var 
area_group in db.Query("SELECT * FROM area_groups WHERE user_group_id >= " GetGroupID())){
                    <
tr><td>

                        <
table id="area_group_@area_group.name.Replace(" ", "")">
                            <
tbody>
                            
                                <
tr>
                                    <
td>@area_group.name
                                        
<input style="
                                                position: absolute ; 
                                                right: 15px; 
                                                height: 20px" 
                                                
type="button" 
                                                
id="hide_@area_group.name.Replace(" ", "")"/>

                                        <
input style="
                                                position: absolute ; 
                                                right: 30px; 
                                                height: 20px" 
                                                
type="button" 
                                                
id="show_@area_group.name.Replace(" ", "")"/>
                                                    
                                    </
td></tr>

                                @{
                                    foreach (var 
area in db.Query("SELECT * FROM areas WHERE area_group_id=@0"area_group.ID)){
                                        <
tr><td><a href="Area.cshtml?area=@area.name">@area.name</a></td><td>@db.QueryValue("SELECT COUNT(*) FROM threads WHERE area_id=@0"area.ID)</td></tr>
                                    }
                                }  
                            </
tbody>

                        </
table>
                        
                    </
td></tr>
                }
            }

            </
tbody>
        </
table>
    </
div>
@{
    foreach (var 
area_group in db.Query("SELECT * FROM area_groups WHERE user_group_id >= " GetGroupID())){       
        <
script type='text/javascript'>
            var 
rows = $('table.area_group_@area_group.name.Replace(" ", "") tr');

            $(
'#hide_@area_group.name.Replace(" ", "")').click(function() {
                
rows.hide();
            });

            $(
'#show_@area_group.name.Replace(" ", "")').click(function() {
                
rows.show();
            });
        
</script>
    }


__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Blue's Age Poll:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Animated Sorting:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Mining File Directories:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GetSubFolders:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

GetFileLines:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

FindSimilarValues:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Move (Avoid moving objects game):
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
BlueIshDan is offline   Reply With Quote
Old 08-08-2014, 06:12 AM   #2
BlueIshDan
 
Join Date: May 2014
Posts: 1,122
Thanks: 155
Thanked 159 Times in 156 Posts
BlueIshDan is on a distinguished road
Re: JQuery wont work :(

Here is the output:
Attached Images
File Type: jpg Output.JPG (42.8 KB, 348 views)
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Blue's Age Poll:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Animated Sorting:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Mining File Directories:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GetSubFolders:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

GetFileLines:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

FindSimilarValues:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Move (Avoid moving objects game):
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
BlueIshDan is offline   Reply With Quote
Old 08-08-2014, 07:49 AM   #3
BlueIshDan
 
Join Date: May 2014
Posts: 1,122
Thanks: 155
Thanked 159 Times in 156 Posts
BlueIshDan is on a distinguished road
Re: JQuery wont work :(

Would it be considered stealing or wrong if I inspected the $4!T out of this website and figured out how to use their external javascript references and how they went about fitting those referenced functions into their site?

using these references:
Code:
        <script type="text/javascript" src="http://scripts.access-programmers.co.uk/forums/clientscript/yui/yahoo-dom-event/yahoo-dom-event.js?v=387"></script>
        <script type="text/javascript" src="http://scripts.access-programmers.co.uk/forums/clientscript/vbulletin_global.js?v=387"></script>

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Blue's Age Poll:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Animated Sorting:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Mining File Directories:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GetSubFolders:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

GetFileLines:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

FindSimilarValues:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Move (Avoid moving objects game):
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
BlueIshDan is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Queries wont work on the net? richy1 Queries 0 11-23-2007 06:14 AM
Why wont this work JTQ911 Queries 1 07-30-2007 06:51 AM
Please help, simple radio button code wont work and I cant work out why andyj2k1 Forms 6 02-26-2007 04:33 AM
Why wont this code work!! ThunderBolt Modules & VBA 6 05-03-2003 08:19 AM
Why wont count work??? k209310 General 8 01-30-2003 02:55 AM




All times are GMT -8. The time now is 04:59 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World