Jump to content
vmars316

drop-down list problem

Recommended Posts

Hello & Thanks ,

I have a small DropDownList with 3 options .

Problem is when I select , let's say , 2nd option .

No probs , a new page is opened .

 

If I click on option 1 or 3 , no probs .

However , if I click on 2nd option again , instead of clicking on 1 or 2 , no new page is opened .

 

Is there a way to correct this , so that clicking on whatever always opens a new window .

 

Thanks...Vern

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>myFavs-HtmlProbs.html</title>
<meta name="Generator" content="PureBasic">
<meta name="Description" content="Your description here...">
<meta name="Description" content="...Created by  myFavs % PureBasic...">
<style type="text/css">
</style> 
</head>
<body text="#000000" style="background-color:#A69E80; text-align:center;">
<br> <br> <br>
<!--dd <div style=-->
<table width="100%" border="0" style="text-align:center" cellspacing="0" 


cellpadding="0">
<tr style="text-align:center">
<!-- EXAMPLE: <MenuName="aaMost-Used"> -->   <!-- rgb(250,240,255) -->
<select style="width:200px; font:14px Arial Black; color:rgb(0,0,0); background-


color:rgb(231,169,126);" name="menu" onchange="window.open(this.value)">
  <option selected="0" value="">aaMost-Used</option>
<option value="http://alternativeto.net/">AlternativeToSoftwares</option>
<option value="https://www.biblegateway.com/reading-plans/chronological/today?


version=NLT">One Year Chronological Bible NLT</option>
<option value="http://www.portablefreeware.com/">portablefreeware.com/</option>
</select></td></tr></table><br></body></html>

 

 

Share this post


Link to post
Share on other sites

I would think using a click event instead of a change event might work, but with such horrible code and the very weak doctype who knows what kind of quirks are going to work for any given browser.

 

The code really need to be re-written to enter this century. Just about every possible bad practice in existence lives in that code.

Share this post


Link to post
Share on other sites

If I re-write if for you what do you learn except how to get other people to do your work for you.

 

I would suggest that you look at samples and tutorials for HTML5 and CSS3 that exist right here at w3schools and then do the re-write to modern standards. There is not much code and it is pretty simple, so you should be able to handle yourself, and then if you still have a problem with the page we can help you work through the problems. In the end you will know how the page actually works so you can maintain it.

Share this post


Link to post
Share on other sites

Hmm...

This is worse :

<select style="width:200px; font:14px Arial Black; color:rgb(0,0,0); background-color:rgb(231,169,126);" name="menu" onclick="window.open(this.value)">

 

A click results in browser trying to go to the DropdownMenu label .

 

..vm

Share this post


Link to post
Share on other sites

Validate page and remove obsolete tags, remove inline styling, add missing td element, correct the value entered for selected attribute (definitely never been '0') , then you might find out that it does works.

Edited by dsonesuk

Share this post


Link to post
Share on other sites

Thanks ,

I ran html thru :

http://toolbox.seositecheckup.com/

It came up with these messages :

" Congratulations! Your page does not use HTML deprecated tags. "

" Your webpage is using 4 inline CSS styles! "

" Your website does not contains any keywords! "

" Congratulations! We have not found underscores in your in-page URLs! "

" Congratulations! This URL and all internal links on this page are SEO friendly. "

 

 

 

And here :

 

The HTML document is valid, but it contains some warnings that should be fixed.
<select> Isn't Allowed In <tr> Elements (At line 20, column 1)
Discarding Unexpected </td> (At line 31, column 6)
So i added <td> to code .


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>myFavs-HtmlProbs.html</title>
<meta name="Generator" content="PureBasic">
<meta name="Description" content="Your description here...">
<meta name="Description" content="...Created by  myFavs % PureBasic...">
<style type="text/css">
</style> 
</head>
<body text="#000000" style="background-color:#A69E80; text-align:center;">
<br> <br> <br>
<!--dd <div style=-->
<table width="100%" border="0" style="text-align:center" cellspacing="0" cellpadding="0">
<tr style="text-align:center">
<td>
<!-- EXAMPLE: <MenuName="aaMost-Used"> -->   <!-- rgb(250,240,255) -->
<select style="width:200px; font:14px Arial Black; color:rgb(0,0,0); background-color:rgb(231,169,126);" name="menu" onchange="window.open(this.value)">
  <option selected="0" value="">aaMost-Used</option>
<option value="http://alternativeto.net/">AlternativeToSoftwares</option>
<option value="https://www.biblegateway.com/reading-plans/chronological/today?version=NLT">One Year Chronological Bible NLT</option>
<option value="http://www.portablefreeware.com/">portablefreeware.com/</option>
</select>
</td>
</tr></table><br></body></html>
Then got the 'ok' .

 

The HTML document is fully valid.

 

But of course this doesn't fix the original problem .

 

Thanks...vm

Share this post


Link to post
Share on other sites

Its seo valid but it certainly not html valid. If you want to check it properly check it here https://validator.w3.org/check.

 

You validation pointed out 4 inline styling found, which should have pointed out you should apply styling using class or id ref rather then through using inline style attribute on the element.

 

Also you need to bring the doctype up to date to html5, your current doctype will allow old, i mean REALLY old deprecated code.

Edited by dsonesuk

Share this post


Link to post
Share on other sites

Its seo valid but it certainly not html valid. If you want to check it properly check it here https://validator.w3.org/check.

 

You validation pointed out 4 inline styling found, which should have pointed out you should apply styling using class or id ref rather then through using inline style attribute on the element.

 

Also you need to bring the doctype up to date to html5, your current doctype will allow old, i mean REALLY old deprecated code.

 

From that validator i get msg: "

Sorry! This document cannot be checked.

"

I am all worn out guys .

I give up .

..vm

Share this post


Link to post
Share on other sites
I am all worn out guys

 

 

You would be a lot less worn our if you fixed the code and brought it up to standards instead of hacking around looking for an easy quick fix based on a lot of nonsense from an SEO validator that has nothing to do with correct code, reliable code, or modern best practices. You need to deal with the technical issues, not SEO, because the number one negative for SEO are pages that don't work right.

 

What you have is a page using 20th century methods, technology, and design. It might have met the expectation of users in 1997, but today it is just going to keep wearing you out until you re-write it to bring it into the 21st century.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...