AleMonteiro 238 Can I pick my title?

You didn't show any problems. This list is only about things that you need to analyse, study and take care of.

When you have to create an database model you need to understand what are you modeling in the first place.

We can't tell you the entities for those systems, because it depends on the level of details that you're going to implement. A Job Managment System could have 5 or 25 entities, depends on the requisites for your project.

It's no use creating a super database model if you don't have the time, knowlodge or the resources to implement it all.

If you are not familiar with entities and entities relationship I suggest you study them a little bit before enter a specific cenario.

AleMonteiro 238 Can I pick my title?

There's a lot of ways of doing it, some of those are:

  • Using IFrame to load the page
  • Using RSS Feeds
  • Using some webservice/API provided by the site(like facebook and twitter)
  • Using HTTPRequest on the server-side to load the page as text and them parse the content that you want to extract
AleMonteiro 238 Can I pick my title?

Post the code of where you call the resize function.

AleMonteiro 238 Can I pick my title?

You're welcome.

Just so you know, you could do it all in the UI with JS, but I particularly don't like this because you'd be retrieving all the records from the DataBase, transfering all to the browser and then processing all the data in the UI. If it was few records, there is no problem, but if you're working with lots of records the performance would be very poor.

AleMonteiro 238 Can I pick my title?

Does it throws any errors? Did you debug it to see what's the value of $div.parent().height() ?

AleMonteiro 238 Can I pick my title?

I suppose you are using a DataBase to store the records, right?
So, if you table is normalized (one table for each type of record) you can make a select from each table that you want to use as a filter to populate the dropdowns. Then, if a dropdown is selected, you use that value in a WHERE clause.

If you table is not normalized (I.E. the Court name is wrote in the Game table, instead of having a Court table) you need to make a select distinct for each column that you want touse as a filter. Then the WHERE clause is the same as the first case.

AleMonteiro 238 Can I pick my title?

The link is not working, please verify it.

AleMonteiro 238 Can I pick my title?

What is happening?

AleMonteiro 238 Can I pick my title?

If your question is resolved, please set the post as Solved and also mark the answers that was helpfull to you.

AleMonteiro 238 Can I pick my title?

The script that I posted already takes care of any number of div's that are in the 'original' div.

About the width and height, I'm guessing that when a "bullet" is clicked you'll have to change the style of the original linked div to 100%, you can do this by setting the divs height equals it's parent height.

In example:

function setFullSize($div) {
    $div.height($div.parent().height());
    $div.width($div.parent().width());
}

Note that $div is an jQuery object, and that this is a simplistic example. You may need to take care of padding and margins to get an accurate result.

AleMonteiro 238 Can I pick my title?

No, there is not a problem. There is only methods to do it. You can make a insert from a select, like I posted.

AleMonteiro 238 Can I pick my title?
AleMonteiro 238 Can I pick my title?

I found that intriging to make, so I made a little demo in the style of a jQuery plugin.

Take a look, it's pretty basic yet, but can turned into a plugin.

<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

        <script>

            // Extends jQuery methods
            $(function($){
                $.fn.extend({
                    /*
                        Create 'bullets' for each children of the selector element. 
                        Tested only with one element, so it's recommended to use #ID

                        @param holder is container that the cloned objects will be appened to.
                        @param proportion it's a decimal between 0.1 and 0.9. This will affect in the size of the cloned objects.
                    */
                    makeBullets: function(holder, proportion) {

                        var 
                            // Destination Container
                            $holder = $(holder),
                            // Properties that will be resized by the proportion specified
                            properties =  ["width", "height", "top", "left"];

                        // Each div that will be copied and resized
                        $(this).children().each(function(){
                            var $t =$(this), $c = $t.clone(), i, val;

                            // Each property that will be resized
                            for(i=0, il=properties.length; i<il; i++) {
                                val = parseInt( $t.css(properties[i]).replace("px", "") );
                                $c.css(properties[i], Math.floor(val * proportion) + 'px'   );
                            }


                            $c
                            // Adds mouse over/out styles to the bullets
                            .hover(function() {
                                $(this).addClass("hover");
                            },function(){
                                $(this).removeClass("hover");
                            })
                            // Adds click function, uses closure to retain the orignal item reference
                            .click(function($originalItem){
                                    //$holder.children().removeClass("selected");
                                    $t.siblings().removeClass("selected");
                                    $t.addClass("selected");
                                });

                            $holder.append($c);
                        });

                    },


                });

            }(jQuery));


            // OnLoad
            $(function(){   
                // Creates the bullets with 0.2 of their original size and append them to #bullets
                $("#original").makeBullets("#bullets", 0.2);
            });
        </script>
    </head>

    <style type="text/css">
        div#original > div, #bullets > div {
            width: 200px;
            height: 200px;
            border: 2px solid black; …
