Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How do I make use of a parameter in a warning message.

Engaged ,
Jul 27, 2009 Jul 27, 2009

Copy link to clipboard

Copied

I have a form that passes a URL parameter from one page to another called picshowselected.asp of the form:

../picshowselected.asp?picapic=5+series&go=Go

The parameter is 5+series. If the database does not contain any categories of 5+series, I use a "show region if recordset is not empty " server behaviour in case there are no 5+series items in the data. This works fine and there are no problems when displaying the page..

I also supply a warning message at the moment that says "Sorry but we do not seem to have that catagory on file." This uses a "show region if recordset is empty" server behaviour.

What I want to do is to use the parameter to inform the user in a warning message of the following form:

"Sorry but there are no 5 series categories on file."

It seems likely that there is a way of recovering the passed parameter 5+series, replacing the + with a space if neccessary, and using it in my message, but I have been unable to work it out.

Can anyone point me in the right direction?

I'm using ASP JavaScript in Dreamweaver CS3 on this particular site.

Howard Walker

P.S. Before anyone asks, Yes - the 5+series does refer to BMW cars.

TOPICS
Server side applications

Views

460
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 27, 2009 Jul 27, 2009

Copy link to clipboard

Copied

You could use regular expressions to try to strip the "+" from your form variables but wouldn't it be easier to just have the select field display +5 and then just pass "5"  and not use the plus character in your database or in your passed variables?  Special characters in your passed variables is always a potential headache.

--
Lawrence   *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF
www.twitter.com/LawrenceCramer

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 28, 2009 Jul 28, 2009

Copy link to clipboard

Copied

LATEST

That’s OK, but the + represents a space in the parameter which is added by

the system, and there may well be lots of other spaces as people search for

different things. This is not a major problem as I can put in some code to

remove the + signs. What I really need to know is how to collect the value

of the parameter passed to the page, as it seems to disappear if the

required data is not found.

Best wishes

Howard Walker

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines