Reply
I need help with <select option...
Old 09-06-2008, 08:40 AM I need help with <select option...
Novice Talker

Posts: 13
Name: Elena
You can tell, I'm a total novice...
What I'm trying to achieve is something like this:
http://www.masters.com/en_US/bios/bio7457.html (not as fancy maybe )
where on choosing something from <select ... option...> will change small content inside of the page. I have no idea how it could be done except for creating separate pages for each <option>. I even don't know IF it could be done... Guys, please advise!!!
smelena is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 09-06-2008, 08:55 AM Re: I need help with <select option...
King Spam Talker

Posts: 1,127
For the most part that is exactly what they are doing. It appears they are using JS to load the "content" portion of the page depending on the selection you make.

If you take a look at the page source code you can see it happening in and just below these lines:

Quote:
<script language="JavaScript" src="/includes/js/popularNews.js" type="text/javascript"></script><a name="skipMostPopular"></a> </div><div id="subWeather"><a name="subWeather"></a><h2 class="access">Weather</h2><div class="access"><a href="#skipWeather">Skip Weather</a></div><table cellpadding="0" cellspacing="0" border="0" class="paleGreenBorder"><tr><td><a href="javascriptpenExternal('http://www.barkerstores.com/themasters/Default.aspx',true)"><img src="/images/misc/sub_journal.gif" width="172" height="181" border="0" alt="2008 Masters Journal"/></a></td></tr></table><a name="skipWeather"></a>
</div></div></noindex></td>
You can use JS, PHP or even just html with extra work. The beauty of the JS or php is that you only have to create and store the seperate "content" portions while the basic page outline (header, footer navigation) stays the same and is incleded on all pages.

Edit: your "content" portion could even be pulled from a database and formatted on the fly.

Last edited by colbyt : 09-06-2008 at 08:57 AM.
colbyt is offline
Reply With Quote
View Public Profile
 
Old 09-06-2008, 09:04 AM Re: I need help with <select option...
Novice Talker

Posts: 13
Name: Elena
I'm not really good with JS, Database and PHP , my "advanced" knowledge of PHP is how to send form to mail and <?php include...>
Do you have a basic idea I could start with? Appreciate any help!
smelena is offline
Reply With Quote
View Public Profile
 
Old 09-07-2008, 07:36 PM Re: I need help with <select option...
Novice Talker

Posts: 13
Name: Elena
I found it! May be not the best thing to do, but it works! <iframe>!

<select name="page" onChange="top.iframe_name.location.href = this.options[this.selectedIndex].value;">
smelena is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to I need help with <select option...
 

Thread Tools

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

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


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11968 seconds with 12 queries