Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with style="display:none;" 1

Status
Not open for further replies.

TribeMan

Programmer
Nov 16, 2009
22
IL
I want a hyperlink titled "change location'. On click, I want it to be replaced with a select box.

My problems are:
a) onclick doesn't hide the original text
b) the select box appears adjacent to (not in the same place as) the original text.

Any help will be appreciated.

Code:
<a style="float:right;" href="javascript:void(0);" onclick="this.display='none';xDisplay('locationSelection','block');">change location</a>

<div id="locationSelection" style="float:right; display:none;">
<form method="GET" action="../en/city.asp" onsubmit="alert('submit to default page');return false;">
	
<table align=right>
	<tr>
		<th>
			<select name='c' onchange='loadCities(this.options[this.selectedIndex].value);'>
		            <option value="">
		            <%
		            If lcase(Instr(sUrl, &quot;city.asp&quot;)) <> 0 Then
		            	response.write &quot;-- Change Location --&quot;
		            	else response.write &quot;-- Change Country --&quot;
		            End If
		            %>
		            </option>
					<option value="1">Israel</option>
					<option value="63">USA - Central</option>
					<option value="2">USA - North East</option>
					<option value="3">United Kingdom</option>

...etc

</DIV>
 
>onclick="this.display='none';xDisplay('locationSelection','block');"
[tt]onclick="this.[red]style.[/red]display='none';xDisplay('locationSelection','block');"[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top