p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   Two questions Pls Help (http://p2p.wrox.com/showthread.php?t=37282)

topshed January 16th, 2006 11:11 PM

Two questions Pls Help
 

I want the drop down box to react when a selection is made without using a submit button as shown below

<form method="get" action= "<%= strURL %>">
  <select name="col_name">
    <option>--Select Search--</option>
    <option>Livery</option>
    <option>Chassis</option>
    <option>Body</option>
  </select>
  <input type="submit" value="Click Here to Continue" />
  </form>

Is this possible please ??


My second question is date formating, I have

Session.LCID = 2057 'Sets locale to UK.

and my line of code is

<td><%= rstSearch.Fields("date").value %></td>

which works fine showing for example 1/12/1999

But in Access I have it formatted to show Dec-1999

So how can I get my screeen write to do the same in ASP please

Thanks

Topshed

mat41 January 16th, 2006 11:26 PM

;;;I want the drop down box to react when a selection...
Do you mean drop down box to submit?

If so:

;;;Is this possible please ??
Yes, use an onChange submit event inside your <select> tag:
<SELECT NAME='comboOne' SIZE='1' onChange="uformName.submit();">

FYI: You may find the following post helpful:
http://p2p.wrox.com/topic.asp?TOPIC_ID=38301


;;;So how can I get my screeen write to do the same in ASP please:
--------------cut n paste------------------
<%
 dVal = "1/12/1999"
 response.write MonthName(month(cDate(dVal)),true) & "-" & DatePart("yyyy", cDate(dVal))
%>
---------------------------------------------

Wind is your friend
Matt

topshed January 17th, 2006 02:07 AM

Hi Mat

Sorry I am not with you quite ...

The three options I need are in fact column headers in my DB and what I am using are static options for my select
If I can use your code to find my column headers then fine, either way I need some more help

Regards

Topshed

mat41 January 17th, 2006 02:18 AM

when I write ;;;; I am quoting you, the next line is my answer.

You asked two questions, I gave you two answers - what part of that do you not follow?

I asked you one and you failed to answer it, why is this. The reason I asked related to your solution.

Now I dont follow you - what, you are asking different questions now? What about your originals? mmmm. lots of questions this time and its almost home time for me.

Wind is your friend
Matt

topshed January 17th, 2006 04:00 AM

Sorry bout that

The Date thing works fine Thankyou
 to reprise the first question:-....
I want the drop down box to react when a selection is made without using a submit button as shown below

<form method="get" action= "<%= strURL %>">
  <select name="col_name">
    <option>-Select column Headers-</option>
    <option>Livery</option>
    <option>Chassis</option>
    <option>Body</option>
  </select>
  <input type="submit" value="Click Here to Continue" />
  </form>

Your excellant answer does not work for me because I want column headers (See above )
for my options unless there is a way to use your code With Column Headers

mat41 January 17th, 2006 06:40 PM

Dont be sorry. This place is where I come for help and to help others. I get turned off a post very quickly if I sense the person hasnt read my reply or falied to answer specific questions.

;;I want the drop down box to react
define react (the very first line of my very first post asked this)

Wind is your friend
Matt

topshed January 18th, 2006 01:09 AM

When a user makes a selection from the Static drop down below

<form method="post" action= "<%= strURL %>">
  <select name="col_name">
    <option>-Select column Header-</option>
    <option>Livery</option>
    <option>Chassis</option>
    <option>Body</option>
  </select>
  <input type="submit" value="Continue" />
  </form>

I want my script to continue to the selection without them having to use the "Continue" Button
The same way as this forum jumps to the page number once selected at the bottom right of the messages

You showed me a dynamic way of doing this, but I cannot do it for this particular application dynamically because it is looking at column Headers, unless you know better

Thanx for your patience

Topshed

topshed January 29th, 2006 05:51 PM

Problem sorted Thank you


All times are GMT -4. The time now is 09:23 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.