HTML and/or JavaScript question

Do you know any of these languages?


  • Total voters
    21

the100thballoon

Emperor
Joined
Aug 13, 2003
Messages
1,239
i have some questions regarding some (probably) basic things (for most people who know what they are doing). please help me out!

a few weeks ago i learned how to do pull down menus in my HTML class. it was extremely basic, however. all they taught us to do was create a menu that does absolutely nothing; you can select but thats all it does: select. i want to know how to make each option do something (like load an image below, change the background color, format some text, write some text on the screen, or take you to another site/page). PLEASE HELP!

also, i would like to know how to use the push buttons. i know how to create them but then they dont do anything. i would like to find out how to have the button take the information from text fields, checkboxes, and radio buttons and email it to an email address.

third, i would like to know how to make some text be replaced by an image when you roll the mouse over it. i know very little about javascript so this explanation needs to be spoken as if talkin to a baby, please.

fourth, i would like to know how to make the message in the status bar permanent so that when the mouse is moved over links, the message i specified is still displayed instead of the link URL. i can do this so far:
<script language="javascript">
window.status="Welcome!"
</script>

fifth, i would like to know how to create a marquee-type text message in the status bar. i tried:
<script language="javascript">
window.status="<marquee>Welcome!</marquee>"
</script>
but it didnt work. i was workin with some javascript in class today and we used somethin like "<h1>some tex</h1>" as part of a script but i cant remember how to use it. please inform me as to how to make a scrolling marquee-like status bar message.

sixth, i would like to know how to make my page where right-clicking causes an alert box to appear instead of the menu. basically i want to know how to keep users from viewing my code (dont know why).

seventh, i would like to know how to make a page require a password. i want the prompt to be an alert-type pop up.

THANK YOU SOOOOOOO MUCH TO ANYONE WHO HELPS!!!!!!!
 
the100thballoon said:
i have some questions regarding some (probably) basic things (for most people who know what they are doing). please help me out!

a few weeks ago i learned how to do pull down menus in my HTML class. it was extremely basic, however. all they taught us to do was create a menu that does absolutely nothing; you can select but thats all it does: select. i want to know how to make each option do something (like load an image below, change the background color, format some text, write some text on the screen, or take you to another site/page). PLEASE HELP!
Code:
<FORM name="guideform">
<SELECT name="guidelinks" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value"> <OPTION SELECTED value="BASEURL">-
<OPTION value="URL">Page 1
<OPTION value="URL">Page2
</SELECT>
</FORM>

You could also replace "window.location" with stuff like "document.bgColor" to change the background color.

also, i would like to know how to use the push buttons. i know how to create them but then they dont do anything. i would like to find out how to have the button take the information from text fields, checkboxes, and radio buttons and email it to an email address.
You need a server for this, as it'll need to use PHP/CGI, I believe. You can't do it will plain HTML, I think - try Google.

third, i would like to know how to make some text be replaced by an image when you roll the mouse over it. i know very little about javascript so this explanation needs to be spoken as if talkin to a baby, please.
Try Google, or this site. PageResource.com is a VERY good site for JavaScript, HTML, CSS.

fourth, i would like to know how to make the message in the status bar permanent so that when the mouse is moved over links, the message i specified is still displayed instead of the link URL. i can do this so far:

Code:
<a href="URL" onMouseover="window.status='YOURTEXT'; return true" onMouseout="window.status='yourtext'; return true;">

Add the onMouseover/out part to your links with the text in the status bar.


fifth, i would like to know how to create a marquee-type text message in the status bar. i tried:

but it didnt work. i was workin with some javascript in class today and we used somethin like "<h1>some tex</h1>" as part of a script but i cant remember how to use it. please inform me as to how to make a scrolling marquee-like status bar message.

Don't know how to do this, sorry.

sixth, i would like to know how to make my page where right-clicking causes an alert box to appear instead of the menu. basically i want to know how to keep users from viewing my code (dont know why).
Code:
<script language=JavaScript>
<!--

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 
</script>