AleMonteiro 238 Can I pick my title?

I'd do it like this:

"insert into hostel_info(hostelName,rooms,capacity) select HostleName, '" + hmr.RoomNO + "','" + hmr.CapacityID + "'  from tbl_Hostel where (HostelID ='" + hmr.HostelID + "')";

Clean example:

INSERT INTO hostel_info(hostelName,rooms,capacity) 
SELECT HostleName, 'rooms', 'capacity'  
FROM tbl_Hostel 
WHERE (HostelID = 'id')
AleMonteiro 238 Can I pick my title?

Man, I have no idea of what you trying to do. Your code doesn't make any sense to me.
You want to have an array and create radio buttons, is that it? I mean, if there 10 itens in the array you want 10 radio buttons?

AleMonteiro 238 Can I pick my title?

It's not a good implementation what you're trying to do, and I don't know if it can be made like that, I think not.

I'd suggest one of two things: Either do it on the ItemDataBound event on your code behind OR, the easiest one, create a function that return the stock label.

Something like this:

Public Function GetStockLabel(ByVal qty As Int) As String

    If qty < 1 || null
    Then
        Return "Out of Stock"
    Else if qty < 5
        Return "Less than 5 available"
    Else
        Return "In Stock"
    End If

End Function

And call it like this inside <itemtemplate>:

<b><%# Eval("ProductName") %></b>
<%# GetStockLabel(Eval("CurrentStockQty")) %>
AleMonteiro 238 Can I pick my title?

Try like this:

var images = ["art.berto-2.jpg","shawnajord.png","caitlynnew.png"];
var x = 0;

$(document).ready(function() {

    $('.hover').mouseover(function(){
        $(this).css('color', 'red');    
        $('.hover').mouseout(function(){
        $(this).css('color', 'black');                        
        });
        $('p').mouseover(function(){
        $(this).css('color', 'orange');                   
        });
        $('p').mouseout(function(){
        $(this).css('color', 'black');                    
    });// for the links

    // var changePic = $('pageTitleBanner').attr('src');

    $('#masthead').mouseover( function() {
        $(this).css('background-color','red');
        })
        .mouseout( function() {
        $(this).css('background-color','black');

        })
        .click( function() { 
            $(this).css('background-color','blue');

            document.getElementByName("picImage").src=images[x++];
            if (x==images.length) {
                x=0;
            }
        }

        });

        });     


    });// end ready
    </script>
AleMonteiro 238 Can I pick my title?

Try this:

<html>
<head>
  <script>
  function CheckDivisors()
  {
     var 
        number=parseInt(document.divfrm.num.value),
        d=1,
        divisors = [];
     do
     { 
        if(number%d==0)
        {       
            divisors.push(d);
        }       
      d++;
     }
     while(d<=number/2);

     document.getElementById("divDivisors").value = divisors.join(", ");
  }
  </script>
  </head>
 <body>
 <form name="divfrm">
 Enter a number: <input type="text" name="num">
 <br>
 Divisors: <input type="text" name="div" id="divDivisors">
 <br>
 <input type="button" value="Display Divisors" onClick="CheckDivisors()">
