VBScript/ASP Related: Ampersand Assignment
Is this a "legal" assignment in VBScript? strSearchChar5 = "&"
Once I do this in script tags, it throws the rest of my page off, as far as the colors in Dreamweaver. Would the lack of colors mean anything?
The code that uses this variable works beautifully, yet when I use request.form on the following page, nothing shows when I use Response.Write.
This is what shows when I use Response.Write:
UPDATE jobs SET [SubmitDate]='',[category]='',[type]=''' ,[job_title]='',[job_number]='',[openings]=' ',[address]=' ',[city]=' ',[zip]=' '
View Replies
ADVERTISEMENT
<% hour = Request("controlname") %> will yield the following error:
Microsoft VBScript runtime (0x800A01F5)
Illegal assignment: 'hour'
However, if I declare hour, then it is fine.
<%
Dim hour
hour = Request("controlname")
%>
But I think in VBScript,declaration of a variable is optional?That means we can use the variable without writing "Dim hour" ??
View Replies
View Related
I'm trying to use a popup window initiated from javascript to display pictures. Some of the directories and pictures contain &'s in the name or path. I've read the posts about Encoding but I cannot seem to get the get this working. Encoding the path to replace the & with %26 just gives me a page not found.
<script language="javascript">
function NewWindow(url, w, h)
{
url = "http://intranet/Marketing_Photos/" + url;
window.open(url,"_blank","width=" + w + ",height=" + h + ",left=0,top=0,scrollbars=yes,resizable=yes");
}
</script>
url is the subdir and picture name, i.e. subdir/pic.jpg
Mareting_Photos is an IIS Virtual Directory pointing to a different server.
Everything works, the pictues display, except when I pass a url with an & in the path then I get the page not found error.
I can type in http//intranet/Marketing_Photos/SomeDir/Some%26PicName.jpg (replacing the & with %26) in the browser address bar but I get a page not found.
View Replies
View Related
I am trying to pass a variable in the URL to a popup window. One of the variables in the URL has a value of S&CSB. Whenever I try to get at this variable it returns only "S". I did URL encode the "&" ampersand (%26) and (& and (S%26amp%3B), so I don't get why it's not working. Looks to me like ASP Request.Querystring is parsing from the ampersand on. Code:
View Replies
View Related
I have a problem with querysting again.i am trying to pass a filename with "&" in it e.g "Sales&marketing.doc"
in the querystring it will lool like:
coding.asp?filename=Sales&marketing.doc
and the "&" will be interpreted as another querysting of marketing.
View Replies
View Related
I have almost finished this assignment just stuck on one page I keep getting:
Error: Access is Denied.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '.'.
/iwsd/iwsd029/assignment2/calculate.asp, line 17
Here is my code I been stuck on this for hours and I cannot seem to figure it out
Code:
View Replies
View Related
I have a var in a javascript like so:
<script language="javascript">
var timerID = null;
var timerRunning = false;
var timeIncrement = 0;
LATER in the code I need to assign a session var to the local var like
so....
timeIncrement = session("incTime")
How do I do this?
I keep getting errors like "an exception of type MS jscript runtime...
Object expected was not handled"
View Replies
View Related
I'm having problems with getting numbers to add in asp. I cannot find anything in my book on adding numbers together. All it says "you cannot add values from a textbox". I guess I'm having a brain-fart in a major way.
I working on a program to calculate the totals of rainfall for a year. Give the month that has the max and min and show amount, and show average for the year. Can some please tell me where to start or a code snippet to get me back on track. Code:
View Replies
View Related
declaring an variable for incrementing called "I" as shown below:
I = 0
Gives this error:
Microsoft VBScript runtime error '800a01f5'
Illegal assignment: 'I'
/thx.com.au/includes/cart.funcs.asp, line 20
View Replies
View Related
My ASP page contains the following VBScript code:
<%
zipCode = Request.Form("zip")
%> <br>zip: <%= zipCode %>, rf: <%= Request.Form("zip") %>
When I enter "abc" into the "zip" field on the form, I get the
following output:
zip: , rf: abc
Why doesn't the first statement assign the "abc" string to the
variable "zipCode"? What am I not seeing?
View Replies
View Related
I'm fighting a bit of code which I simply don't understand why it won't work. originalurl is the referring page from which someone clicked a form submit. I grab originalurl using Request.ServerVariables("HTTP_REFERER")
What I need to do is to grab the value following idcategory=. Sometimes there are other querystring values following that, and my code works fine. But in the instances where it is the last querystring value, it fails on this error:
Microsoft VBScript runtime error '800a01f5'
Illegal assignment: 'gbdgCatQSwork'
originalurl = http://www.mydomain.com/store/pc/vie...p?idcategory=4
gbdgURLlen = 84 (this is the length of the entire URL)
gbdgURLlen2 = 1 (this is the length of the string that follows "idcategory=")
gbdgCatQSwork = mid(originalurl,gbdgURLlen-gbdgURLlen2,gbdgURLlen2)
What I want is that gbdgCatQSwork would contain the value (in this case "4") so that I can continue my process. Could someone please shed light upon what I am missing here?
View Replies
View Related
I've just installed ASPXMLRPC library and testing their main function:
xmlRPC ("URL", "command_name", params)
The function converts all parameters to XML, sends a request to third-
party server and receives XML response. It seems to be getting
response fine. But when I call the function like this:
myresp = xmlRPC ("http://someurl.com", "get", paramList)
I get error on this line:
"Wrong number of arguments or invalid property assignment"
All code details are: Code:
View Replies
View Related
Error:
Wrong number of arguments or invalid property assignment: 'Open'
/job_modifyConfirmed.asp, line 26
Still gettign this this is my db connection included: ...
View Replies
View Related
Error:
Wrong number of arguments or invalid property assignment: 'Open'
Still gettign this this is my db connection included: Code:
View Replies
View Related
i ve a problem thats regarding the data retrieval from database.I m storing data in the microsoft access database by writing query in the asp page..and the number of characters is exceeding 255.so the datatype that i ve chosen is memo...
but now when i want to retrieve the data on another page by writing query i cannot retrieve the whole data it is truncating and i can get only 255 characters
View Replies
View Related
i have a table with sno, userid, name, age, level
where level means the type of grade a person has like A,B it may even be Numbers on a scale of 1 to 5
the sno is declared as a rowid datatype
if i want to update any record i have to give the existing userid ( primary key ) and even update the primary key if there are no duplicates (obviously)
so when the userid is entered i am selecting the rowid where userid = request("")
and storing that rowid value in a variable to perform update operation in the next few steps
i am getting a type mismatch when i am doing the assignment
is there somethin wrong in the code ( that i need to check again ) or that sort of assignment cant be done
( i am still tryin to get it right as i write this thread )
i have one more ques: does the rowid value remain constant that is when i do a delete operation on one row and then subsequently a update operation on another row in the same table will the rowid's get mixed up and mess up my data.
View Replies
View Related
Is there a way to perform multiple actions on a SUBMIT with ASP?
Example, I have a submit button that when it is pressed, it performs an action where information is stored in the database using a stored procedure. Can I also write out a flat file of the information saved separately or something parallel without hendering the original submit? I would want to do these two requests at the same time on the submit. Is it possible? Can someone give me some guidance on this?
View Replies
View Related
I am making request to my asp page as
http://localhost/test/test.asp?id=mike
this works great query string value is retrived as "mike"
whereas when I give the URL like this
http://localhost/test/test.asp?id=%aaa
I dont get id value = %aaa
instead I get some garbage value...
is there some kind of encoding required when % is involved in querystring...
View Replies
View Related
currently i have an online shopping website that display 12 categories of different items of up to 12 types. well my boss wants related items to be displayed in each of the different items . i am not sure how to start this. is there any special code for it. please advise.you may visit www.mellon.com.sg/shop to view .
View Replies
View Related
I have 2 web sites hosted on 2 different machies (pages are in classic asp). when the user accesses http://Machine1/testapp then a cookie is written say
Response.Cookies("user")="Alex"
Whe the user acceses http://Machine2/testapp then a cookie is written as
Response.Cookies("user")="Alex"
before machine2 writes a cookie I need to check if the browser already hase Machine1 cookie, if yes then dont write if no then only write. I know the different hostnames generate different cookies....but is there any way for machine2 code to check client browser cookie for machine1.
View Replies
View Related
This is the code I have so far:
I take the email address and split at the "@" symbol. Then I split at the "." sign to get the firstname and lastname.
Most of the times, the email address is of the format:
FirstName.LastName@company.com
However at times, the email address can be just firstname@company.com
At such instances the code fails, how do I check for the instance of . before I split it again?
View Replies
View Related
Access db, one table, 12 or so fields (id, item_name, category, manufacture, price, description etc.)... (ecomm site).
When displaying the details of a particular item I want to display "related items" below it. All I do now is pull info depending on the item id then display the size, dimensions, description, photo etc.
Lets say the item is a Large Blue Widget, i want to display related items... say "Large Widget Covers" or/and "Large Widget Accessories"... you get the idea... cross selling
So, I am looking for ideas on how to simplify the display of related items.
View Replies
View Related
I am designing a Web site with about 500 - 600 pages of festivals on it and would like opinions on two ASP subjects. I have designed about 20 pages or so as of now. These are the contact us, FAQ, about us pages and such. I also have a template to go by for each festival's page. But I have two problems I need fixed before I start to replicate.
(1) SSI and styles - There are four sections to each page. I use SSI (ASP virtual version) for the top, bottom and a small section of featured festivals (which is above the bottom) on each page. Between the top and featured festivals is the actual page. This way I can change a link on the top or bottom and it is fixed on all pages.
But, I have an enormous amount of styles listed (all styles on four pages) in the code from each page's fonts. Each page's styles are called something different. For example, the festival page itself has the styles as normal, ".style1." But the styles on the top the links, which once again is an ASP include, would be called ".style1top." I used that approach because .style1 on the festival page and top links could be different.
It works, but I have dirty code and I want the site to be as Google friendly as possible. I have thought about adding all the styles to a page and using it as an ASP include on all pages, but that would have way too many styles each page and be even dirtier. What is the best practice for this? Code:
View Replies
View Related
I have a database related problem:
Syntax error (missing operator) in query expression ''087,'1075654'
This is a mobile number I entered in a form. 087 is the cusMobilePrefix,
1075654 is the cusMobileNumber
why is there a double quotation mark at the beginning of the number and none at the end?
I dont get it. If i leave the ' in i get a data type error and if i leave them out i get the above error. Below is my ASP file: Code:
View Replies
View Related
When adding i am checking if that name already exists in the DB and if so i am poping up the message that name already existing.
It is working perfectly in my win2000prof and i have tested in both in my localhost and ftp servers and in both places it is working as i ahve expected.
But when the same application is opened in winxp i have a strange problem coming. When i add a new list , then it checks for the name and what happens is every time i add a new one and even if there is no matching record or matching name avialable for that record, javascript popups saying "Favourite List Name Already Exists" and the strangest part is the insert part also working. That is both if and else part are working together. I am getting this problem only in XP. Code:
View Replies
View Related
Do you think it's posible to DISABLE a checkbox and the value associated with it, based on the DATE apearing in one of the columns in my database? Example,
I will loop through a list of series of products from my database, and I will put an automatic checkbox infront of any row in my form. I want ASP to automaticly disable the checkbox (can't be clicked on) if the date associated with it is older than 3 years.
View Replies
View Related
I have a page(.inc file) that contains connection to db; how can I make this page inaccessible to public.
View Replies
View Related
while using <form method=GET> whats the max length we can send in the input fields?
i heard that max querystring length is 2048 characters.while using forum with POST method its nearly one lakh characters.since GET method is treated as querystring, does it restricts the huge data?
View Replies
View Related
var oldLen = objListAppAnalysis.options.length;
alert(oldLen);
var i;
for (i=0;i<oldLen;i++)
{
objListAppAnalysis.options.remove[i];
}
var newlen = objListAppAnalysis.options.length;
alert(newlen).
View Replies
View Related
I have a MS Access database composed of a few related tables. I'm trying to link this with a website so that new data may be entered remotely via the website. I am using MS Frontpage, which has a simple wizard for this, but the wizard does not allow for updating multiple tables from the one web form. I have started learning ASP and VB, but all the books don't really discuss adding records to several related tables at one go. How do I do this?
Conceptually, I understand that you can't have a new record in the child table without a corresponding record in the parent record. It there a way of submitting several forms to the same record by 'indicating' which parent record each field is linked to? Is there a simple scripting code ? Any help or suggestion will be greatly appreciated, or just point me to where I might find the information I need?
View Replies
View Related
I have two list item one for country nd other for cities
how can I change cities list item value crosponding to the country list item value changes ??
View Replies
View Related
I have a timesheet application I'm working on. The user fills in a form which sends data to an Access db. On the results page I need to display the values from 2 fields; i.e if the user selects "Report Writing" from a drop down list, I need the data contained in another column called 'Codes' to display as well.
View Replies
View Related
What i'm looking for is an asp function which automatically runs every day at e.g. 12:00 AM and then updates a database. So no user or external event is involved to trigger the function. It operates stand alone. Hope there are some code examples available.
View Replies
View Related