1

Checkboxes values are only submited if they're checked, and text values are always submited even if blank.
So if you check only 5 boxes, the length of $_POST['checkbox1'] will be 5 but the length of $_POST['quantity'] will still be 10.

I suggest you to name each input text with the correspoding prodcode used on the checkbox, like name='quantity_".$row['prodcode']."' and then for each checked input you get it's text using $_POST["quantity_".$check[$i]].

1

It's a silly thing... you're reaching for the form with document.getElementById('myForm'), but your form doesn't have id="myForm".

Just add the id to your form or use document.forms['myForm'] to get it by it's name.

Example:

    function onSelectedOption(sel) {
    var frm = document.forms["myForm"];
        if ((sel.selectedIndex) == 3) {
            frm.action = "a.php";
        }
        else
        {
            frm.action = "b.php"; 
        }
        // I don't think you want to submit the form eah time the combobox is changed, or do you?
        // If you do, just remove the comments.
        //frm.submit();
    }
Votes + Comments
thanks for your answer. its solved now..
1

Choose your IDE (Eclipse, Android Studio or even Visual Studio now a days), install the stuff, install the sample apps and start playing!

Almost every release of an API version has an attached API Samples with dozens of apps each one demonstrating one or more features.

If you got and Android device you can just plugin and start debugging, or if you don't, set up and virtual device to do it =)

I think hands on are the best way to go! And the link @stultuske recommend is the best one, android documentaion is neat!

Ps.: I used Eclipse for somewhile but a couple a months ago I migrated to Android Studio, and i'm liking it.

3

Man, you could get lucky and someone that already used this class could come in an give it all on a platter to you, but's that unlikely.

You should attempt to use it on your own and if you fail, then you come explain what happend and post your code so even people that never used the class can maybe find bugs in your code.

You need to show effort if you want other people to help you.

I mean, look at me, i'm here taking time giving you a lesson on basic learning instead of reading about the class you asked =)

Give it a go!

1

Just a remark about your code, it would be much more elegant and performatic like this:

 var $overlay = $('#overlay_image_text'),
    engraving = this.engravingFontCaseSenstiveOptions(cText);

 if( engraving == "Lower")
    {
        $overlay.css({
            'margin-top':'-162px',
            'font-size':60+'px'
        });
    }else if(engraving == "Upper")
    {
        $overlay.css({
            'margin-top':'-154px',
            'font-size':48+'px',
            'margin-left':'0px'
        });
    }
    .
    .
    .

In general notes, evit calling the same function over and over again. And every time you all $("#") or .css({}) you're executing a function. This take serious effect if inside a large loop. Obs.: you should cache the var outside the loop but not in the global namespace, store somewhere it will not have attachaments as soon as possible.

1

If the column it's an image you can't add text to it, you need to parse to a byte array.

If you have an base64 image string for example, you can call byte[] toDecodeByte = Convert.FromBase64String(data);

Anyway, you shouldn't be using Image column, use varbinary(MAX) instead.
From Microsoft:

ntext , text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead.

And besides that, you shouln't be storing images on the database anyway.
The best approch is to store the image on the hard disk and only store it's path on the database.

1

Since you are using bootstrap you could use BootstrapDialog, quite easy...

Just call BootstrapDialog.show({
    title: 'You title here',
    message: $(images)
});

And to upload it you could use xhr itself

var xhr = new XMLHttpRequest(),
    url = 'upload_page.php';
if (xhr.upload) {

    // file received/failed
    xhr.onreadystatechange = function (e) {
        if (xhr.readyState == 4) {
            if ( xhr.status == 200 ) {
                // File uploadded
                var response = xhr.responseText;
            }
            else {
                // Upload error
            }
        }
    };

    xhr.open("POST", url, true);
    xhr.setRequestHeader("X-File-Name", file.name);
    xhr.setRequestHeader("X-File-Size", file.size);
    xhr.setRequestHeader("X-File-Type", file.type);

    xhr.setRequestHeader("Content-Type", "multipart/form-data");
    xhr.send(file);
}
2

Hey fellas,

some time ago I started trying out Brackets, and guess what? Loved it!

If you don't know, it's an open soude editor made out of html, css and javascript, powered by node JS and chromium and sponsored by Adobe.
A lot of open sources projects coming together to make a beautiful IDE.

And it's made of sutuff we know about, so it's possible to tweak and improve and mess things out.

Anyway, the play was so fun that it turn out to be an SQL Browser Extension.

If you use brackets you should check it out: https://github.com/alemonteiro/brackets-sql-connector

It's only on the beggining, but the possibilities are inumerous =)

And I tell you, it's a beautifull mess coding the extension on the extension IDE and debugging it like it was an browser, I get confused some times yet =x.

Have a good week!

Votes + Comments
your project works excellently
1

Oh boy! I wish I could!
But you know, I still need to maintain an VB.NET using Visual Studio 2008. Can't even update it to newer IDE's because of client restrictions =/
TI on enterprise networks hurts my soul.

But I just got an new HDD, so this weekend I begin building my Linx Dev Env =) Wish me luuuuuck ^^

I'm gonna start with Debian for now, i'm concered with Arch stability.
Thanks all for the inputs.
I'm just gonna leave this open for a while, so I can post the results back to you.

Wish a happy holliday to you all!

1

You can just take apart the URL page and the params, like this:

function LoadYearMakeModelUsingAutoVin(controlItem, dataSourceUrl, postParams) {
    ...

    var xmlHttp2 = new XMLHttpRequest();
    xmlHttp2.open("POST", dataSourceUrl, false);

    //Set proper header data
    http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    http.setRequestHeader("Content-length", postParams.length);
    http.setRequestHeader("Connection", "close");

    xmlHttp2.send(postParams);

    ...

}

