Results 1 to 3 of 3

Thread: Question

  1. #1
    Join Date
    Dec 1969

    Default Question

    I have a dropdown menu with a submit button. I want to get rid of the submit buttom and allow the user to simply double click. I know this is possible in javascript, but is it possible in VBscript? I am more familiar with Vb and my page is coded in it. Any help is appreciated

  2. #2
    Join Date
    Dec 1969

    Default yes

    in the double click event of the listbox (lstTemp_OnDblClick) call the 'form.submit' method.

  3. #3
    Join Date
    Dec 1969

    Default RE: Question

    Even though you ahve an ASP page, it is still very simple to do using JavaScript. Put this function in your head:<BR><BR> &#060;script language ="JavaScript"&#062;<BR>&#060;!-- hide JS code<BR><BR>function urlRedirect(form) // this names the function that will select a new URL<BR> {<BR> if (form.urls.options[0].selected)<BR> window.location.href="http://page1.html" else if (form.urls.options[1].selected)<BR> window.location.href="http://page2.html"<BR> else if (form.urls.options[2].selected)<BR> window.location.href="http://page3.html"<BR><BR> return true<BR> }<BR><BR>// end hiding the JS code --&#062;<BR><BR>&#060;/script&#062;<BR><BR>Then on your select tag, put the following line within the brackets:<BR><BR>&#060;select name = "urls" onClick="urlRedirect(this.form)"&#062;<BR>&#060;op tion value = 1&#062;1<BR>&#060;option value = 2&#062;2<BR>&#060;option value = 3&#062;3<BR>&#060;/select&#062;<BR><BR>That&#039;s it, that simple!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts