/    Sign up×
Community /Pin to ProfileBookmark

Do I need Javascript?

Hi everybody,

I think I need a javascript for the following problem. I could use some ASP, but that would mean that the page has to ben sent to server again, and for some reasons I can’t do that.

I’m using a listmenu where people can select a car brand. But if the car brand that they need isn’t available in the list, they can enter the car brand in a textfield.

So I thought, let’s create a hiddenfield with some clever javascript that checks if the textfield contains any text. If yes put the value of the textfield in the hiddenfield. If it doesn’t put the value of the listmenu in the hiddenfield.

Then bind the hiddenfield to some asp-code for the insert in the database and my mystery is solved. But now comes my problem, how can I create a javascript like discribed??????

I hope someone can help me out.

to post a comment

1 Comments(s)

Copy linkTweet thisAlerts:
@NevermoreMay 28.2003 — Why don't you just check to see if the text field has been filled out when it's processed by the ASP, and if it is, use the text field over the select field.


Help @jelle-jacob spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 3.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ

legal: ({
terms: of use,
privacy: policy
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
recent_tips: (
tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,