Simple Wildcard Question...

what I want to do is get read a database entry and if it doesn't start with http:// then I want to include it.

I can't figure out what to use as a wildcard in the first line though

IF rsGuestbook("VisitorHome") = "http://" THEN
%>
<a href="<%=rsGuestbook("VisitorHome")%>" target="_blank">Name:
<%
ELSE
%>
<a href="http://<%=rsGuestbook("VisitorHome")%>" target="_blank">Name:
<%
END IF

View Replies


ADVERTISEMENT

Wildcard

I have a script which checks the current page name and write out a certain class if it's true to achieve an active menu item effect.

I want to expand upon it a little and have it check for any pages beginning with business rather than list business_dir_info.asp?id=2517 where there are loads of ids. At the moment it's just set to check for business.asp which is the top level page, is there any sort of wildcard character I can use?

View Replies View Related

Wildcard

Var1 's content can be "errorone" o "errortwo" or "good". I need to detect if there is "errorone" or "errortwo" with the If clause. How can I do that using the wildcard?

Example that doesnt work: if var1 = *"error"* then

View Replies View Related

Wildcard

Dear all, if in asp. i wanna to use the command request.querystring to check the URl. For example, my item when passing to next form will be either 4 or 6 character. How do i tell asp what to do if the string pass 4 character and if it pass 6 character.

My code example for 4 character is A100, 6 character is A10001. different number of character will have to perform different task for me.

I try to use "?" as wildcard but it fail Btw if i had stored chiense character in ACCESS, but when it go thru asp n display on IE, it show "???" instead of the chinese character.

View Replies View Related

Height Wildcard?

I am trying to show a series of movies on a web page. All of the movies are the same width, but have different heights. When I take out the width and height parameters, the pictures display fine, but the movies get the bottom cut off. When I put the parameters back, it stretches out the images to fit the entire box. Any way to make the height parameter a wildcard?

<<%=whattouse%> src="Upload/<%=(RS1.Fields.Item("xmedia_asset").Value)%>"
width="320" height="300" align="left" loop="false" controller="true"
autoplay="false"></<%=whattouse%>>

View Replies View Related

Wildcard Search

I have the following SQL statement that returns a result set based on the exact input stored in a session variable

If reqname <> "" Then
strSQL = strSQL & "AND(ABR_REQUESTOR='" & reqname & "')"

The variable “reqname” is set to a session variable.

I amended the SQL to do a wildcard search instead of searching for the exact string stored in the Session variable:

I altered the SQL as follows:

strSQL = strSQL & "AND(ABR_REQUESTOR LIKE '" & reqname & "%')"

The problem is the field ABR_REQUESTOR stores the first and last name separated by a space...i.e. John Smith

Using the above SQL will return John Smith if I use J, Jo, Joh.
But, if I want to search for Smith by using S, or Sm, etc. it won't work.

I need to alter the statement to look for anything after a space?

View Replies View Related

Wildcard Not Working

I have an Access database. I am using a dropdown search box. One of the options is "Search All States" and I set the value to %. In the recordset on the results page, I have the default set to %. Here is the SQL statement:

SELECT *
FROM ClientInfo
WHERE State = 'varState'
and varState = Request.Form("State")

However, I get no results when choosing this option in the dropdown Code:.

View Replies View Related

Using A Wildcard In An If Else Statement

In an ecommerce situation, when a category link is clicked, my results page shows the category name at the top of the page

This is working great apart from when a search is done without specifying category eg from the search page

So for example Results.asp?Category=%25&Keyword=&Submit=Search

This gives all products in the results page but just gives the last category name in the table as the heading

I would like to write a condition that just presents a static message eg �Results� when the search wildcard % is passed Code:

View Replies View Related

Using A Wildcard In Mysql

I want to post a wildcard IP in a varchar field in my mysql table so when I call it in the script it shows up giving that entire range of IP's. I've tried doing it like.
24.129.184.* but it doesn't seem to work.

View Replies View Related

Variable Wildcard

Not sure if this is possible but, is there any way to search a variable like,

var = "I like to play jazz"

If "jazz" * = var then ( If the word jazz is included in the variable then)
response.write "Found Match"
end if

View Replies View Related

Wildcard & Response.write

I'm trying to compare a form field from the previous page & write a response in the html on the current page. e.g