It is easy to bypass this, just look at the source code.

seventh, i would like to know how to make a page require a password. i want the prompt to be an alert-type pop up.

Code:
<html>
<body>
<script language="JavaScript">
var a;
a = prompt('Password:',' ');
var pass = "YOURPASSWORD";
if(a==pass)
{
window.location="http://www.civfanatics.com";
}
else
{
alert('Wrong!');
}
</script>
</body>
</html>

THANK YOU SOOOOOOO MUCH TO ANYONE WHO HELPS!!!!!!!
You're welcome. :)
 
Oh dear god. You're taking an HTML class? Please don't. Please learn with HTML Dog or W3Schools. The W3C has set web standards and specificiations for ten years, allowing web designers to standarize their pages so they can be displayed across all browsers. Stick and write to the standards and (in theory) your page is accessible and viewable by ALL (one of the principles of the web).

<marquee> was eliminated a long time ago. <script language> has been replaced with <script type="text/javascript">
 
There's one, huge biggie that you need to remember when building a webpage.

Accessability -- Not all browsers, computers (and users) are alike. What if the person has javascript off? It renders a javascript menu unasable, and they can't navigate your site. Images should have alt-tags as well. Your webpage should be Section 508 Compliant. (oddly enough, that's a javascript page!)

If any of your links have an onMouseOver(); event, they should also have an onKeyPress(); or similar event. Suppose someone's mouse broke, and they had to use the tab key.

Alt tags - Suppose someone uses Lynx. You'll need something like "[IMAGE] This is an image of....".

-- Webpage size. Try to keep it shorter than 800 pixels wide. If you can, use a table with a width of 100%. Yes, most people have a 1024x768 resolution monitor, but printers don't. If they want to print out a page, it only reads 800 pixels across. People also don't like scrolling sideways.

Frames - This was probably one of the many ways to re-use your webpages, but it's the worst way. Modern browsers can handle it a bit better, but there's still issues, mainly legal. Some companies don't like being "trapped" inside your webpage, and it also confuses the user. (i.e., if you linked to Amazon.com, the user might think you're Amazon.com. If they have a problem, you might wind up getting in trouble instead). Frames are evil, stay away from them! ;) (Iframes are a little different, but I think they're more IE-friendly).

Server-side-includes - This is getting a little more advanced, but if you want templates (i.e., a page with only the menu), then this is the way to go. You'd have your main page (say it's a table with the top row as a colspan=2, and 2 cells below it) with a table, and in the 3 cells, you'd include the 3 pages you want. CMS systems work in a similar way, except they use a programming object, and some way of changing the content remotely.

Now, here's one more, very important thing to remember. Remember the Browser Wars? (Netscape and IE) Well, now that the dust has settled, they have different variations of DHTML and Javascript. I think a marquee only works in Internet Explorer. Something like a blink tag only works in Netscape, Opera and Firefox. Make sure that your javascript, DHTML, or whatever can be used in multiple browsers.

Also learn CSS (Cascading Style Sheets). Remember that Netscape 4.8 and below can not handle CSS very well, if not at all. So, you'll need some alternate code for Netscape to use. (There's a bunch of CSS tricks that you can use for Netscape).
 
sixth, i would like to know how to make my page where right-clicking causes an alert box to appear instead of the menu. basically i want to know how to keep users from viewing my code (dont know why).

The short answer -- View-->Source.
The medium answer -- The user could look through the Temporary Internet Files. Why? HTML is client-side.
The long answer -- Internet Explorer, and other web browsers use a pre-defined menu, meaning that you would have to ask the programmer not to include the view->source option. Now, that's useless, since the Internet is saturated with old browsers. Now, even if you succeeded, you still have the temporary Internet files folder to deal with. Also, what if the user didn't feel like pressing file->print? The print command (among other things) is in the right-click menu.

The only way you can really combat this is to make the HTML look "messy". That is, use %## tags. (where %## is a number, like %20 is a space).

seventh, i would like to know how to make a page require a password. i want the prompt to be an alert-type pop up.

