Passing Value To Function
How do I pass a value into a function that's in an Include file? I have a file that has the following code:
View RepliesHow do I pass a value into a function that's in an Include file? I have a file that has the following code:
View Repliesi have a problem when i'm passing a parameter into my function, it gives me an error saying invalid column ts Code:
View Replies View RelatedFrom ASP I run a query using MIN(some_field/parameter) Now I need to pass this parameter to the query from ASP code. How do I do that?
Syntax like
MIN([some_field] / [])
does not work
I'm trying to use a javascript function passing a vb variable. I don't understand why it doesn't work. Code:
View Replies View RelatedHere is my code:
...
dim fname
fname = rsAddwg2("file_name")
response.write("<td align=center onclick=""tst(fname);"">" & revno & "</td>")
....
I'm trying to pass te variable fname to function tst, but I keep getting this error message "Error: 'fname' is undefined. I have a feeling that there is something wrong with my syntax but I can't figure it out.
I need to pass a variable from asp to a Javascript function, which gets invoked when the user clicks on a button. Any ideas?
View Replies View RelatedI have an asp page that uploads binary files. I am trying to pass the binary data to a function in a dll (written in c++) to process it. The file I'm testing with is the range of bytes from 0x00 to 0x51. When the data is passed to the function, it is passing it as the string "A^? ".
which is what is printed out when I do a Response.Write. How can I pass the binary data to the function? A Response.BinaryWrite prints out the correct contents of the file. Why won't it pass it as binary?
How can i pass optional values to a function? I tried this below which gave me an "Expected identifier" error:
FUNCTION cart_state_list(selectname, optional stateid as integer = 1)
If it were php here is the code
function cart_state_list($selectname, $stateid = 1)
how to pass an asp session variable to a local variable withing a javascript function. Something like this:
var zip = <%=Session("clzip")%>
but it's the quotes around "clzip" that is throwing a syntax error I think. I've tried single quotes and no quaotes. Can't get it to work. Anyone have any ideas?
What's the difference between private and public functions in ASP? When should I use either?
I am using a simple guestbook /portal and i want script to send mail to the thread owner when someone reply his message.
this is the send message code ....
Can I define a function inside a function. e.g;
function abc()
function xyz()
....some code.....
End Function
End Function
I googled this but can't find any related topic.
I want to use the instr function, but return results from it depending on surtain functions, I can't realy explain so I'll show my example:
I have a string in wich some word I want to find might be in diffrent Capital Letters order, I want the Instr function to return all the values of the place of that word (avcourse I'll run a for and increase the starting point of the Instr func until it returns 0). The instinct thought is to use the Lcase or the Ucase functions, but in this case I don't know how to use them. In the same Idea I wanted to use the Instr Func with the trim Func, But Its realy the same principle if I just understood how to do so.
I need to click on a button and pass through a variable with a number
associated to it to other form
That is. I know I can do something like this:
<FORM action="http://somesite.com/prog/adduser" method="post">
<INPUT type="submit" value="Send"> <INPUT type="reset">
</FORM>but.. can I do something like this?<FORM
action=http://somesite.com/prog/adduser?data=14 method="post">
<INPUT type="submit" value="Send"> <INPUT type="reset">
</FORM>
How do I do it?
I have some code which I use server.Execute. In the included code for
the server.execute, if I use a Request variable I get an error stating
that I cannot use request after UPL but If I change all the variable
names from request
to upl, it tells me that UPL is not defined.
It seems that the page is passing the form values for request but not
UPL
I have got a news section which i am working on i can get all the news items to display the short description and title with the link to the full item but when i click on any of them it takes me to the very first record in the database. i have been told that the problem is with the ids not being passed through properly but im not sure.
View Replies View RelatedI have a small problem.How can I pass value from form thru a few pages. I try with hidden field but my second page just validate and redirect to other one and when I use Request.Form("field") it's nothing coming back.
View Replies View RelatedI am creating a simple news WAP site which uses a database. The database consists of three columns, storyid, storyheadline and story. The first page outputs the storyheadlines. When the user clicks on the headlines, they are taken to another page. The storyid is passed through the url (stored as storyno) and the next page loads the story which matches the headline. So basically, I need to know how to correct this:
SQL = "SELECT * FROM gmscwapstories WHERE storyid = <% Request.QueryString("storyno") %>"
This doesnt seem to be working.
how to properly parse this so "Cute & Cuddly" passes to the calling page. I need to pass the & sign.
<option value="search.asp?category=Cute & Cuddly&subcategory=brown">
I have a members only section of my site, which is protected and works fine, but i want to be able to alow the user to update their profile. Problem is, i don't have anything to pass in the url.
In the member record update section of the admin, i have the url, as it leads on from the chosen members id....eg...www.xxxx.com?id=2.......like that. But where the user updates their profile, it has nothing to send data from...eg...a form/recordset. Could this be done by storing it in a cookie or something?
I'm trying to display data from three tables. The main table has a Record number and the other table contain the same number. I need to pass the parameter value (record number) from the main table to the other tables (table2 and table3) and display there data on the same web page.
i can get the three recordsets open, but I can't select table2 and table3 by the record number from the main table. I also need to be able to move through the recordset one record at a time backward and forward.
I am trying to pass a value in a way that after a user has successfully logged in to an ASP app through a form, their login id would be passed to a welcome page.
for e.g. after their login they get to a page saying "Welcome User what would you like to do? " This is probably simple but I am new to ASP,so how can this be done ?
Is there a code, or something that scrambles the value being passed fromone asp page to another??
what I mean is this:
if i want to pass a value from a database (record id #721) from my page records.asp to recordview.asp
it might appear like this in the browser window, or when u highlight the link on records.asp:
recordsview.asp?K=751
I don't want users to see exactly what record number is being access... so I'd like it to show some garbage in the browser like
recordsview.asp?@$@#$=DSFSD+jklsjkld
you get my drift...
This is hopefully a really simple issue... but what is the best way to pass a variable from one .asp page to the next?
View Replies View RelatedI'm trying to post variables using http to a site with a different domain and need my page to wait until it gets a returned value back and then insert that value returned into a database. Once I'm able to get the variable back i know how to get it into a database, just don't know how to have the page wait for the value returned.
View Replies View RelatedI have a submit form that collects my values, and if my form action is "mailto" the values are passed, but if I try to pass to another asp page the values aren't sent and the asp doesn't execute.
View Replies View RelatedI am trying to write a search application which will allow a database holding a text to be searched.
To search the text the user has to select the act, the scene, the character
Right this is where it gets tricky!
The acts all have different scenes and the scenes all have different characters - so rather than try and attempt a very complicated linked combo box for the act, scene and character I figured a more sensible way of doing it would be to have the user enter the act they want to search on one page. The value of this would then be passed by form to the next page (to get the scene).
Based on the act selected a dropdown box is then populated with all the scenes for that particular act. Following on from this I then want to pass the scene selected together with the act selected on the previous page to the next page which will get the character. I can get the scene value passed through to the character page but not the act value as this is now a server side variable. Basically what I want to end up with is after the user has selected the character on the third page, I want to be able to use all this information to build an SQL search statement.
In case you are wondering why I decided to do it in this way, I initially tried the linked combo box method but found that if the user doesn't click the boxes in the correct order it causes problems with updating the box contents. Doing it this way I figured I can force the user to enter the information in the correct order. Code:
I am trying to make a variable appear in an SQl but am not sure how. Here is the sample code:
View Replies View RelatedI have a form and from there I click on link to open a search page, choose an item(checkbox), then that item should appear in the same form I first opened. I tried javascript onClick event such as :
<input type=submit name=submit value=Submit onclick="javascript: form1.submit();">
and also tried:
<input type=submit name=submit value=submit onclick='http://myformurl/form.asp'>
It is only opening a new form instead of the same one. How can I do to choose to pass the value to the same form?
i m using frontpage to create a login form using SQL SERver database. i want 2 redirect the value of username & password to another page.
View Replies View RelatedIs there a way I can pass a javascript variable's value and use it in my asp code?
This is what I am doing:
I have a checkbox.
onclick="SelectView('course')"
javascript:
Function SelectView(course){
var course
course = 'course'
}
then in ASP (again)
if (javascript variable course = course) then
do something
end if
I've got a form that has ENCTYPE="multipart/form-data" - this works great for getting a file from the user, however, no matter what I've tried, I can't seem to get any of my other fields passed to the next page. Here is an example:
<input type="text" name="lname" value ="<%= request.form("lname") %>"> I need the "name" field to be passed to the next page.
This if my form tag:
<FORM NAME="UploadFile" METHOD="POST" ACTION="UploadFileAck.asp" ENCTYPE="multipart/form-data">
I've tried an onblur when a name is entered, but it still doesn't recognize the lname field. Any ideas would be appreciated!!
I hope I can explain this without much confusion.I have a search box on a site that contains 2 forms. One form is a search for Cities (via dropdown box) that goes to citylistings.asp. The other form is a search for Counties (via dropdown box) that goes to listings.asp.
Now I need to add the ability for the user put a Minimum and Maximum price in addition to the above. My problem is that I am unsure how to have just one set of price boxes for both forms. So that you can fill in the prices, and click Submit for either form, and the prices get passed.
You can view the page Here.
A guy who used to code in VB said that I should be able to declare variable, then when the user clicks on the box and types a value, the variable is set to that value. Then I can added hidden fields to the forms that are equal to the variables. Can I do this using ASP/VBScript.Or can I accomplish something similar?