Advanced Form Question (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Oznob -> Advanced Form Question (2/27/2001 20:44:00)

FP2000

Hola Everyone...

VISION: User enters 'something' into a form field - the form field passes that 'something' to my next page - BUT - (and here is my question) along the way that 'something' has stuff added to the begining and end of it.

(i.e. user enters 'blah' in the form field but the variable I want passed is '<b>blah</b>' -- in the same formfield if someone entered 'doggie' the variable passed would be <b>doggie</b> )

In this example I want <b> added to the start of the string they enter and </b> added to the end.

Second example just to be clear: So in another form the user enters 'daddy' or 'mommy' in a different formfield and the resulting variable that is passed is <a href ="link1">daddy</a> or alternatively <a href="link1">mommy</a>

In this second example I simply want to add:

<a href="link1"> to the begining of their input

and </a> to the end of their input

QUESTION : can this be done and if so how ?

Thanks in Advance - hope its clear - or not over-explained

Oznob





Spooky -> RE: Advanced Form Question (2/27/2001 20:44:00)

You would need to process it on the 2nd page.

How are you planing on doing that?

The format would be (in vb) :

<%="<b>" & Request.Form("TextName") & "</b>"%>

------------------
Spooky
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!





Oznob -> RE: Advanced Form Question (2/27/2001 20:35:00)

That's more or less what I was looking for I think ... here's the plan ... how does it sound:

PROJECT BACKGROUND: As we know DRWs can display HTML - but I realize that alot of my users will not know much about adding tags to thier inputs - so I want to make it easy for them - (i.e. if they want text to appear bold they simply type in their text in the proper form and my pages will add the tags for them and send this new information to my database).

From your reply this is what I figure this may work:

formfield name: usertext

usertext is sent to a page that could be like a confirmation page - this page could contain a hidden field with the a variable called: newusertext

The value of newusertext would be set at:

<%="<b>" & Request.Form("usertext") & "</b>"%>

This second (confirmation) page would then send the newusertext to my asp page and insert it into the database.
--------------------------------------
Will this work ? Do I have the right idea and the right syntax ?

Thanks a bunch btw,
Oznob


"Resistance is noT fuTiLe"





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625