You would need a scripting language like Perl, CGI, PHP, ASP, ASP.NET, etc. to do this properly. You could do it in Javascript, but there's the rub. Javascript code is downloadable, so the user could see the username/password.

HTML and Javascript are client-side scripts, meaning they load and run on the user's computer. The above mentioned scripts are server-side. Thus, you shouldn't put any sensitive information on the user's side.


BTW, incase you didn't know, you can create HTML, Javascript, etc. pages in notepad.

also, i would like to know how to use the push buttons. i know how to create them but then they dont do anything. i would like to find out how to have the button take the information from text fields, checkboxes, and radio buttons and email it to an email address.


You need a server for this, as it'll need to use PHP/CGI, I believe. You can't do it will plain HTML, I think - try Google.

Close, Ginger_Ale, close.

You can have the buttons do something, but client side. Use an onClick=... function in the <input="button"...> tag. Then, use javascript code to handle it.

Now, about email - you can't do this. Why? The reason is security. This is how spammers could get your email -- and more (using HTTP variables). Now, you can see this easier in a language like ASP.NET, or php. You also need a server-side scripting language to send email.
 
Chieftess brought up a good point: CSS.

Cascading Style Sheets can greatly change your website; allowing you to pinpoint images, text, and position it all a certain number of pixels or a % is great not only for display, but for the viewers. The main reason I like using CSS with HTML is resolution size. Some people have 1280 x 1024, some 1024 x 768, or 800 x 600 resolutions. If you make it in 1280 x 1024, most people will have to scroll. But if you do it in 800 x 600, you're losing lots of space for people with bigger resolutions. With CSS, you can make it so that your page adapts to the resolution. For example, having this code will allow you to have a 3-column layout that will change based on the user's resolution.

Code:
<!-- left column, takes up 1/4 of the page -->
<div style="position:absolute;width:25%;left:0%;top:0%"><b>Left Column</b><br><a href="URL">Link 1</a></div>

<!-- main column, takes up middle 1/2 of the page -->
<div style="position:absolute;width:55%;left:25%;top:0%"><b>Main Column</b><br><a href="URL">Link 1</a></div>

<!-- right column, takes up last 1/4 of the page -->
<div style="position:absolute;width:25%;left:75%;top:0%"><b>Right Column</b><br><a href="URL">Link 1</a></div>

Try adding that code to notepad, Save As, select "All Files" under "Save as type:", and write filename.html to save it as an html file. Look at it in your browser, and risize the browser, and watch as it stays at the same width percentages, even when the browser size changes.

Of course, it's not aligned, there is no color, no font changes, no borders, background colors, or anything; just pure text, no images. That's for you to add in later. I highly recommend the site PageResource.com for HTML and CSS. They have great tutorials. CSS is great for any needs, but can be turned into something very complex with little effort. :)
 
Ginger_Ale said:
Code:
<FORM name="guideform">
<SELECT name="guidelinks" onChange="window.location=document.guideform.guidelinks.opti  ons[document.guideform.guidelinks.selectedIndex].value"> <OPTION SELECTED value="BASEURL">-
<OPTION value="URL">Page 1
<OPTION value="URL">Page2
</SELECT>
</FORM>

You could also replace "window.location" with stuff like "document.bgColor" to change the background color.

Chieftess, I did tell him that. Read more carefully. :)
 
I think your wording was confusing. Also, I was talking about directly going to a function.


Also, another pointer --

Don't use depreciated tags (blink, font, etc.). Use "div style" tags instead.
 
Even better, don't write it out like that inline (style=""). Do it in an external stylesheet and then link it like this: <link rel="stylesheet" type="text/css" href="CSS name here" /> in the <head> section.

Ginger Ale: Float > Position

div#left {float: left; width: 25%}
div#middle {float: left; width: 50%}
div#right {float: left; width: 25%}

Stack them like that is great.
 
i only know very basic html. the most advanced i get is some pretty table-organized pages, frames pages, and VERY very basic javascript such as OnMouseClick and OnMouseOver. everything you guys just said i only barely understand. i have just started dhtml is my class and we did about 10 pgs on javascript (if that sounds like much its NOT). Combine that with my stupid decision to not read and just do the step-by-steps and almost anything that someone says about HTML goes wizzing over my head. i brought my book home this weekend so that i can just read those units all the way through so that i can learn a little more. all i really wanted to know from you guys (thanks a billion by the way!) was how to get my form to open its links in a separate frame. i put 'target="main"' EVERYWHERE. i put '<base target="main">' in all my head sections. i put 'target="main"' in my form tag. i put 'target="main"' in both my frame tags. i dont know how to fix this. seeing as how i dont even understand the italicized part of my code:

'<html>

<head>
</head>

<body>

<FORM name="guideform">
<SELECT name="guidelinks" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<OPTION SELECTED value="">--------------------------------------------------
<OPTION value="http://www.lib.usm.edu/research/guides/turabian.html">Turabian/Chicago Style of Citation
<OPTION value="http://www.dictionary.com">Dictionary
<OPTION value="http://www.thesaurus.com">Thesaurus
<OPTION value="http://www.google.com/language_tools?hl=en">Translator
<OPTION value="http://www.sparknotes.com/lit/crime/">SparkNotes: Crime and Punishment
<OPTION value="http://www.cbhs.org/jbaker/new_page_10.htm">Crime and Punishment Question List
<OPTION value="http://www.civfanatics.com">Civfanatics Forums
<OPTION value="http://forums.civfanatics.com/usercp.php">Civfanatics User Control Panel
<OPTION value="http://66.227.8.82:2082/frontend/aiows/index.html">My Web Space Control Panel
<OPTION value="http://66.227.8.82/~civguy/">My Web Space -Current- Home
<OPTION value="http://www.members.cox.net/videomakers">Mayhem Page
<OPTION value="http://www.hotmail.com">Hotmail
<OPTION value="http://mail.yahoo.com">Yahoo Mail
<OPTION value="http://tv.yahoo.com">Yahoo TV
<OPTION value="http://www.gmail.com">Gmail
<OPTION value="http://www.google.com">Google
<OPTION value="http://www.google.com/imghp?hl=en&tab=wi&q=">Google Image Search
<OPTION value="http://multimedia.lycos.com">Lycos Multimedia Search
<OPTION value="http://download.com">Download.com
<OPTION value="http://forums.civfanatics.com/showthread.php?t=99698">Realism Modpack Home
<OPTION value="http://forums.civfanatics.com/showthread.php?t=112180">HTML/Javascript Question Thread
<OPTION value="http://forums.civfanatics.com/showthread.php?t=108088">Question about Armies Thread
</SELECT>
</FORM>

</body>

</html>'

your help is not really helping me. Is there any way for you guys to "dumb down" your replies so that i can understand it. can you explain the italicized code to me? can you teach me how to get the pull-down menu to open links in a separate frame?

EDIT: Actually, what i really dont understand is in red. i understand the other part.....or think i do. the non-red italicized text tells the browser to do something with the form options when the viewer changes the selection right? please say everything as if i was a mentally handicapped two year old who only just moved to an english speaking country. (i love computers and know quite a bit about them and my native language is english but please "dumb down" ur answers anyway)
 
In a seperate window or frame? I'm assuming window. Please don't. The user, not the web designer, should have control over whether they want to open up a new window or not.
 
hbdragon88 said:
In a seperate window or frame? I'm assuming window. Please don't. The user, not the web designer, should have control over whether they want to open up a new window or not.
separate frame. i dont use this page online. its my homepage. it is uploaded to the internet but its not my index.htm or home.htm and its not really accesible unless you know the url and page name before hand.
 
i dont use this page online. its my homepage. it is uploaded to the internet

Then it is online. ;)

Reminds me of this history page someone made that said, "This is a private page. It should not be on the Internet".

That should be one word. options.

window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value

Let's break it down.