//And use it like
LoadYearMakeModelUsingAutoVin(controlId, 'RequestXml.aspx', 'name=GetVehicleInfoUsingVinCanada&VinOrSerialNumber=' + vinOrserialnumber);

Or you could use FormData also:
https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects

1

I'm a little bit confused by what you're saying, but let me try to explain to you how it works:

When the browser request newspaper.com/sports, the WebServer (IIS or Apache or etc) will first see if there's any Rewrite Rules that match /sports.

If there's no rule that match /sports, then the WebServer will think that /sports is an directory (because there's no extension and the WebServer handle each requested file by it's extension, so it knows what and how to treat the file - extensions are related to MIME Type configs and Module Handlers).

If the directory /sports exists, then the WebServer will try to find the default document for that directory (index.html, default.aspx, index.php and etc). If the default document exists (default document configuration and also the physical default doc), then the WebServer will parse this file and return it's content.

If the directory /sports exists but there's no default document, then WebServer will either list the directory contents (if the WebServer is configured to do so) or it'll return the error 403 - 'Directory Listing not Permitted'

Last but not least, if the directory doesn't exists at all the WebServer will return 404 - 'Not Found'.

If you don't know them, rewrite rules make possible /sports to be redirect to /sports.html or even /sports/volley to /sports?id=volley.
Rewrite rules are very usefull. Most sites that have friendly urls use rewrite rules.

Anyway, to help you out you need to show us what 'code' are you seeing instead of ...

1

Thanks guys. I think it's possible to make the move using an Win VM for what anything that isn't going well on linux.
I will even keep my current HD and if needed, could even be run as an VM box also (Really usefull this by the way: http://www.serverwatch.com/server-tutorials/using-a-physical-hard-drive-with-a-virtualbox-vm.html)

@Freshly, I took a look at Arch, but i'm concerned about stability using a rolling distro for a development environment. Don't you get stuck sometimes?

For now i'm thinking going

Votes + Comments
Interesting link
1

Hey fellas.

I've been using Windows as my main OS since I sat on an PC with win 95. Now I think is time to finally change to Linux!

The main reason I didn't change sooner was because the .NET dev env, but now there's Mono.

So, I really would like some suggestion about what distro and desktop interface to use.

What do I use PCs for:

  • Web Dev (.NET, PHP)
  • Android Dev
  • DataBase Managing (MySQL & SQL Server)
  • Little Bit of Design(Photo edit, vectors and very little movie editing)
  • CS GO (Steam Game)
  • Security Tests (With Kali)
  • Basic Stuff (Web,Docs,Music,Movie,Pics...)

I've been playing with distros on virtual boxes and pen drivers for a while, including Ubuntu, Debian, BackTrack, Kali, SlackWare and Mint.

I don't like dual boot too much, so the most important question, do you guys think I would be OK with Linux as my main OS using virtual box or wine for a few things(like SQL Server Management Studio) ?

If yes, what distro and desktop do you recommend?

Any other tips, remarks or suggestions are welcome.

Oh, also would like to confirm somehting... If I choose Debian, can I get any functionallity on Kali just by installing the packages needed, right?

Thanks!

1

I can't say much because I've never actually used one, I've ended up creating my own solutions for each need, but I was helping my brother start with web dev to make a site for our father knife business and he decided to use the Slick Plugin: http://kenwheeler.github.io/slick/

Was one of the easist to implement by a non developer and had great reviews on fuctionality and performance.

Take a look at the result: http://nonomonteiro.com.br/available/fc_gyutsend/

The top carrosell and the knife photos are two different instances of the slick plugin.

Hope it fits for you.
Cheers.

1

If you bind 'contextmenu' event that only capture right clicks, like:

// FROM https://api.jquery.com/contextmenu/
$( "#target" ).contextmenu(function() {
  alert( "Handler for .contextmenu() called." );
});

Or you can listen to mouse down, like this:

$('#element').mousedown(function(event) {
    var button = event.which || event.button;
    switch (button) {
        case 1:
            alert('Left Mouse button pressed.');
            break;
        case 2:
            alert('Middle Mouse button pressed.');
            break;
        case 3:
            alert('Right Mouse button pressed.');
            break;
        default:
            alert('You have a strange Mouse!');
    }
});

Or you can use some plugins for context menus if that what you want:
https://plugins.jquery.com/tag/right-click-menu/

1

If you doubt is who to know when to send an email, i see two options for you:

  1. Use cron jobs that will run at specific intervals, identify the new records and send the e-mail. This way you can do it easily with PHP but you'll need to have some flag to know if that record was already mailed or not.

  2. Use a trigger on your SQL Server that will run and external command (probably call your PHP mailing page) each time a record is created.
2

Hello timtim, welcome to the web dev world.

My default web apps now a days use at least the following libs:

  • jQuery
  • jQuery UI
  • Bootstrap

For charts: HighCharts
For Icons(just css): Font Awesome

But there's lots of good and rich libs and frameworks out there. Each one has its pros and cons and depending on what you want to do one can be better than another.

I suggest reading some reviews to see what fits best for you.

http://noeticforce.com/best-Javascript-frameworks-for-single-page-modern-web-applications

http://www.sitepoint.com/top-javascript-frameworks-libraries-tools-use/

Good luck
and welcome once more.

Votes + Comments
Thanks a lot AleMonteiro.Looking foward to learn more on this exciting area.