if (form field value) is like "Custom" then write Correct or else write Incorrect. Here's the code I have curently Code:

<%If (Request("RangeColour")) = ("Custom*") Then Response.Write("Correct") : Response.Write("")else Response.Write("Incorrect")%>

I've tried *, &, ? but they don't appear to work. I've also tried like "Custom*" but I receive an error about a sub or function not being declared.

View Replies View Related

Wildcard Character/syntax

I have a little script that is supposed to check for a certain value in a db column, and then do something if that particular calue is present:Code:

...<%ElseIf rsIDK.Fields.Item("my_column").Value = "/default.asp" then ...

The problem is that my_column can contain up to 300 characters, so the code above doesn't work. What I really need is a wildcard at the end of "/default.asp" but I don't really know the correct way of doing this.

View Replies View Related

Serach Db With Id Param Wildcard

I have a form where a user can choose one or more options from drop-down menus to search the db :

service
town
county

The id's are all numbers in a MySql database. I have put the default param for each search as % and this only changes if the relevant search option is chosen: Code:

View Replies View Related

IIS 6 SQL Injection Sanitation ISAPI Wildcard

I created an ISAPI dll application to prevent SQL Injection attempts by
intercepting the HTTP requests and sanitizing both GET and POST variables (or
any combination of both) before the request reaches the intended code. This
is especially useful for legacy applications not designed to deal with MS SQL
Server Injection attempts. Though this application was designed with MS SQL
Server in mind, it can be used with no or minimal changes with other database
engines.

This ISAPI is only compatible with Internet Information Server (IIS) 6.0
which comes with Windows 2003. Windows XP uses IIS 5 engine which DOES NOT
support ISAPI Wildcard.

View Replies View Related

Can't Pass % Wildcard Variable In Querystring

I'm trying to pass the wildcard variable % to another page via
request.querystring.

When I go to pick up the variable through request.querystring, it will
never diplay the "%" if one is included. It will diplay any other
characters included in the variable though.

Code from page 1:

<%response.write "<a href='Page_2.asp?Severity=" & varCombo_Severity &
"&Owner=" & varCombo_Owner & "'>" & "<i> Go to Page 2 </i>" & "</a>"
%>

Code from page 2:

<%varCombo_Severity = Request.Querystring ("Severity")%>
<%varCombo_Owner = Request.Querystring ("Owner")%>

Result: No % wildcards are passed though to page 2

Any ideas?

View Replies View Related

Simple Encryption (simple)

A system I use uses advanced encryption for passwords. It was taken from some sample script and adapted some where. However this was I think intended to be for passwords. So nothing too long.

However the time has come where I need to create a function to encrypt a large amount of text. It has to encrpt a large amount of text but nothing too advanced is needed to be honest. Just so its unreadable because its written to a text file on drive. It has to be a function though then capable of decrypting the encrypted text.

Any ideas ? Again Dont have to be nothing too flash. I mean I had a go at just changing letters to different letters but the function got huge with all the replaces.

View Replies View Related

Simple One

i have 3 fields like these
membershipamount=100.00
Postage=15.00
GiftArticles_Amount=5.00

and i add them up to get the totalcharge like this

Total_charge=Int(membershipamount) + int(Postage) + int(GiftArticles_Amount)

so i get Total_charge=120.00 which is what i want

but when i have like this

membershipamount=100.00
Postage=15.00
GiftArticles_Amount=3.50

i get Total_charge=118.00

View Replies View Related

Simple One

does someone know a good site for asp 3.0 interiew questions

View Replies View Related

Simple If

I have only begun to look into ASP due to an assignments requirements.I usually code in PHP,one feature in PHP is to be able to do an if.else statement,where if a certain statement is true then a chunk of HTML can be outputted.

Basically I want to be able to do this in ASP to use with a simple authentication system which I will construct.I have just got a fat book on ASP,and am beginning to read through it

View Replies View Related

Simple If/else

I am not an ASP programmer, but I need help with the syntax. I have a simple if/else statement that I need to translate into ASP. Begin Pseudocode

if
{
(id == 1,2,3,4,5,6),
then print "Private"
}
else
{
Print <a href="https://www.mydomain.com/file.asp?ID=<%=rs("ID")%>" target="_blank">Register</a>
}
End Pseudocode