BTW, what Ginger_Ale did was to put the javascript function on the same line as the event.

window.location=

This tells the browser about the window location. You are returning the value to the right of the equal sign into this object. i.e., the first option is "http://www.dictionary.com". It would go there.

document.guideform.guidelinks.options

document - This is how you start off some Javascript functions to access your page. The "." is like a directory (you know, like c:\program files\infogrames\civilization III\...).

guideform - This is what your field is called. (i.e. form name=guideform)

guidelinks - This is your selection object (combobox, dropdownlist, or whatever you want to call it).

options[] - This is the array of options that are in the select object. The square brackets mean it's an array.

document.guideform.guidelinks.selectedIndex - Again, this should look familar. The only difference is "selectedIndex". This returns a value of the option you've selected (i.e. 0, 1, 2...).

.value - This is the value that the option returns.


Did you understand this? Do you know about objects, value returning functions? passing by value/reference? structures? classes? events? properties?

If not, I'd suggest atleast a C programming class go get the handle on javascript programming.

Here's a little tutorial:
Object Oriented Programming - Also known as OOP. This revolves around 'objects' (i.e., some physical "thing"), and data (or attributes) rather than simple logic math and cause-and-effect. Some exmaples of an object would be: automobile, house, animal, book. Data, or attributes, would be: height, number of limbs, material, etc. Programming objects consist mainly of structures and classes. The key component is "inheritence". This allows for "substructures" and "subclasses".

Structure - A structure is a programming component that defines an object. Structures can have "data", "functions", and even other structures. A structure within a structure, is a sub-structure. If you look at your directory in your harddrive (or folders in Windows Explorer), that's a form of a structure. Sub-folders are like sub-structures.

Exmaple:
Code:
struct fruitStructure {

int numApples = 0;
int numOranges = 0;
};

struct treeStructure {
char* treeType;
int numTrees = 0;
fruitStructure fruits;
};

Notice how the structure "fruitStructure" is nested inside of "treeStructure". This means that "all trees have fruits". So, if I "declared" treeStructure as a "new" tree, then I could type in: tree.fruits.numApples = 5;, or, tree.numTrees = 15;.

Class - A class is similar to that of a structure, except it's kept in a seperate file. Classes can be public or private classes. A public class will allow your program to use it. A private class only allows functions inside of that class to use it. Classes can also have structures themselves, as well as functions.

Functions - These are a set of commands which perform a certain action. The benefit of a function is reusability. You can call a function (i.e. type somefunction(); in your code) multiple times. This saves your code from becoming REALLY long. There are several types of functions:

non-value returning - These functions don't return a value. Why would you want these? Maybe you have some function that displays a graphic. These perform a set of functions, then stop.

value returning - These functions return some value. (i.e., somevar = getDate();) These are usually a boolean value (true/false), but can be any value you want (like a string, integer). These are used to manipulate data in some way, and return a value. Typically, these functions have someway of accessing a reserved word (a reserved word is some word the compilier sees as a function, datatype, etc.). For example, getDate(); is a reserved function that some compiliers/scripts have to get the date, and insert it into a variable.

Pass by Value - These functions get a copy of the data you give it. i.e., answer = add(a,b);. Here, the function receives a and b, and does a calculation. It then returns the answer, but does not change the origanal variables.

Pass by Reference - These functions physically change the actual copy of the data you give it. In C++, you'll see it look something like addFive( &a );. The variable "a" gets sent, and permanently gets 5 added to it, whether it's returned or not.

Variables - These are the data that you work with. i.e., int numApples;. numApples is a variable.

Data-type - This defines the data. int numApples; tells the compilier that this variable is an integer. If you try to give it a letter, it'll get upset and probably crash.

Events - In Windows or Web programming, you have events. (You can create events in console-line programming, but it'll take some work) An event is something that happens on the form. (A form is the window or web page you're on) For example, clicking a button is an event, closing the window is an event, loading the page/window is an event, a timer reaching 0 (or every X seconds/minutes, etc) is an event. This is how the user will interact with your form, or web page. Events require functions to tell them what to do. For example, you might have an onClick event which calls a function, sayHello();.

