This one perhaps?
I actually found this one before making the thread. It looks OK, not the best quality, but.... I would have perfered grid but if there is nothing else....
This one perhaps?
I actually found this one before making the thread. It looks OK, not the best quality, but.... I would have perfered grid but if there is nothing else....
I made a VERY CHEESY drawup of what I want the menu to look like and the actual interface it will be used in.
This is the type of menu I want where you see icons and text.
Nowhere in your original question do you mention that you want to use a library or a tool, so maybe it would be good to include that next time.
Try jQuery mobile: http://jquerymobile.com/themeroller/
if you do a simple search, you will get tutorials on how to make one.
http://lmgtfy.com/?q=mobile+menu+tutorial
Im sorry.
But I didnt say that I wanted to do this for a mobile either. I want it to be for a desktop. I simply want a combobox filled with small thumbnails and text using the most simple method (which would be a library or/and tool).
i dont think jQuery Mobile is what I want and I dont want a menu for mobile....
stupidajax: function()
{
var varpas=$j('#somediv',window.parent.document).text();
varpas.replace(/\s/g, "");
$j.ajax({ // Start AJAX function
url: 'mysqlcall.php', //script
async: false,
data: "parameter1="+varpas, //you can insert url argumnets here to pass to api.php
//for example "id=5&parent=6"
dataType: 'json', //data format
success: function(data) //on recieve of reply
{ //start success function
var selecthtml='Things: <select name="d" id="d">'
for (var i=0;i<data.length;i++)
{ //start for
var r = data[i];
var n = r[0];
var c = r[1];
if (i==0)
{
selecthtml=selecthtml+'<option value="'+c+' selected="selected">'+n+'</option>';
}
else
{
selecthtml=selecthtml+'<option value="'+c+'>'+n+'</option>';
}
} //end for
selecthtml=selecthtml+'<option value="Default">Default</option>';
selecthtml=selecthtml+'</select>';
} //end success
complete: function(data)
{
alert("hi"); // <----line that pisses me off
}
}); //end ajax function
},
Im trying to print that hi alert AFTER I load up the combobox but it always comes out first. I thought the complete function was able to do that but it does not do it. What is the best way to print it out?
I want to say that I dont want to just print out a alert, I want to do something else but once I get that alert out there, I can move on to something more complicated (the image loading)
Thank you
I imagine it would be done with CSS and Javascript, thank you for confirming :) but my question is HOW; What library or tool can I use to accomplish this?
Thank you
Hello
I want to have a drop down menu showing small thumbnail pictures and text in a "smartphone like" grid.
What can I use to accomplish this? Thank you
The next click must have an attached event. You can do an ajax call there.
Problem is, it would only be the next click from slide 1 to slide 2. Not a next click each time I click to go the next slide.
OK, I got something working :) More or less to what I need....
There is one issue: When I click next, I need to do a (live, I dont think its a good thing to do it when the document loads/ready) SQL query (AJAX sorta thing I believe) how can I do this using the slider cycle plug in?
OK, Im going to try to implement it.... (man, I hate web development)
Either that or you win by default me thinks!
I was screwed :P
Kidding, I said I was screwed because pritaeas and I were the only entries in the contest and noone else provided any code and the deadline was about to be reached.......then Dani extended the contest :(
Why resurrect a 5 month old thread that you could've replied to sooner if you wanted to?
I did not see Dani's reply until now.
Not automatic. I should be able to click a link and then it does that slide to the left (or right) to the next page.
Does the Files uploader still not work with all your extensions disabled??
FOR NOW, it seems to be working correctly....
Hello
Im looking for a jQuery Easy Slider type of plugin but instead of images, allows me to present HTML/JS/etc content to the user for when he, for example, click on the next button (something that Easy Slider provides)
Anything like this out there?
Could someone give me some tips on how to make this work?
Hmm, funny enough, I think it doesnt even use jQuery. Instead it uses MooTools which I have no idea how it works...
I think Magento have that kind of feature. So I am curious why you are switching eCommerce platforms when you have been posting Magento platform issue for the past year?
I think it's a extension or a plugin.
Cant seem to find it.
Well, basically, because Magento is way too dificult to work with on a daily basis.
I ripped the page and I am trying to edit its code now, but recieving some problems with width and height....
Tried to create but I am failing horrible....
Basically
1 page (div) Intro
2 page pick a product
3 page pick a design or make your own
4 page intro personal info
5 page pay
Thats what I want to do using this type of page. It would have been so easy with a plugin.
It could just as well be the regular jQuery animate with easing.
Damn, I want to do it as well :P
Yes but I imagine the effects is made with a plugin right?
Hello
I am VERY intrested in making a webpage like this, with one page only showing and when I click a button it goes to the next page (or scroll, however you want to call it).
What plugin is used here?
Thank you
I would NOT go with Magento. Pain to work with.
Hello
Lets say I have a online store where I sell shirts. First I select a shirt (colored or design) after I can choose to draw something else or leave it as is. Later, standard regular checkout and buying process.
How can I do this? What eCommence should I choose?
Thank you
You can't embed MySQL/MSSQL Server (they have to be installed), but SQLite may serve your needs.
Fine by me :) As long as its compatible with desktop applications and web applications. I want to be able to know online the stock I have as well....
Hello
I want to make a standalone program that (for example) is for a very small supermarket that stores in a database their stock. Now, I dont think it is neccesary to install MySQL Server on a client's computer so how do you "embed" it so to speak into the C# program?
Please ask any questions if they are not clear.
Thank you :)
Cookies and Sessions are 2 different things: http://php.about.com/od/learnphp/qt/session_cookie.htm
I was referring on interacting with cookies via PHP and Javascript. But yes, your answer is more correct after rereading his original post.
Cookies are the same for Javascript and PHP. There are no "PHP cookies" and no "Javascript cookies". Its all the same.
Just want to make sure you know that :)
Ive made the process a bit differently.....
When I load the image, I automatically scale it to the size of my "area". Then from there I work upwards or downwards....
When I load
image.onload = function()
{
if (image.width >= image.height)
{
var bigside=image.width;
}
else
{
var bigside=image.height;
}
factor=canvas.height()/bigside;
$j("#factor").html(factor);
x = (canvas.width() / 2) - ((image.width*factor) / 2);
y = (canvas.height() / 2) - ((image.height*factor) / 2+10);
$j("#width").html(image.width*factor);
$j("#height").html(image.height*factor);
context.beginPath();
context.drawImage(image, x, y, image.width*factor, image.height*factor);
context.closePath();
}
Scale up and down:
$j('#imageplus').mousedown(function(e) {
var factor=$j("#factor").html();
if (this.image.width >= this.image.height)
{
var bigside=this.image.width;
}
else
{
var bigside=this.image.height;
}
this.image.width = $j("#width").html() * 1.01;
this.image.height = $j("#height").html() * 1.01;
$j("#width").html(this.image.width);
$j("#height").html(this.image.height);
this.x = (canvas.width() / 2) - ((this.image.width) / 2);
this.y = (canvas.height() / 2) - ((this.image.height) / 2 );
this.canvasListener.redraw();
}.bind(this));
$j('#imageminus').mousedown(function(e) {
//this code glitches for now. Remove this if
if (($j("#width").html()<="1") || ($j("#height").html()<="1"))
{
alert ("Too small");
return true;
}
var factor=$j("#factor").html();
if (this.image.width >= this.image.height)
{
var bigside=this.image.width;
}
else
{
var bigside=this.image.height;
}
this.image.width = $j("#width").html() * 0.99;
this.image.height = $j("#height").html() * 0.99;
$j("#width").html(this.image.width);
$j("#height").html(this.image.height);
this.x = (canvas.width() / 2) - ((this.image.width) / 2);
this.y = (canvas.height() / 2) - ((this.image.height) / 2 );
this.canvasListener.redraw();
}.bind(this));
There has to be a workaround.
Ive come up with a solution anyhow.
I think I got it solved :)
Anyways the original question was solved: Lets not go on a pointless debate please :)
If it is "the way it is supposed to be expressed", are you implying that the guys who invented the programming language were wrong by adding these expressions?
Never planted this but yes; I agree adding these expressions were wrong.
Then, luckily for you, you haven't found a complex enough program.
Problably you are correct.
It is not about making code simple FOR the machine... As long as your syntax is correct, compilers don't give a rat's behind about how your code is laid out. You might as well be making your arithmetic expressions longer and more ridiculous and the machine will give you the same result you're expecting, since it doesn't care about rules, standards or optimal code; as long as you have your syntax right.
for(i=0; i<employeeArray.length; i++){
employeeArray[i].privilegeString += companyPrivileges.employeesByLevel(employeeArray.level++).getPrivileges();
}
This is just some random code I though about now, maybe not as "complex" as I intended it to be. It doesn't even make much sense... But which do you think is more optimal? The x++ x+= way, or the way you like it? If your answer is b then there is no doubt that you live up to your signature, and should read a little about code optimization.
Why stop there?
for(i=0;i<employeeArray.length;i++){employeeArray[i].privilegeString+=companyPrivileges.employeesByLevel(employeeArray.level++).getPrivileges();}
Lets strip all the spaces to optimize even more!
....my answer would be C........um....
x++ A
x+= B
x=x+1 C
Doing things your way makes unnecessarry memory allocations …
Sure :) Ill try to answer all your questions.
Really, there isnt any reason between choosing GET and POST. My code is something like this:
$j.ajax({ // Start AJAX function
url: 'mysqlcall.php',
async: false,
data: "somethingipass="+somevariabledeclaredaboveigetfromapage,
dataType: 'json',
success: function(data) //on recieve of reply
{ //start success function
var selecthtml='Im making a combo: <select name="combo" id="combo">'
for (var i=0;i<data.length;i++)
{ //start for
var row = data[i];
var name = row[0]; //first column result
var age = row[1]; //second column result
selecthtml=selecthtml+'<option value="'+age+'">'+name+'</option>';
} //end for
selecthtml=selecthtml+'</select>';
if (data.length!=0)
{
$j('#somediv').append(selecthtml);
$j('#divforcombo').show();
}
else
{
$j('#divforcombo').hide();
}
} //end success
}); //end ajax function
So if I could do it via POST, great :) but no idea how to (or maybe I tried and it did not work)
Basically my code autoexplains but: Im making a combobox with text (name) and a value (age).
Also, the table is static. Thats why in the stored procedure I would have it static as well. I left if like this simply out of laziness as that variable could be static and thats it....
Hello
I have this similar code:
var SomeVar = Class.create({
one: null,
two: null,
three: null,
initialize: function(one, two) {
this.one = one;
this.two = two;
},
startListeners: function() {
$j('#somediv1').mousedown(function(e) {
this.three=3;
three="hi"
}.bind(this));
$j('#somediv2').mousedown(function(e) {
console.log(this.three);
console.log(three);
}.bind(this));
},
});
As you see there are more can one variable called "three". What is the best way to have one common variable named three where I can modifiy it freely and it does not get deleted/destroyed everytime I do a mousedown on divone then on divtwo it comes out null.
It may be related but what the hell is "}.bind(this));"?
i want to know about the program.... you may help me..
Program?
Anyways, something odd appears as sometimes it shows correctly, other times it doesnt. I BELIEVE it has something to do with opening the screen maximized or not but Im not even going to try to touch that.
I believe to leave as it, even though in IE it looks horrible.
I hope you're not changing code that someone else wrote just to suit your own aesthetic preferences. That's an excellent way to introduce bugs.
Yes, I do. As of today any time I see x+=y or x++, as long as I am 100% sure of the change, I change it to x=x+y and x=x+1 the way it is suppose to be expressed. And as of today, I have never introduced a bug because of it.
I'd also argue that your preference is unconventional and will cause programmers to stumble over your code not because they don't understand it, but because they don't trust that you understand it. When a language supports x += y or x++ for example, any use of x = x + y will be viewed with suspicion; this is justified, in my opinion, because bad programmers are the ones that use such constructs without good reason.
Unconventional? I dont understand it? How can I understand code that is clearly written?
My reason is good, if not the best: Programmers should code the easiest way possible for them to understand their code.
If you think for writing x++ instead of x+1 make a programmer understand his code a lot easier, then sadly we are still stuck in that 50s-60s (I think that was the time Fortran was introduced) programming mentality where code should be as simple as possible and for the machine to understand it, not us.
The code I posted (thanks to what was posted earlier) works. The problem is not the code. The problem is the scale.
The example uses "1.1" and "0,9", There is a difference each time Im changing the size. What if I want to make the difference less and less noticable? What (example) numbers would I use?
- Think of it like a number line. 1, in this case, is the center (no change). Hope that doesnt confuse you.
It confused me, yes lol.....
No idea what you ment.
While I'm at that, I'd recommend to get used to seeing the n++and n-- syntax, which are used very often as well.
Always change that as well.
n=n+1;
it optimizes your code (albeit for a few bytes)
Programmer should understand the code, not the computer. It should be optimized for the programmer, not the computer.
Sorry, its a heated debate I feel passioned about.
Hmm I got it to work for makign the image larger (smaller factor) but when I make it smaller it takes two clicks for it to disappear....
$j('#imageplus').mousedown(function(e) {
/* this.image.width = this.image.width+ this.RESIZE;
//this.image.width += this.RESIZE;
//this.image.height += this.RESIZE;
this.image.height = this.image.height + this.RESIZE;*/
this.image.width = this.image.width * 1.01;
this.image.height = this.image.height * 1.01;
this.x = (canvas.width() / 2) - (this.image.width / 2);
this.y = (canvas.height() / 2) - (this.image.height / 2 + 10);
this.canvasListener.redraw();
}.bind(this));
$j('#imageminus').mousedown(function(e) {
/*//this.image.width -= this.RESIZE;
//this.image.height -= this.RESIZE;
this.image.width = this.image.width- this.RESIZE;
this.image.height = this.image.height - this.RESIZE;*/
this.image.width = this.image.width * 0.09;
this.image.height = this.image.height * 0.09;
this.x = (canvas.width() / 2) - (this.image.width / 2);
this.y = (canvas.height() / 2) - (this.image.height / 2 + 10);
this.canvasListener.redraw();
}.bind(this));
Sorry about scaling; Not too logic for these things....
Perfect JorgeM thank you....
Fuck..........one of the buttons now doesnt work correctly....
OK, thank you.
I hate code written like that. It takes a second to copy and paste instead of writing something like h+=l
Thank you. Solved.
Are you saying this is happening to your code mistakenly or this is the effect that you are trying to implement? Code sample?
Sorry :)
Its something I want to implement but dont know how or/and the best way.
Got it to work :)
Dont understand about scales too much :P but is there a way to make it with a even smaller factor?
Would it be 1.0 and 0.8 and such?
Hello
This is one of those stupid questions but you gotta ask to be sure
What is
var h=0;
h += 5;
var l=0;
l -= 5;
Is it the same as:
var h=0;
h = h+ 5;
var l=0;
l = l- 5;
Thanks and sorry for the stupidity
Hmm.......seeing how is the best way to do it but for some reason can't see the similarity between both codes....
The fiddle uses CSS but my code directly accesses the properties of the item (as far as I can tell)
Looks great :)
Why the 1.1 and the 0.9?
Hello
How can a small (I imagine jQuery UI popup) popup hover over a page then disappear after x seconds?