Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-03-2011, 11:53 PM   PM User | #1
willweb
New to the CF scene

 
Join Date: Aug 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
willweb is an unknown quantity at this point
Making drop-down menu hide, but choosing a 'selected' default option

I'm using the GMapFP component on a Joomla! page and am struggling to make a directions portion work when it looks how I want it too.

The link is:
http://tinyurl.com/phpquestion

I'm trying to make the FROM only have the text line, but whenever I remove the options pulldown, it looks correct, but code doesn't work.

On the TO portion, I'm trying to make the dropdown menu already have an item selected and remove the "Click here ..." option.

In the code below, the "GMAPFP_CHOIX_VERS" is the JText for "Click here ..."

Code:
	<select name="select_to'.$num.'" id="select_to'.$num.'">
	<option value="">'.JText::_( 'GMAPFP_CHOIX_VERS' ).'</option>';
		foreach($rows_orderA as $row) {
	$selected = '';
		if (isset($row->glat) && isset($row->glng) && !empty($row->glat) && !empty($row->glng)) {
	$value = $row->glat.','.$row->glng;
	} else {
		$value = @$row->pay.' '.@$row->codepostal.' '.@$row->ville.' '.@$row->adresse.' '.@$row->adresse2;
		}
		$carte .= '<option value="'.$value.'" '.$selected.'>'.$row->nom.'</option>';
	}
	$carte.='
	</select>
Ideally, I could hide the whole TO part and just have the store's destination be set.

Do I need to include any more code or detail?
willweb is offline   Reply With Quote
Old 03-04-2011, 10:56 PM   PM User | #2
willweb
New to the CF scene

 
Join Date: Aug 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
willweb is an unknown quantity at this point
Coding <select> and <option> on Joomla's GMapFP

Any ideas? I can make the parts I want disappear, but then the script doesn't function.
willweb is offline   Reply With Quote
Old 03-06-2011, 12:34 AM   PM User | #3
willweb
New to the CF scene

 
Join Date: Aug 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
willweb is an unknown quantity at this point
I'm getting closer. I have the "From" drop-down menu removed, but the script still functional. Now, I'm trying to make the "To" drop-down menu not show, but have the store location as the default. So it only appears as 'enter starting point here' and hit enter, then directions to the destination will appear without people needing to select it from the drop-down menu.

Again:
http://tinyurl.com/phpquestion


Thanks
willweb is offline   Reply With Quote
Reply

Bookmarks

Tags
directions, gmapfp, google map, joomla, php

Jump To Top of Thread


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

Forum Jump


All times are GMT +1. The time now is 03:35 PM.


Advertisement
Log in to turn off these ads.