Properties - These are the attributes of the objects (remember classes and structures?). For example, the treeStructure object has "number of trees" and "fruits" as its' properties, or attributes. "fruits" also has number of fruits as its' properties, or attributes. Likewise, take a table, which will have many attributes, or properties such as width, number of columns and rows, text for each cell, background color, border width and style.

Arrays - This is a collection of data of the same type (i.e., int apples(5);). That tells you how many apples of type int there are. You can do the same with structures as well. i.e. treeStructure tree[1000];. This creates 1000 trees. (note, arrays can be picky in various languages, as treeStructure tree[1000], and tree[1000] might not be the same data. It depends on the compilier -- some use the 0, some don't).
 
Chieftess said:
that should be one word. options.

it is one word in everything but the post. in my text editor and source code it is one word. civfanatics' posting seems to split it for some reason. it happened to Ginger_Ale, too.

i took my book home (from class) and all the book files, too. Then i re-read (or read for the first time :lol: ) the parts that i was having trouble with: javascript and DHTML. it is incredible how much that helped. mostly the book said the same thing 50 times each but i dont care because IT WORKED for the most part. I put together a list as i was going through of what i understood and didnt understand. Here is that list direct from notepad:

----------------------------
JAVASCRIPT Code that ive figured out
----------------------------

---
just code
---

functions! (ya!!!! finally! these are awesome!)

---
METHODS
---

onClick script in <A> tags

window.alert('message')

window.close()

window.prompt('message','default_text')

history.back()

history.forward()

location.reload()

window.location=

---
EVENT HANDLERS
---

onClick

onMouseOver

onMouseOut


----------------------------
JAVASCRIPT Code that i **HAVE NOT** figured out or have no way of testing
----------------------------

---
METHODS
---

window.scroll(x,y)

frame.alert('message')

frame.prompt('message','default_Text')

frame.close()

document.write()

document.writeIn()

form.reset()

form.submit()

---
EVENT HANDLERS
---

onFocus

onAbort

onChange

onBlur

onChange

onError

onUnload

onLoad

onSubmit


----------------------------
DHTML Code that ive figured out
----------------------------

embedded style sheets

classes

changing font size, color dynamically

external stylesheets


----------------------------
DHTML that i **HAVE NOT** figured out
----------------------------

browser detection scripts

showing and hiding page elements

in addition to maybe addressing the above code (you dont have to) i have a few questions for anyone and everyone:

1) IN-DEPTH ANSWER PLEASE* How do i "expand" with DHTML?

2) IN-DEPTH ANSWER PLEASE* How do i create a hierarchical (sp?) menu using DHTML, javascript, whatever?

3) How do i use the "onLoad" and "onUnload" event handlers? Is it "document.onLoad" or what?

4) IN-DEPTH ANSWER PLEASE* How do i use "document.write" or "document.writeIn"? How do i specify where i want it to write on the page?

*Please write the code and then go through and define each part and what it does (i dont care if parts sound obvious to you, please do that for EVERY part)

thats all for now! thanks sooo much!

ps- Chieftess, what the hell do you do for a living? You are the only person to know all of the languages in my poll. What other languages do you know?
 
I don't know DHTML, so I can't answer 1 and 2. Try Google.

For 1, what ways to you want to "expand"?

For 2, what do you mean "hierarchial menu"? You just want a menu, or do you want it to collapse/expand, or expand on mouseover, etc? A drop down menu or plain text one?

3) How do i use the "onLoad" and "onUnload" event handlers? Is it "document.onLoad" or what?
The "onLoad" goes in the body tag. For example, you could do: <body onLoad="alert('Welcome to my site!')"> ... </body>. This would show an alert box when the user loads the page. There really is no purpose for this though, as you could put all the javascript in the header...

The "onUnload" goes in the body tag as well - it runs the script when the user leaves the page (ie; an alert saying "bye").

4) document.write can be used for forms among other stuff.
Here's a quick code I made for madlibs a while ago:

Code:
<html>

<head>
<title>Mad Libs</title>

<script language="JavaScript">
function madlib()    [b]// this creates our function, called madlib[/b]
{
document.write("" + formone.inputone.value + " is a " + formone.inputtwo.value + " which also is a " + formone.inputthree.value + "!"); [b]// this writes the madlib out, using document.write to write the values of the form.  [color=red]formone[/color] is the form name, [color=green]inputthree[/color] is the input name, and [color=blue]value[/color] tells us the value of it.
}
</script>

</head>

<body>
<form name="formone">  [b]// this creates our form[/b]
Verb:<input type="text" name="inputone" size="20"><br>
Noun:<input type="text" name="inputtwo" size="20"><br>
Adjective:<input type="text" name="inputthree" size="20"><br>
<input type="submit" value="Create Mad Lib!" onClick="madlib()">  [b]// notice the "onClick="madlib()"" part.  This says that when the user inputs data, and clicks the button, the function will run, and document.write the form data.[/b]

</body>

</html>

When you hit the submit button, it will erase the form and use a clean page to display the madlib. You could have it use a popup box or something too, to keep the form there.


Chieftess gets paid to spend her life with computers. :D
 
Ginger_Ale said:
For 1, what ways to you want to "expand"?

i want to click on a question and have the answer appear below it. like this. I want to click some text and then have some other text appear below it. i dont care about the graphic effect or anything. i dont want the text to appear unless i click the first text and i want to be able to make it disappear again if i click again.

Ginger_Ale said:
For 2, what do you mean "hierarchial menu"? You just want a menu, or do you want it to collapse/expand, or expand on mouseover, etc? A drop down menu or plain text one?

a menu like the one on the left side of this page. i just think that these save space and look cool.

Ginger_Ale said:
Chieftess gets paid to spend her life with computers. :D
that is the coolest job! (well.... computer game programming/designing would be cooler but still....) i want to design computer games for a living. thats why i took this class. i wanted to learn the most basic of basic programming languages so that i could use it as a boost when i learn XML later this semester or this summer. i also think that learning javascript will be helpful when i learn python this summer or this fall. i want to learn four languages before i graduate from high school. what do you think? more? less? any tips on which languages to learn/not learn? i am definately going to learn python and XML (CivIV! hell ya!) but i dont really know about many languages. what do you think?
 
the100thballoon said:
i want to click on a question and have the answer appear below it. like this. I want to click some text and then have some other text appear below it. i dont care about the graphic effect or anything. i dont want the text to appear unless i click the first text and i want to be able to make it disappear again if i click again.
Try viewing the source code (View -> View Source) and finding out the code for it. It only works in IE though, not Firefox or Opera, so I wouldn't recommend it as much as the next one:

a menu like the one on the left side of this page. i just think that these save space and look cool.
Google revealed this page. It looks superb, and shows you step by step the changes made.

that is the coolest job! (well.... computer game programming/designing would be cooler but still....) i want to design computer games for a living. thats why i took this class. i wanted to learn the most basic of basic programming languages so that i could use it as a boost when i learn XML later this semester or this summer. i also think that learning javascript will be helpful when i learn python this summer or this fall. i want to learn four languages before i graduate from high school. what do you think? more? less? any tips on which languages to learn/not learn? i am definately going to learn python and XML (CivIV! hell ya!) but i dont really know about many languages. what do you think?
Hmm...for Civ4, Python and XML would be good. Gingerbread Man put up a Python Tutorial Thread in the Civ4 forum.

4 languages? I would focus learning one completely, like being fluent in a language (not computer, but spoken one rather). Then, move onto the next. Knowing fully 2 languages is far better than knowing 1/2 each of 4 langauges. On which languages to learn? It depends from person to person. Visual Basic is more 'english-like' than C++, which is more code-ish. It's a matter of personal preference, I think, but HTML, JavaScript, and CSS are good beginner ones to build off of.
 
Back
Top Bottom