Web Development Questions That Don't Need Their Own Thread v2
3,079 replies, posted
[QUOTE=coolj2609;31312467]if your making a podcast can you link youtube video to the URL feed to itunes?[/QUOTE]
not entirely sure that's webdev
[QUOTE=Ac!dL3ak;31312592]not entirely sure that's webdev[/QUOTE] o sorry
[QUOTE=Ac!dL3ak;31311725]why do they all have the same id's?
anywho:
give the a's classes that correspond to the content that you want to display, I.E.
[code]<li><a href="#Welcome" class="awelcome">Welcome</a></li>[/code]
and add the class "content" to all the content divs and then use the JS
[code]$("a.awelcome").click(function() { $(".content").fadeOut(); $(".Welcome").fadeIn(); });[/code][/QUOTE]
I tried this, and couldn't get it working? :(
[QUOTE=zzlawlzz;31326218]-snip-[/QUOTE]
Thanks so much for your help zzlawlzz! and you too Ac!dL3ak :smile:
[URL="http://dl.dropbox.com/u/6613888/website/Milli/index.html"]Here it is in action![/URL] :dance:
How can i make the design stay like it does [URL="http://dl.dropbox.com/u/14605659/asdfg.png"]here[/URL] on low resolutions?
[QUOTE=DaMoggen;31327021]How can i make the design stay like it does [URL="http://dl.dropbox.com/u/14605659/asdfg.png"]here[/URL] on low resolutions?[/QUOTE]
"liquid layouts".
[QUOTE=Chuushajou;31327059]"liquid layouts".[/QUOTE]
Yeah, got it to work. :v:
Just realized I should have posted this here
What happens if I use CodeIgniter and have a page that shows content based on multiple variables sent through the URI?
As an example, a normal URI would look like this
page.php?location=London&price=l+100&type=1+2+7+8
How would that translate into CodeIgniter's routing system?
I'm getting really frustrated with jQuery here.
So I basically downloaded a jQuery Plugin called scrollTo which makes animating easier but it doesn't work no matter what I do.
Here's my HTML <head>:
[code]
<script src="jQuery.js"></script>
<script src="http://www.bavarianblue.com/wp-content/themes/Polished/js/jquery.scrollTo-1.4.2-min.js"></script>
[/code]
and here's the code that just doesn't want to work:
[code]
$("button").click(function() {
$("#form").scrollTo({left: "-=180px"}, 300);
});
[/code]
Basically there's a button that I click and it should scroll the #form 180px to the left at a duration of 300ms.
It doesn't want to run though and I can't figure out why.
[QUOTE=NotMeh;31328032]I'm getting really frustrated with jQuery here.
So I basically downloaded a jQuery Plugin called scrollTo which makes animating easier but it doesn't work no matter what I do.
Here's my HTML <head>:
[code]
<script src="jQuery.js"></script>
<script src="http://www.bavarianblue.com/wp-content/themes/Polished/js/jquery.scrollTo-1.4.2-min.js"></script>
[/code]
and here's the code that just doesn't want to work:
[code]
$("button").click(function() {
$("#form").scrollTo({left: "-=180px"}, 300);
});
[/code]
Basically there's a button that I click and it should scroll the #form 180px to the left at a duration of 300ms.
It doesn't want to run though and I can't figure out why.[/QUOTE]
I'm no Jquery expert, but I'm pretty sure that "=" shouldn't be in the {left: "-=180px"}.. :\
Although I could be completely wrong..
Nope, no difference.
I click and NOTHING happens.
[editline]25th July 2011[/editline]
Ok well, my IDE is telling me that "slice is null or not an object".
I have no idea what that means but Google says it's related to scrollTo.
[QUOTE=NotMeh;31328032]I'm getting really frustrated with jQuery here.
So I basically downloaded a jQuery Plugin called scrollTo which makes animating easier but it doesn't work no matter what I do.
Here's my HTML <head>:
[code]
<script src="jQuery.js"></script>
<script src="http://www.bavarianblue.com/wp-content/themes/Polished/js/jquery.scrollTo-1.4.2-min.js"></script>
[/code]
and here's the code that just doesn't want to work:
[code]
$("button").click(function() {
$("#form").scrollTo({left: "-=180px"}, 300);
});
[/code]
Basically there's a button that I click and it should scroll the #form 180px to the left at a duration of 300ms.
It doesn't want to run though and I can't figure out why.[/QUOTE]
Does the content of the form overflow the <form> element?
Don't think so
I actually just tried
[code]
$.scrollTo(300,300);[/code]
(Which is just supposed to scroll the window itself)
It works in the preview of my IDE but not in any browser
What the fuck?
I've come across a bit of an issue using PHP and MYSQL, I want to get all the values in a field/column using a mysql_query so that I can order them while I do it, and then arrange them in an array, but when I do it all I get is the first value for the field and that breaks things somewhat. Here's my code I'm using to fetch the values as an array.
[code]$posts = mysql_query("SELECT id FROM news ORDER BY id DESC");
$postsValues = mysql_fetch_array($posts);[/code]
[editline]27th July 2011[/editline]
This is where news is the mysql table and id is the field with the values I want to return in.
I'd have edited this in but the edit button doesn't work.
[QUOTE=Sh33p;31366149]I've come across a bit of an issue using PHP and MYSQL, I want to get all the values in a field/column using a mysql_query so that I can order them while I do it, and then arrange them in an array, but when I do it all I get is the first value for the field and that breaks things somewhat. Here's my code I'm using to fetch the values as an array.
[code]$posts = mysql_query("SELECT id FROM news ORDER BY id DESC");
$postsValues = mysql_fetch_array($posts);[/code][/QUOTE]
You need to loop through it otherwise it will only return one row,
[PHP]while($row = mysql_fetch_array($posts)){
}[/PHP]
[QUOTE=Sc00by22;31366182]You need to loop through it otherwise it will only return one row,
[PHP]while($row = mysql_fetch_array($posts)){
}[/PHP][/QUOTE]
Thanks a lot, sorry for being a bit dim but how do I use a while loop like that to get all the values into an array?
[QUOTE=Sh33p;31366294]Thanks a lot, sorry for being a bit dim but how do I use a while loop like that to get all the values into an array?[/QUOTE]
Well you fetched them as an array, why do you need to put them into another one? But here you go(I haven't tested it):
[PHP]while($row = mysql_fetch_array($posts)){
$yourarray[] = $row['id'];
}[/PHP]
[QUOTE=Sc00by22;31366379]Well you fetched them as an array, why do you need to put them into another one? But here you go(I haven't tested it):
[PHP]while($row = mysql_fetch_array($posts)){
$yourarray[] = $row['id'];
}[/PHP][/QUOTE]
Oh I get what you did now, okay, thanks very much.
So, nobody knows anything about my jQuery scrollTo problem? :(
[QUOTE=TerabyteS_;31327575]Just realized I should have posted this here
What happens if I use CodeIgniter and have a page that shows content based on multiple variables sent through the URI?
As an example, a normal URI would look like this
page.php?location=London&price=l+100&type=1+2+7+8
How would that translate into CodeIgniter's routing system?[/QUOTE]
CodeIgniter allows you to define a controller like so:
[code]
public function location($loc, $price, $type)
{
// Have good funs here.
}
[/code]
Which will handle any uri that matches 'controllername/location/$loc/$price/$type' (controllername/location/London/100/1+2+7+8/)
[QUOTE=Sh33p;31366690]Oh I get what you did now, okay, thanks very much.[/QUOTE]learn pdo my boy
[QUOTE=NotMeh;31366850]So, nobody knows anything about my jQuery scrollTo problem? :([/QUOTE]
Try putting the ScrollTo function after the element you want to use ScrollTo on.
[QUOTE=NotMeh;31366850]So, nobody knows anything about my jQuery scrollTo problem? :([/QUOTE]
try putting this around your code:
[code]
$(document).ready(function(){
//code
});
[/code]
A bottle of your finest wine says he'll miss the )}; and say it doesn't work"
[QUOTE=TehWhale;31369813]learn pdo my boy[/QUOTE]
As soon as someone's tasted ext/mysql, they should move on to MySQLi and then directly hop on to the P(e?)DO bandwagon. There's a reason why the PHP team's planning on flagging ext/mysql as deprecated.
That's really funny, because )}; is incorrect, it's supposed to be });
Doesn't really matter, actually, it didn't work even after I corrected it. :(
[editline]28th July 2011[/editline]
And my IDE once again tells me "Error at position (161:21):'slice' is null or not an object"
and here's the line that is supposedly wrong: [code]attr[key] = val.slice && val.slice(-1) == '%' ?[/code]
(inside the scrollTo .js file)
jQuery just seems to hate me
[QUOTE=NotMeh;31384015]That's really funny, because )}; is incorrect, it's supposed to be });
Doesn't really matter, actually, it didn't work even after I corrected it. :(
[editline]28th July 2011[/editline]
And my IDE once again tells me "Error at position (161:21):'slice' is null or not an object"
and here's the line that is supposedly wrong: [code]attr[key] = val.slice && val.slice(-1) == '%' ?[/code]
(inside the scrollTo .js file)
jQuery just seems to hate me[/QUOTE]
Are you sure you even need scrollTo?
Or should I ask, how are you displaying the form? Is it in a another element which overflows horizontally, and you need to [i]scroll to[/i] it? Or is it just it's own element which is hidden and you need to move it left to show it?
ScrollTo is used to scroll elements or the window/screen/page itself.
jQuery's own animate() function is used to animate objects, like moving them and stuff.
Yes, I know about animate(), that's how I initially came across scrollTo.
and yes I do need the page to scroll, animate() seems to lack that function.
[QUOTE=NotMeh;31384504]Yes, I know about animate(), that's how I initially came across scrollTo.
and yes I do need the page to scroll, animate() seems to lack that function.[/QUOTE]
Well, could you post your full HTML, CSS and JS (or at least the relevant parts) so we could see what's wrong.
What's the best program to use to start creating your own website?
Sorry, you need to Log In to post a reply to this thread.