Re: Dynamic drop down list problem
From: Patrice (nobody_at_nowhere.com)
Date: 10/13/04
- Next message: Bob Barrows [MVP]: "Re: Help pls- quick one"
- Previous message: Mr. Smith: "Alternativ to TEXTAREA"
- In reply to: Jochen: "Re: Dynamic drop down list problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 13 Oct 2004 12:36:02 +0200
Ok this is exactly what the code means. You could use "Eval" to evaluate the
expression.
THAT SAID, I would avoid using "dynamically named" variables which is bad
IMO.
If you still want something similar you could use an array instead with one
dimension for the language and the other for the string id.
See :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vbsVariables.asp
at the bottom of the page.
Patrice
--
"Jochen" <jochen.scheire@pandora.be> a écrit dans le message de
news:HVVad.276874$3e6.14202949@phobos.telenet-ops.be...
> Indeed, that's what I experience
>
> "Patrice" <nobody@nowhere.com> wrote in message
> news:Of8M%23PIsEHA.3464@TK2MSFTNGP14.phx.gbl...
> > Looks like you try to use "dynamic" variables ???
> >
> > Response.Write(langstring&rsitems("TestFile")) will write what is in the
> > langstring variable followed but what is in the rstitems("testfile"). Is
> > this what you experience ?
> >
> > Patrice
> >
> > --
> >
> > "Jochen" <jochen.scheire@pandora.be> a écrit dans le message de
> > news:zuUad.276785$Wq.14260252@phobos.telenet-ops.be...
> >> Hello,
> >>
> >> I have an asp application which I made "Multilanguage". I made an asp
> >> file
> >> for every language with all the strings to be used stored like this:
> >>
> >> Langstring1 = "French"
> >> Langstring20 = "VTest"
> >>
> >> In the beginning of an asp file I determine which language file to
> > include.
> >> In my database there are only numbers. I can now display the right
text
> > in
> >> the right language using respons.write: Response.write(Langstring20)
> >>
> >> Now I want to use a dropdown box displaying a text as selected based on
a
> >> relation between the number in my database and my language files. When
I
> >> have number 20 in a database, the value of the option should be 20 and
> >> the
> >> text displayed should be 'VTest' for this is Langstring20. Problem is
> >> that
> >> the option value seems to be correct with what I do, but the text
> > displayed
> >> in the box is not correct. How can I solve this?
> >>
> >> What I did was the following:
> >>
> >> ------------------------------------------------
> >> Langstring = "Langstring"
> >>
> >> <select name="Testbox">
> >> <option value="<%=RSItems("Testfile")%>"
> >> selected><%=response.write(Langstring&RSItems("Testfile"))%>
> >> <option value="20">VTest
> >> <option value="21">TTest
> >> <option value="22">FTest
> >> </select>
> >> ----------------------------------------
> >>
> >> What did I do wrong?
> >>
> >>
> >
> >
>
>
- Next message: Bob Barrows [MVP]: "Re: Help pls- quick one"
- Previous message: Mr. Smith: "Alternativ to TEXTAREA"
- In reply to: Jochen: "Re: Dynamic drop down list problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|