Link code to a list in joomla 1.5

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.
Locked
soultouring
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Thu Jul 17, 2008 7:13 am

Link code to a list in joomla 1.5

Post by soultouring » Thu Jul 17, 2008 7:22 am

I do not know how to link from the OPTION VALUE in a list form - pls help am novice

I have used this code below, please let me know how I can then link to one of my lists

<form action="" method="get" name="form1">
<select name="select" size="1">
<option>14 day road ike holiday</option>
<option>10 day garden route tour</option>
<option>21 day safari tour</option>
</select>
</form>

<form action="" method="get" name="form2">
<select name="navigation" onChange="go()">
<option value="">--- Navigation ---</option>
<option value="http://localhost/1/index.php?option=com ... emid=1">14 day road ike holiday</option>
<option value="page1.html">Page 1</option>
<option value="page2.html">Page 2</option>
</select>
test the holiday
</form>

Need to get site done and have no money left to pay programmer - poor South African adventure guy!! 8) :D

Gergo Erdosi
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4031
Joined: Sat Nov 11, 2006 9:34 pm
Location: Hungary

Re: Link code to a list in joomla 1.5

Post by Gergo Erdosi » Thu Jul 17, 2008 11:09 am

Use something similar:

Code: Select all

<script language="javascript">
function submitForm() {
	location.href = document.navigationform.navigation.options[document.navigationform.navigation.selectedIndex].value;
}
</script>

Code: Select all

<form action="" method="get" name="navigationform">
<select name="navigation" onchange="submitForm()">
	<option value="">--- Navigation ---</option>
	<option value="http://example.com">Com</option>
	<option value="http://example.org">Org</option>
	<option value="http://example.net">Net</option>
</select>
</form>

soultouring
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Thu Jul 17, 2008 7:13 am

Re: Link code to a list in joomla 1.5

Post by soultouring » Thu Jul 17, 2008 2:13 pm

I shall try the code, thanks a lot for pasting a reply :p :D

will let you know if it works

soultouring
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Thu Jul 17, 2008 7:13 am

Re: Link code to a list in joomla 1.5

Post by soultouring » Thu Jul 17, 2008 2:34 pm

Hi Gergo

it is so great it works, all you programm guys use this cool code. THANkS SO MUCH FOR THE HELP11111 :pop :laugh:

Gergo Erdosi
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4031
Joined: Sat Nov 11, 2006 9:34 pm
Location: Hungary

Re: Link code to a list in joomla 1.5

Post by Gergo Erdosi » Thu Jul 17, 2008 2:40 pm

You're welcome. :)

soultouring
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Thu Jul 17, 2008 7:13 am

Re: Link code to a list in joomla 1.5

Post by soultouring » Thu Jul 17, 2008 3:39 pm

Hi Gergo

just wanted to asked how to make the text which will not be linked "Mountain bike Tours" - Line 10 in bold letters?. Can this be added into the list ???

<script language="javascript">
function submitForm() {
location.href = document.navigationform.navigation.options[document.navigationform.navigation.selectedIndex].value;
}
</script>
<h3><span style="color: #CC0000;"><strong>Choose a destination and activity...</strong></span><strong> in South Africa »</strong></h3>
<p> </p>
<form method="get" name="navigationform">
<select name="navigation" onchange="submitForm()">
<option value="">--- tour selector ---</option>
<option value=""><strong>Mountain bike Tours...</strong></option>
<option value="http://localhost/1/index.php?option=com ... emid=83">4 Day West Coast »</option>
<option value="http://localhost/1/index.php?option=com ... mid=77">14 Day bike Garden Route »</option>
</select>
</form>

would be great if you could jelo there, have tried <strong></strong> but this does not work. I want to highlight this line because it must describe the links below that line

best
charles :(

Gergo Erdosi
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4031
Joined: Sat Nov 11, 2006 9:34 pm
Location: Hungary

Re: Link code to a list in joomla 1.5

Post by Gergo Erdosi » Thu Jul 17, 2008 3:59 pm

You can do this for example with CSS:

Code: Select all

<option value="" style="font-weight: bold;">Mountain bike Tours...</option>

soultouring
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Thu Jul 17, 2008 7:13 am

Re: Link code to a list in joomla 1.5

Post by soultouring » Thu Jul 17, 2008 5:30 pm

Gee

Thanks a lot
Charles


Locked

Return to “Joomla! Coding 101”