News:

Interested in contributing to the site? Give The Arrangement Formatting Guidelines and The Arranging Checklist a good read!

Main Menu

The Webpage design topic

Started by SuperFireKirby, January 12, 2011, 10:11:01 AM

Previous topic - Next topic

Winter

On the other hand, I just realized that I did say CSS the first time.

That was an accident. I MEANT Javascript. We probably could've cleared that up much faster, but we didn't.

So scratch that and pretend the entire question was asked with the word Javascript instead.

master_gamer38

Your question still doesn't make sense.

You can't make a table with javascript. You need CSS to do that. Which again, you need to do on your own.
Avid user of NFNet IRC network.

Winter

please stop correcting my word choice and help me? YOU KNOW WHAT I AM TRYING TO DO.

I need a way for a square shaped portion of the screen to be able to have different information within it when clicking certain buttons.

And for that matter, yes you can make a table with Javascript.

anyway can someone else help me? I won't be replying to MG if he's going to correct one word from my post and ignore the problem I am having.

master_gamer38

You are an idiot. Javascript can only change things. You cannot build a table in javascript.

IN JAVA YES! Not javascript. I've been coding longer than you. I'm pretty damn sure I know more of what a language can and can't do.

You have not described a problem and we are not going to make something for you. You need to share what you half. Describe the problem, and describe what you are trying to do.

The reason I haven't helped is because you can't give any sort of insight what your problem is. First it was you can't make a table. Second it was javascript wasn't working. Now you say your javascript can't make a table. WELL DUH, you cannot make a table with javascript.

YOU NEED HTML!
YOU NEED CSS!

By doing all of this, you are looking like a complete retard to anyone that knows how to program.
Avid user of NFNet IRC network.

WiiMan96

Ugh. I've been watching this crud for days now. Now I understand what you want, winter, I hope I can put a goddamn end to this. Sorry if I make you feel stupid by dumbing it down too much, but it's needed in case you missed some crucial info somewhere.
First, an overview:

HTML - Makes the page's structure, the "skeleton" of a webpage. Determines what can be seen on a page by an end user.
CSS - Makes HTML look pretty. Adds colours, layouts and such to make HTML look nicer.
Javascript - Adds front-end (browser) interactivity and functionality. Allows things like dynamically loaded content, graphs and checking for things like cookies and browser type and version, as well as validating form input. Essentially "pretty functionality".
PHP / ASP & SQL - Adds back-end (server) interactivity, functionality and automation. PHP / ASP Allows for communication between SQL databases and the output (in HTML) sent to the page. Allows things like logins and memberships, commenting and posting, and a ton more. Essentially anything user-submitted which the website needs to remember long-term is inserted into an SQL database via PHP / ASP. This forum is PHP-driven, for example.

As for what you need, winter, if you want a particular div in your HTML to load and reload text without reloading the page, you're looking for AJAX, a way of using javascript. Here for a tutorial.

You'll need your HTML to make the table and the buttons and forms (all in one div) to provide the backbone for the rest. CSS can specify the size and look of the table and the javascript / ajax can be mostly in the head section of your HTML which can add the dynamic requesting of HTML files. (So, yes, in order to load different text each different text must be its own HTML file on the server.)


Hope this helps.

Winter

Thank you, WiiMan. What I was looking for was a bit different. Basically I want there to be blocks of info, here's an example:

3 videos, all of which are loaded when the page is loaded "no ajax" but 2 of the videos are hidden. I know you can hide certain information with javascript. I've done if before. but I need it so that on clicking a button, video B will be shown, and video A will be hidden. when I click on the button for video C, video A and B will both be set to off respectively, this way the script doesn't have to go "find out" which one is currently open.

All the content will be on the page, just interchangable with buttons.

I know what javascript is, I know what CSS is, I know what HTML is, I know what Ajax is.

I just want a code that I can use and mess around with for a bit, because Javascript is the only one I'm having trouble with.

CSS and HTML were no problem to learn in a matter of days, but Javascript baffles me. I only plan to use it just this once, and wanted an example.

I hope you can all understand that I don't need an explanation of what coding is. But I wanted the code itself.

*sigh*

WiiMan96

Programming and coding is all about problem-solving. Now, I'm not exactly fluent in javascript, but I know just enough about how it works. For your problem, couldn't you just use ajax which opens blank for the videos you don't want there?

Winter

#52
It's just that I want them all to be in one spot, so that it takes up a very small abount of room. almost like youtube, but not loading whole pages.

WiiMan96

In which case, having one div/table connected with ajax and having that hold the videos might work. Press a button and the code for the next video will replace the old one, so it's pretty close to hiding them. It also makes sense design-wise in that all the videos won't download at once. People won't want to have all the videos load when they only want to watch one.

Let me know if you see a flaw in that, but it makes sense to me.

master_gamer38

Doing that with ajax is a bad idea.

First of all, ajax is javascript, except with complicated PHP backend stuff going on as well.

You can switch videos without using ajax.

Click me.

Youtube video changer. It even has a way to store already.


But again WK, you need to provide what you have. Also, by doing it the way you seem to be doing. You are just hiding the video, but you'd have to make sure to pause them. Doing it and just changing the embed information like I did in my code works much better. Only a few glitches which I'm too lazy to fix and update.
Avid user of NFNet IRC network.

Winter

Saying video was only an example, I was planning on having different content each time.

@Wiiman: I think that sounds like a great Idea, I just need to know 'how' to do it.


and MG: Is there a way to do that in a much smaller space with more attractive buttons by it? also more than likely, MOST of the content will not be videos.

master_gamer38

Make your own images for buttons then. This is good documentation on HTML buttons if you don't want to make images.

To do a smaller space. Make your own CSS spreadsheet.

And you'll have to design your own javascript then. Here is the function you'll need to change content.
Avid user of NFNet IRC network.

Winter

This is exactly what I needed. Thank you.