Register new account
Edit account
Search

Ancient Domains Of Mystery, forum overview / General / JavaScript help

Online users ( Unknown)
Application object not working properly at the moment, no clue who is online...

* Numbers in parentheses are the number of minutes since the user last loaded a page. Logged-in users time out after 40 minutes (unless they manually log out), lurkers and anonymous posters after 20.

Amanda Sedai
Registered user

Last page view:

7926 days, 9 hours, 34 minutes and 53 seconds ago.
Posted on Friday, December 07, 2001 at 19:14 (GMT -5)

I know basic HTML and I'm creating a webpage for a project in one of my classes. I'd like to have JavaScript buttons on it that link to other pages. I know nothing about JavaScript. Any idea how I can do this?


-Amanda Sedai, a save-scumming newbie. (Hey, at least I saved that little girl's dog. Gimme some credit... ;-))
Portrait
Jan Erik
Administrator

Last page view:

5 hours, 5 minutes and 55 seconds ago.
Posted on Friday, December 07, 2001 at 20:56 (GMT -5)

Fist make sure each button looks something like this:

<FORM>
<INPUT TYPE="submit" VALUE="ADOM HOF" OnClick="FollowLink('http://adom.brinkster.net/hof')">
</FORM>


For this to work you'll need a <SCRIPT> block in the <HEAD> part of the page along these lines:

<SCRIPT TYPE="text/javascript">

function FollowLink(URL)
{
  this.location = URL;
}
</SCRIPT>


Though you can acomplis the exact same result without javascirpt by just using:

<FORM ATION="http://adom.brinkster.net/hof" METHOD="GET">
<INPUT TYPE="submit" VALUE="ADOM HOF">
</FORM>

However if you want to open the location in a new browser window you'll have to use the Javascript version and do the following modification to your FollowLink function:

<SCRIPT TYPE="text/javascript">

function FollowLink(URL)
{
  window.open(URL)
}
</SCRIPT>


If you have a framed page and want the target to open in the same browser but not inside the frameset use parent.location = URL instead of this.location = URL in the FollowLink function (same effect as using TARGET="_top" in a normal link).

Hope this helps out :)

There are also several good newgroups for JavaScript programming most should be accessable from http://groups.google.com just don't get confused and ask JavaScript questions on a Java newsgroup, it's two completely different languages, and most regulars tend to get anoyed when people can't tell the difference...


Jan Erik Mydland
HoF admin
Messiah
Unregistered user
Posted on Friday, December 07, 2001 at 23:56 (GMT -5)

If what Jan said didnt make much sense you can use a WYSIWYG web authoring tool.If you dont want to buy one you can get a trial version,or download from a warez site or you could just crack the trial version(heh I've done this a couple of times)
HicPotboy
Registered user
Web-dude


Last page view:

7314 days, 12 hours, 22 minutes and 20 seconds ago.
Posted on Thursday, December 13, 2001 at 14:22 (GMT -5)

Good choice; I recommend using Macromedia Dreamweaver, and it does almost everything you need it to do. I also use Frontpage and Hotdog. But Dreamweaver is by and far the best WYSIWYG editor I've ever found. Add in the fact that Macromedia allows you to extend it through the Extension Manager with custom scripts, and what it can do is virtually limitless. Hope this helps!

---
Hicpotboy
------
Hicpotboy
---------
Less twitch, more mental itch - saying by me.
Amanda Sedai
Registered user

Last page view:

7926 days, 9 hours, 34 minutes and 53 seconds ago.
Posted on Thursday, December 13, 2001 at 15:50 (GMT -5)

Thanks everyone. :-)


-Amanda Sedai, a save-scumming newbie. (Hey, at least I saved that little girl's dog. Gimme some credit... ;-))

Color mixer:
Red: Green: Blue: HTML color code: result:      
Your Name: Check to login:

Your Message:


Read the
formating help
Are you a spambot? Yes No Maybe Huh?
Create poll? Yes No   What is this?
Poll question: