Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - conditional form action based on select value

Reply
 
Old 09-03-2009   #1 (permalink)
Michael Courter


 
 

conditional form action based on select value

this doesn't work for me. what's wrong?
tia,
mcnewsxp
<form action=<%If document.getElementById("select1") >= 9 Then %>
"viewrecord03_04.asp" <%Else%> "viewrecord09_10.asp"
<%End If%>
etc...



My System SpecsSystem Spec
Old 09-03-2009   #2 (permalink)
Tom Lavedas


 
 

Re: conditional form action based on select value

On Sep 3, 1:33*pm, "Michael Courter" <mcour...@xxxxxx> wrote:
Quote:

> this doesn't work for me. *what's wrong?
> tia,
> mcnewsxp
> <form action=<%If document.getElementById("select1") >= 9 Then %>
> "viewrecord03_04.asp" <%Else%> "viewrecord09_10.asp"
> * *<%End If%>
> * etc...
I don't know ASP, but I would assume the DHTML you are using needs to
reference the selectedIndex property. Try ...

<form action=<%If document.getElementById("select1").selectedIndex >=
9 Then %>
"viewrecord03_04.asp" <%Else%> "viewrecord09_10.asp"
<%End If%>
_____________________
Tom Lavedas
My System SpecsSystem Spec
Old 09-03-2009   #3 (permalink)
Michael Courter


 
 

Re: conditional form action based on select value

i think the problem with my code is that the document object is no known at
this point


"Tom Lavedas" <tglbatch@xxxxxx> wrote in message
news:6529084c-2701-4b18-9492-638e18ce965b@xxxxxx
On Sep 3, 1:33 pm, "Michael Courter" <mcour...@xxxxxx> wrote:
Quote:

> this doesn't work for me. what's wrong?
> tia,
> mcnewsxp
> <form action=<%If document.getElementById("select1") >= 9 Then %>
> "viewrecord03_04.asp" <%Else%> "viewrecord09_10.asp"
> <%End If%>
> etc...
I don't know ASP, but I would assume the DHTML you are using needs to
reference the selectedIndex property. Try ...

<form action=<%If document.getElementById("select1").selectedIndex >=
9 Then %>
"viewrecord03_04.asp" <%Else%> "viewrecord09_10.asp"
<%End If%>
_____________________
Tom Lavedas


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Conditional execution based on app configuration .NET General
Select Files - Disable or Enable Full Row Select Tutorials
Conditional Formatting Vista General
Conditional Copying of Files Vista file management
Re: using xp based drive as slave on new vista based computer?? Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46