So how do I say this in ASP?

View Replies View Related

Simple Upload

i'm trying to create just a simple upload - fill in a form with the article
title, and description - and select a file - i need to upload that file to
the webserver, and then rename that file to the <% =Sartid %>.pdf

any ideas where to get something this simple from? never done anything like
this before - i'm guessing the FSO will be used?

View Replies View Related

Simple Sendmail With CDO

This code is working partially fine

<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserver") = "mail.aws.no"
cdoConfig.fields.update

Set cdoMessage = Server.CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = Request.Form("E-Mail")
cdoMessage.To = Request.Form("sendto")
cdoMessage.Subject = "Tilbakemelding fra nettsiden"
cdoMessage.TextBody = strBody
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
Response.redirect Request.form("resulturl")
%>

Well, this works with only some addresses and not others.

Examples:

bjorn@domain.no
b@2.com

will work...

On the other hand:

bjorn.kaa@domain.no
bjorn-kaa@domain.no

won't work at all...

View Replies View Related

Simple ASP Page

I need to send data from a 'form' on an HTML page to an ASP page.

The ASP page should 'return' a simple HTML page containing
the data from any items submitted, including any hidden items.

View Replies View Related

Simple Login

A user logs in, then based on their account (username/pass), they are redirected to a specific web address.
I only need 3 different accounts.
Can this be done with Javascript? Or do I need to use a database?
If you can point me to some script that will achieve this I would love it!

View Replies View Related

Simple Problem

I got a small problem that I think you can solve in a sec.I use ASP to tell day, date, month etc on this page:
http://www.aljapaco.com/award/nyawar...rd&val=purpose

But,as the servers is in Sweden and I´m in Sweden to, I see the text in Swedish.
Can anyone that lives in any other country just please tell me if the text is in English when youre not viewing it from a Swedish connection.
IF it´s still in Swedish, how (if) can I make it change to English text or am I stuck with some messy old Java Script??

View Replies View Related

ASP Simple Upload

does anyone know of a good place to find code samples for ASP Simple Upload. I can't seem to get to the original site.

What I need to do is upload the file and save the path and some other info into to a database.

View Replies View Related

Simple IF Statement

I have a stylesheet switcher which store the user style preference in a cookie, however how do I modify the following to use the default stylesheet of “styles.css” if there is no cookie on the users computer? Code:

View Replies View Related

Simple Update Where?

Ok how do i update based on 2 Where options
i know this is wrong but i don't know how to do it.

strSQL = "UPDATE [Job Contract Assignments] SET currentassignment = 0 WHERE cnum= '" & cnumqs & "' "&" WHERE currentassignment = -1"
SQLconnect.Execute(strSQL)

View Replies View Related

Simple Thing

can someone tell me whats wrong with this code.i applying the style in right way

Code:

<tr style="background-color: #386cae; color: #000000; a:link {color: #000000; font-weight: bold;}
a:visited {color: #ded9dd;} a:hover {color: #000000; font-weight: bold; decoration: underline;}">

View Replies View Related

Simple Textbox

i have a shopping cart type system where a user adds items to their cart, and as they are doing this, i have a textbox for the user to enter the quantity of the selected item they want!i want this textbox to be max. 3 characters in length (for asthetic purposes!!) but no matter waht width i make it, it is always displayed much bigger(longer) than i want! So how do i force this
textbox to be no more than 3 characters in length?

View Replies View Related

Simple Query

I want to display a message if the submit button was pushed on the same page.

<% If Request.form("submit") = "Submit" Then

Response.Write "Your photo was successfully uploaded."

END IF %>

The action of the form is the same page. Code:

View Replies View Related

Simple Task

I want is to have my asp code test if it is the first time the page has loaded. If so it will need to skip my validation info, if not then run the validation code:

View Replies View Related

Simple Script

I've agreed to help a friend with a free project and everything was going fine until they got some free web space from another friend. It's running on windows and everything is ASP. I have never been near ASP and I really don't understand much. I use PHP/apache and even then it's only tinkering.I was hoping to find a simple script I could plug in and use as a contact form and one for a mailing list (both form to mail type things). But I can't. I've eventually managed to find a couple but I coulnt'd make any sense of them or get them to work.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved