Web Design and Development Forums

[this.selectedIndex].value"> validate

This is a discussion on "[this.selectedIndex].value"> validate" within the Accessibility and Usability section. This forum, and the thread "[this.selectedIndex].value"> validate are both part of the Plan Your Website category.


Go Back   Webforumz.com > Plan Your Website > Accessibility and Usability

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Feb 8th, 2008, 19:32   #1 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
[this.selectedIndex].value"> validate

i have this, but i am trying to get it to validate, i have solved most the errors but it is just one that is getting the better of me, here is the code

PHP: Select all

<?php

    
//get this month and year
    
$month date("n");
    
$year date("Y");
    
    
$jump = isset($_POST['jump']) ? $_POST['jump'] : (isset($_GET['jump']) ? $_GET['jump'] : $month);

    require(
'main.php');
    
    
$month_tots = array();
    for (
$i=1$i<=12$i++) $month_tots[$i] = 0;       // ensure total for every month

    
$res mysql_query ("SELECT MONTH(FROM_UNIXTIME(date)) as mth, COUNT(*) AS num 
                        FROM form
                        WHERE YEAR(FROM_UNIXTIME(date)) = '$year'
                        GROUP BY mth"
);
     while (list(
$mth$num) = mysql_fetch_row($res)) 
     {
         
$month_tots[$mth] = $num;         // put month totals in the array
     
}
     
     
/**
     * create the dropdown
     */
     
echo '<form method="post" action="" >
     <select name="jump" id="jump"  onchange="location.href=this.options[this.selectedIndex].value"> '
;
     foreach (
$month_tots as $m => $num)
     {
         
$sel $jump==$m 'selected="selected"':'';
         
$dt date ('F Y'mktime(0,0,0,$m1$year));
         echo 
"<option value='index.php?jump=$m' $sel>$dt ($num)</option>";
     }
     echo 
'</select></form>'?>
     
    <?php mysql_close($conn); ?>
this is the offending line
PHP: Select all

     <select name="jump" id="jump"  onchange="location.href=this.options[this.selectedIndex].value"> ; 

and this is the error

Quote:
line 44 column 99 - Error: document type does not allow element "select" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
does anyone know how this can be fixed, thank you
__________________
recipebite.co.uk - its a working progress...
saltedm8 is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Feb 8th, 2008, 20:08   #2 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: [this.selectedIndex].value"> validate

Moving to accessibility.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Feb 8th, 2008, 20:09   #3 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: [this.selectedIndex].value"> validate

Try wrapping the <select> with a <p> tag.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Feb 8th, 2008, 20:17   #4 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
Re: [this.selectedIndex].value"> validate

bugger me, thank you - how the hell did you know that ?
__________________
recipebite.co.uk - its a working progress...
saltedm8 is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Feb 8th, 2008, 20:44   #5 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: [this.selectedIndex].value"> validate

Quote:
missing one of "p"
Kinda says it
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Feb 8th, 2008, 20:56   #6 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
Re: [this.selectedIndex].value"> validate

lol, i must be really thick - thanks again
__________________
recipebite.co.uk - its a working progress...
saltedm8 is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Show "Image" Depends On User "Status"? Monie ASP Forum 6 Oct 16th, 2007 01:22
? IS "meta name="robots" content="?" necessary in pages ? Love2Java New to Web Design 6 Aug 8th, 2007 13:48
window.opener.document["nameForm"].getElementById("someid").value; doesnt work drpompeii JavaScript Forum 0 Feb 17th, 2007 23:09
<option value="yes" class="x"> problem in Firefox mameha1977 CSS Forum 1 Jun 21st, 2006 11:20
Need to build a "Trip" or "Journey Planner" jswebdev PHP Forum 4 Dec 5th, 2005 23:22



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 16:24.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59