Need help SOON! (Please read)

Got a little techonology problem that you need fixed pronto? Post it here and we'll see what we can do.

Moderator: Moderators

Locked
Message
Author
Fiddelysquat
Honorary Member
Honorary Member
Posts: 2476
Joined: Mon May 31, 2004 9:18 pm
Contact:

Need help SOON! (Please read)

#1 Post by Fiddelysquat »

I want to make a site that will have two drop down menus: one in which you choose your internet connection type, and the other in which you choose your screen resolution, then click "go". Depending on the combination of answers, I would like it to take the user to a version of my site that is appropriate for their speed and screen size.

How would I do this?
Image
cat1205123
PPT Trainee
PPT Trainee
Posts: 500
Joined: Fri Oct 22, 2004 1:02 pm
Location: The Internet
Contact:

#2 Post by cat1205123 »

Well, I'm no expert on this, and so I can't give you any actual coding, but I'd do a PHP or JavaScript thing. Something like:

If firstdropdownbox.value = 56k && seconddropdownbox.value = 600x800 {
(Go to 56k 600x800 page)
}
elseif firstdropdownbox.value = 300k && seconddropdownbox.value = 1024x768 {
(Go to 300k 1024x768 page)
}


But I have no idea how to put that into action, or even if that's the best way to go. It would be quite a bit of code to write for all of the options.
Image
Ibis
PPT Toddler
PPT Toddler
Posts: 162
Joined: Sun Aug 01, 2004 11:14 pm
Location: Sweden
Contact:

#3 Post by Ibis »

Or don't code in that way that a choice is needed. Bad but very good advice, at the same time :P What I mean is that if you code in a smart way, you shouldn't need two versions of the page, depending on screen resolution etc.
http://ibisaeg.mine.nu
<silja rox my sox>... somewhat :P
shapu
Moderator
Moderator
Posts: 3739
Joined: Mon May 31, 2004 5:58 pm
Location: Idiotville

#4 Post by shapu »

You can do dropdown menus. They're actually kind of easy to get working. You'll actually need four different pages (56k, 800x600; 56k 1024x786; 300k 800x600, and 300k 1024x768).

I'm not quite sure how to do the form submit line, but I'm sure there's somebody else here who can.
Image
Paul
Beyond Godly
Beyond Godly
Posts: 3703
Joined: Mon May 31, 2004 10:11 pm
Location: 51°23' 0°30

#5 Post by Paul »

http://paul.lost-thoughts.net/entry.html


Code: Select all

<html>
<head>
</head>
<body><form name="form1">
    <select name="compability" onChange="window.open(this.options[this.selectedIndex].value)">
<option value="http://yourwebsite.com/mac.1024x768.300k.html">Macintosh: 1024x768: 56k</option>
<option value="http://yourwebsite.com/mac.1024x768.56k.html">Macintosh: 1024x768: 56k</option>
<option value="http://yourwebsite.com/mac.800x600.300k.html">Macintosh: 800x600: 300k</option>
<option value="http://yourwebsite.com/mac.1024x768.56k.html">Macintosh: 800x600: 56k</option>
<option value="http://yourwebsite.com/mac.1024x768.300k.html">Windows: 1024x768: 300k</option>
<option value="http://yourwebsite.com/mac.1024x768.56k.html">Windows: 1024x768: 56k</option>
<option value="http://yourwebsite.com/mac.800x600.300k.html">Windows: 800x600: 300k</option>
<option value="http://yourwebsite.com/mac.1024x768.56k.html">Windows: 800x600: 56k</option>
      </select>
</body>
</form></html>


A rather blunt coding of it. I also added a basic OS option, but this could be replaced with IE & Firefox, seeing as they seem to be the most popular browsers at the moment.

You could also keep your website as image-free as possible, and this would make the need of having internet connection speed choice uneccessary. (It would load relatively quickly in both).

Going back to operating systems, making sure it's compatible in Internet Explorer, Firefox (and maybe Safari) in the one go would get rid of the option of OS, thus making the list neater and smaller, so it'd really be just monitor resolution.

Code: Select all

<option value="http://yourwebsite.com/1024x768.html">1024x768</option>
<option value="http://yourwebsite.com/800x600.html">800x600</option>
Image
kudos sasha+gregory // PPT's Unofficial President
shapu
Moderator
Moderator
Posts: 3739
Joined: Mon May 31, 2004 5:58 pm
Location: Idiotville

#6 Post by shapu »

You can also go all javascript crazy (found this one a few minutes ago...behind schedule...)
http://www.htmlcodetutorial.com/linking ... p_114.html
Image
Paul
Beyond Godly
Beyond Godly
Posts: 3703
Joined: Mon May 31, 2004 10:11 pm
Location: 51°23' 0°30

#7 Post by Paul »

shapu wrote:You can also go all javascript crazy (found this one a few minutes ago...behind schedule...)
http://www.htmlcodetutorial.com/linking ... p_114.html



I wouldn't advise that though, seeing as some browsers sometimes aren't fully javascript compatible.
Image
kudos sasha+gregory // PPT's Unofficial President
shapu
Moderator
Moderator
Posts: 3739
Joined: Mon May 31, 2004 5:58 pm
Location: Idiotville

#8 Post by shapu »

Paul wrote:
shapu wrote:You can also go all javascript crazy (found this one a few minutes ago...behind schedule...)
http://www.htmlcodetutorial.com/linking ... p_114.html



I wouldn't advise that though, seeing as some browsers sometimes aren't fully javascript compatible.


You can always try this:

Code: Select all

<noscript>
This page requires javascript to work.
</noscript>
Image
Paul
Beyond Godly
Beyond Godly
Posts: 3703
Joined: Mon May 31, 2004 10:11 pm
Location: 51°23' 0°30

#9 Post by Paul »

shapu wrote:
Paul wrote:
shapu wrote:You can also go all javascript crazy (found this one a few minutes ago...behind schedule...)
http://www.htmlcodetutorial.com/linking ... p_114.html



I wouldn't advise that though, seeing as some browsers sometimes aren't fully javascript compatible.


You can always try this:

Code: Select all

<noscript>
This page requires javascript to work.
</noscript>


Fiddelysquat wants a website that's as compatible as possible. Going crazy with javascript. A no no.
shapu
Moderator
Moderator
Posts: 3739
Joined: Mon May 31, 2004 5:58 pm
Location: Idiotville

#10 Post by shapu »

Wait - wouldn't it just be quicker to do four hyperlinks? I recognize that you want dropdown menus, but you could always do the "Welcome! Please choose your screen resolution and connection speed below!" in an aesthetically-pleasing way.
Image
Paul
Beyond Godly
Beyond Godly
Posts: 3703
Joined: Mon May 31, 2004 10:11 pm
Location: 51°23' 0°30

#11 Post by Paul »

shapu wrote:Wait - wouldn't it just be quicker to do four hyperlinks? I recognize that you want dropdown menus, but you could always do the "Welcome! Please choose your screen resolution and connection speed below!" in an aesthetically-pleasing way.


Heh, yeah. But she said drop downs, and it'd still have to be "1024x768: 56k", "1024x768:300k" and so on.
Locked