</form>
</body>
</html>
`

It's not wise to make DOM changes inside a loop. DOM manipulation is heavy, so it's better to put gather all that you want to show and then show it all at once.

AleMonteiro 238 Can I pick my title?

You are not using ID's as I told you too. Please review my last post.

AleMonteiro 238 Can I pick my title?

I see, that's it them. You can create a UserComment class to hold all the data, including Title, Text, UserName, Comment DateTime and so on.

I suggest you start by defining your database structure. I mean, you probably already have a Users table, so you'll need to create an UserComment table, or something like that.

Once you have your database created, creating the Class is much more simpler.

Good luck.

AleMonteiro 238 Can I pick my title?

One question, those inputs are going to stay on the page only for the current user session or they must appear in the next visits as well?

In the first case, I'd save them in the Session, using an List<UserInput>. Where UserInput is a class with Title and Text properties.

In the second case, I'd save them on the DB and also would use an List<UserInput> for retrieving the saved itens from the DB.

Then, to show the saved itens(either from DB or Session) I suggest you to use a Repeater, as recommend by JorgeM.

The best thing about creating your own class to store the itens is that you can sofisticate it later, adding more information.

AleMonteiro 238 Can I pick my title?

Try like this:

<ul class="css-tabs">
    <li><a href="#first-tab">info</a></li>
    <li><a href="#second-tab">info</a></li>
</ul>

<div id="first-tab">
first tab information in here
 </div>

<div id="second-tab">
 2nd tab information in here
</div>

But you can't duplicate this HTML to create another tab, because the ID's must be unique!

If want two tabs, create two set of ID's.
You can do like this: 'first-tab-first-panel', 'first-tab-second-panel', 'second-tab-first-panel', 'second-tab-second-panel';

AleMonteiro 238 Can I pick my title?

It's an <a> or an <button>?

AleMonteiro 238 Can I pick my title?

If you are going to develop a rich internet aplication you will need, at least:

  1. To create the User Interfe:
    1.1. HTML
    1.2. CSS
    1.3. JavaScript
  2. To handle the user requests and process data on the server:
    2.1. PHP
    2.2. MySQL, or another database

Talking about concepts, you could use knowdloge of, but most are not pre-requisites:
1. Client-Server Aplication
2. Object Oriented Programing
3. Relational DataBase

AleMonteiro 238 Can I pick my title?

HTTP Error 504 it's gateway timeout.

How are you trying to insert the data into the database?

You said you are using JS and ASP. The JS is reading the file and sending the data to the ASP server page to insert into the database? Is that right?
If so, then the your http request is pretty big and would take some time to complete.

Assuming you are using IIS, you can try to change the limits of the http request, like this:

<httpRuntime maxRequestLength="102400" executionTimeout="3600" />

This will set the max length to 100MB and the timeout to 60 minutes.

AleMonteiro 238 Can I pick my title?

As far as I know, barcode scanner work as a keyboard. So it may be sending an Enter key that click the default submit button, as said by stbuchok.

I'd suggest you to remove any <button type="submit" /> and <button /> and try it again.
Ps.: Buttons without types are treated as submit type too.

AleMonteiro 238 Can I pick my title?

I'd say jQuery UI. It's a great project, much used over the web, with lots of functionalities and it's has a great community.

I never joined the group, but I really respect and appreciate the job they're doing.

AleMonteiro 238 Can I pick my title?

Sorry, but for what I searched it's not possible to do what you want. DataList doesn't support composite keys, as DataGrid supports.

Take a look at those links:
http://stackoverflow.com/questions/3669949/datakeys-datalist

http://forums.asp.net/t/1665469.aspx/1

AleMonteiro 238 Can I pick my title?

Are you using pure JavaScript or jQuery as well?

AleMonteiro 238 Can I pick my title?

Another option is to execute the function on page load, like this:

window.onload = function() {
    loadData();
};

Just a suggestion, instead of concat the ID's in different orders for the input and for img, wouldn't it be easier to add a sufix?
IE.:

// Set IDs
<td class="calendar-day">
    <input type="text" size=5 id="'.$parentID.'_'.$activityid.'_'.$mon.'"  class="timetracktb" />
    <img id="'.$parentID.'_'.$activityid.'_'.$mon.'_IMG" src="phpimages/trash.png" title="delete timelog" alt="trash icon"  />
</td>

// And to get the Img
var inputId = inputs[i].id;
var imgId = inputId + '_IMG';

Another thing, you don't have to add closing tags for <input> and <img>, they can close themselfs, like <img id="a" /> and <input id="b" />

Also, avoid using those inline styles. Use the css classes that you already have.

AleMonteiro 238 Can I pick my title?

What does DataList1.DataKeys[e.Item.ItemIndex] returns?
Debug and see what's the value.

AleMonteiro 238 Can I pick my title?

Maybe like this:

string keys[] = DataList1.DataKeys[e.Item.ItemIndex].ToString().split(',');
string productId = keys[0];
string customerId = keys[1];
kvprajapati commented: Helpful. +14
AleMonteiro 238 Can I pick my title?

No, <br/> is not the best option to vertical space. I suggest using margin and/or padding, depend on your needs.

AleMonteiro 238 Can I pick my title?

Try like this:

myDataList.DataKeyFields = "myCol1,myCol2";
AleMonteiro 238 Can I pick my title?

Yes, it possible. With JavaScript the click event data has the coordinates of the mouse when the click occured, both relative to the page and to the screen.

AleMonteiro 238 Can I pick my title?

To achieve this kind of validation you need to do it with JavaScript. Because if you do it only with asp.net, the page will make a request to the server to validate each field.

I recommend that you use jQuery to achieve this functionality without too much headaches.

There's lots of jQuery Form Validation plugins out there, just google a bit that you'll see.

But it's not hard to code your own.

The logic is kind of simple: When a input value changes, validate it's content and if it's not valid, show the warning message.
Take care of hidding the warning message when the input became valid.
It's also nice to differ a empty required field from a invalid content.

AleMonteiro 238 Can I pick my title?

Yes, it's a good idea to have a style sheet only for IE in your case.

You can do it like this:

<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="all-ie-only.css" />
<![endif]-->

Take a look at this site for more info: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/

AleMonteiro 238 Can I pick my title?

Sorry, but I don't have time to analyse the game script at the moment.

But, what you need is to identify what is the "game over" event and in that event send the data to the server-side script to increment the database record.

To simplify, maybe you could add an button like 'Save Score' or something like that.

AleMonteiro 238 Can I pick my title?

That's depends... You could save the points after the game ends, or save every X seconds/minutes, or save every game level, etc.

AleMonteiro 238 Can I pick my title?

I don't know nivoSlider to help you out.

But you could take a look at others slider plugins:
http://webdesignledger.com/resources/8-responsive-jquery-slider-plugins

http://www.tripwiremagazine.com/2012/11/jquery-slider.html

AleMonteiro 238 Can I pick my title?

Is something like this?

.my-nav-bar {
    width: 100%; /* the parent must have 100% either */
    overflow: hidden; /* hides overflow */
}
AleMonteiro 238 Can I pick my title?

To my knowlodge, when you don't specify the width to 100% (last case) the browser takes care to make the child 100% of it's parent, including border and padding.

When you do specify width 100% (second case) you are saying that only the width must have 100%, without border and padding. So in the end the width will be the 100% of the parent plus border and padding.

And I think those implementaions depend on the browser.

Check those links to futher understanding:
http://www.w3schools.com/css/css_boxmodel.asp

http://www.daniweb.com/web-development/web-design-html-and-css/threads/442058/how-can-i-stretch-my-nav-bar-to-fit-width-of-browser-wothout-scroll-bar

http://css-tricks.com/the-css-box-model/

Smeagel13 commented: Clear and to the point, thanks. +2
AleMonteiro 238 Can I pick my title?

Check this example:

<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

        <script>
            $(function(){
                $("#submit_btn").click(function(){

                    // Get checked inputs
                    var $chks = $("input.chkHobby:checked");

                    // No one checked
                    if ( $chks.length == 0 ) { 
                        alert("No Checked");
                        return;
                    }

                    // Store checked labels
                    var checkedLabels = [];

                    $chks.each(function() {
                        checkedLabels.push( $(this).next("label").text() );
                    });

                    alert( "Selected Hobbies: " + checkedLabels.join(", "));

                });
            });
        </script>
    </head>

    <body>
        <input type="checkbox" name="hobby[]" id="hunting" value="" class="chkHobby"/>
        <label for="hunting" id="hunting_label">Hunting</label>

        <input type="checkbox" name="hobby[]" id="growing" value="" class="chkHobby" />
        <label for="growing" id="growing_label">Growing</label>

        <input type="checkbox" name="hobby[]" id="identification" value="" class="chkHobby" />
        <label for="identification" id="identification_label">Identification</label>

        <input type="button" name="submit" class="button" id="submit_btn" value="Send" /> 
    </body>
</html>
AleMonteiro 238 Can I pick my title?
AleMonteiro 238 Can I pick my title?
AleMonteiro 238 Can I pick my title?

It's not joining because you didn't specify the link column.

You should have something like this: WHERE Table1.Field1 = Table2.Field1 AND...

You need to teel by which columns the tables are linked.

AleMonteiro 238 Can I pick my title?

JorgeM, yes, you're right =)
My mistake

AleMonteiro 238 Can I pick my title?

After <div id="nav" style="float: right;"></div>
Insert <div style="clean: both;"></div>

AleMonteiro 238 Can I pick my title?

Just wrap the image and span into a <div>.

Then, if the div can't fit in the line it'll break to the next with the image and span inside it.

And to keep div's inline i use this css class, for browser compability:

.inline
{
    position: relative;
    display: -moz-inline-stack;
    display: inline-block;
    zoom: 1;
    vertical-align: top;

    *display: inline;
}
AleMonteiro 238 Can I pick my title?

The way you did is on the back-end, using PHP to set the href.
Isn't that working?