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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

netscape ondblclick select drop down

Status
Not open for further replies.

ozbcoz

IS-IT--Management
Dec 29, 2001
2
AU
I am trying to use the event handler to retrieve the selected value when user double clicks the value in a drop down select list. (In IE I use a std ondblclick and that works - but doesnt work in Netscape). So after some looking around in Netscape I have gone to the event handler.

Now I can pick up dblclick actions in some places (eg the main body of the page, on links etc) but I cant pick it up in a drop down select list. Any ideas anyone ?

Jim
 
how on earth are you getting dblclick to fire on a select list. one click and it closes. anyways it won't fire for me, i'd like to see how your getting it to fire.
 
Why dblclick ?
I have a situation where I want to do one of two actions. On single click and then subsequent select I want to do the normal action of passing the selected value to the action cgi in the FORM.

On double click I want to use the value in the select to then open the selected page in a separate window as a demonstration of what the page looks like - leaving the main page in the main window and the demo page in an openwin page.

Now this works with IE but not Netscape.

cheers - thnaks for looking - hope you can help :)

Jim

<select name='pageselect' size=5 ondblclick=&quot;showTemplate(pageselect)&quot; class=main>

then:
<script language=&quot;JavaScript&quot;>
function showTemplate(templates) {
selectedOptionValue = document.selectpages.pageselect.options[document.selectpages.pageselect.selectedIndex].value;
var pagename = selectedOptionValue ;

<? echo &quot;urlPreview = \&quot; + \&quot;$domain/\&quot; + pagename ;
&quot; ;?>
openWin( urlPreview, &quot;preview&quot;, &quot;&quot; ) ;
}
function openWin( windowURL, windowName, windowFeatures )
{ return window.open( windowURL, windowName, windowFeatures ) ; }
</script>

Note that this is also under PHP so the $domain is resolved before javascript sees it
 
:>ozbcoz,
>>I have a situation where I want to do one of two actions. On single click and then subsequent select I want to do the normal action of passing the selected value to the action cgi in the FORM...why won't you do your first action either onclick or onchange & do the normal action of passing the selected value to the action cgi in the FORM onsubmit (wich is set in
Code:
<form >
tag) Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top