buttons text fields

This is a discussion on "buttons text fields" within the Classic ASP section. This forum, and the thread "buttons text fields are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 25th, 2003, 14:14
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
buttons text fields

1: How do i change the style of text field and submit buttons

2: i have a field in a databse table which points to either a

picture

field = /images/hello.gif

sound

field = /sound/text.mp3

hyperlink

field = /test/energy.html

how do get the results page to have buttons which will reference the to play the sound or open the hyper link

or to have the picture displayed in a box.

  #2 (permalink)  
Old Sep 25th, 2003, 14:42
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
1) Do it with CSS, like:

input {
color: black;
background: red;
}

2) Check the last 3 letters of the field content (gif/mp3/tml) then display the appropriate link accordingly.
  #3 (permalink)  
Old Sep 25th, 2003, 14:46
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
not sure what you mean, i have designed a results page with the button, how to i reference the result to the button with out haveing to manuly change the html
  #4 (permalink)  
Old Sep 25th, 2003, 14:53
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
is it online, can I see?
  #5 (permalink)  
Old Sep 25th, 2003, 15:39
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by djaccess

not sure what you mean, i have designed a results page with the button, how to i reference the result to the button with out haveing to manuly change the html
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Can't you just do;
Code: Select all
<form action="<%= RecordSet("FieldWithPoints") %>">
  #6 (permalink)  
Old Sep 26th, 2003, 08:16
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
ok right a make a picture in Fireworks that i am going to add as a link to open a sound or image. The link for this file is held in my access database as etc. sound/sound.pl

i want to have 5 or 6 diffrent sounds linked with some other information from the table

so for instance
Pages

Name song name

steve outerspace <Button to play song>

<Button to play song> = result from table sound/sound/pl

i dont want a textr field with the result
  #7 (permalink)  
Old Sep 26th, 2003, 08:44
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Assuming you've got a recordset (RS) with all the field values then:

Code: Select all
If not RS.EOF Then
	Do until RS.EOF
		response.write _
                RS("name") & ", " & _
                RS("title") & ", " & _
                "play
"
		RS.MoveNext
	Loop	
Else	
	response.write "no records found"
End If
this should produce the following type of listing:

The Prodigy, Charlie, <u>play</u>
The Beatles, Yesterday, <u>play</u>

...
  #8 (permalink)  
Old Sep 26th, 2003, 09:21
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
what if i want the play to be a picture and i have more than one set of results say 7 sets
  #9 (permalink)  
Old Sep 29th, 2003, 10:11
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
Right ok so you put the result in the href of the button, but the problem im getting is that it opens the result

e.g

/sounds/sound.mp3

as a web page and errors, how do i make this open in winamp or win media player and play rather than bringing up the download screen.
  #10 (permalink)  
Old Sep 29th, 2003, 12:17
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
If you have an MP3 player installed it should be able to play it with IE. Otherwise suggest that they 'right-click save as' and play it using their favourite MP3 utility.

If you want to show a different word for each type:

.gif = "show"
.mp3 = "play"
.html = "view"

then you'll need some code tht works out what the last part of the string is (after the last dot):

pos = instrrev(RS("location"),".") 'find the last dot in the string
'make a new sring of just the stuff after the dot
extension = left( RS("location"),(len(RS("location")) - pos) )

then inside the loop have a sselect statement to put in the correct word:

Code: Select all
Do until RS.EOF
    select extension
        case "gif"
            linktext = "show"
        case "mp3"
            linktext = "show"
        case "html","htm"
            linktext = "show"
        case else
    end select
    response.write _
    RS("name") & ", " & _
    RS("title") & ", " & _
    "" & linktext & "
"
    RS.MoveNext
Loop
  #11 (permalink)  
Old Sep 29th, 2003, 12:19
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by djaccess

what if i want the play to be a picture and i have more than one set of results say 7 sets
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Just have 7 loops in a row, one for each RS.
Closed Thread

Tags
buttons, text, fields

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show/Hide text fields based on drop down sing2trees JavaScript Forum 1 Apr 22nd, 2008 21:01
how to give focus for text fields danieldear Flash & Multimedia Forum 4 Aug 26th, 2006 05:42
Radio buttons and mandatory fields joshcxa JavaScript Forum 1 Aug 8th, 2006 10:30
Flash Text Mousover Buttons MickAv8r Flash & Multimedia Forum 8 Oct 16th, 2004 16:31
text fields doesnt work on Mac IE hey259 Web Page Design 1 Jan 23rd, 2004 20:28


All times are GMT. The time now is 04:41.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43