I'm trying to use a variable like a file and I do not know if it is possible, like this:
varfunc=chr(60)&chr(37)&"function addone(varint) : addone = varint + 1: End function"&chr(37)&chr(62)
Now I have a addone function inside varfunc.
The value of varfunc is <%function addone(varint) : addone = varint + 1: End function%>
Is it possible I use varfunc like a file or something to make the function active? There are some operator like a pointer to variable or somehow to eval like a code block?
I have a function that I would like to use a session variable in. However I am not getting it to work out. I was wondering if you have define global variables inside functions like you do php or if something might be causing this?
Having an issue trying to access a variable that is populated by a value inside a recordset that I want to use in another statement. I've included the source code below:
If frmSuburb = strSuburb Then Response.Write "Zone for " & strSuburb & " = " & strZone & " , Postcode = " & strPostCode & "<br>" strShipZone = strZone Response.Write strShipZone End If
objRSZone.MoveNext Loop "
So what I want is to use the strShipZone variable somewhere other than this place above. But it doesnt work, as it is on the loop, if i put it outside the loop it is populated by a wrong value.
I have a function that I'm using to loop through some db query results and put them into a table. Inside the function, I have a line to add certain values to a series of cookies (kind of like a cookie array) as such:
If I uncomment the second line, I pull my values just fine from inside the function. The problem is, if I use the exact same line to try to pull the values outside of the function, or from another page, it returns nothing. The whole reason I'm putting these values into cookies is so that I can pull this list up on another page, but I don't seem to be able to. Is there some reason that I would not be able to read a cookie that I set inside a function outside of it?
I'm developing an account lookup, mostly in ASP, that displays a list of radio buttons to select one account from those found in a recordset. Here is a snip of the account display, after the recordset is populated: Code:
I'm trying to take an ASP session variable and pass it into a javascript function with little success. As the page loads, the session variable is there and the javascript function is called as an include.
I've tried silly ideas like option explicit and using asp to write the javascript declaration of the variable.
Well, it's quite simple, it's easily done in C, but in ASP (and VB in general) i haven't been able to see it done...
function setvalues(var1, var2="a", var3="b") if var2="a" then response.write("Var2 wasn't defined") end if if var3="b" then response.write("Var3 wasn't defined") end if end function
I hope it makes sense, and that someone has the solution to it...
Here 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.
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?
I have a front end with all the code and a backend with some tables. Want to convert this into website database. Most probably convert the frontend into ASP. Is this the only way? Can one use the VBA code inside ASP with translating the VBA into ASP?
I need to do a loop with some criterias that depends on an earlier database query. I tried to do it this way, but it seems not to accept that the do is inside the if:
if not objrs.EOF then Do until updatearray(0) < objrs("updated") else Do While not fso.AtEndOfStream end if Blabla my repeating script here... Loop
I'm getting this error:
Microsoft VBScript compilation error '800a03fb' Expected 'Loop' /x.asp, line 46 else ^
It seems somehow that the do is "stronger" than the if statement, as it didn't even help doing it this way: Code:
I've inherited webmaster duties for a website done in ASP.NET. After much trial and error I've figured out the architecture of the site, and have a template for the area of the page that contains the content. I need to pop in a dropdown menu, nothing fancy, like the one on this Post New Thread page for "Category".
Does anyone know where I can get the syntax for one? Or does someone know ASP.NET and can write out a simple dropdown menu code for me?
I need to make a search to search our database that can be put on different customers websites. So I was planning on making the search a reusable asp.net control. But a lot of our customers websites are written is ASP. So Is it possible to call an asp.net control inside an asp page?
We need to display certain websites inside a frame on our website and I use the response.redirect command in VBScript. The problem is that some websites take over the whole browser, how can I stop this and force a website to be loaded inside a frame?
<a href="contact.asp?subject=Question about group <%=(Recordset1.Fields.Item("group_name").Value)%>">Send a message</a>
I am actually putting above info in an Access field. People would be able to send me email through a form in contact.asp and I want the subject line reflect which page they came from.
Was thinking of having an array inside a asp page. I'm rather new to this.How do I begin. my asp page should work as follows.One html page include mail adresses. We receive a lot of junk mail and I was thinking of how to avoid this. Was thinking of creating a asp page with an inout string inside the asp page. The input number should refer to the users mail adress.
We are only four people in our office, so that should be simple to manage.The html code should be like "redirect.asp?" for the first mail adress. and redirect.asp?What's the syntax inside the asp page?
I'm currently new to OO programming with Classic ASP and have been stopped dead in my tracks on the issue of validation inside classes and if I should be doing things that way. I have been using a User class and it has methods such as Save(), Update() and Delete(). Particularly with the Update() method I'm unsure if I should be validating my form(s) within the class or on the actual edit.asp page that uses the Update() method?
I have two types of edit pages; one for Admin users and one for the My Account page. On the My Account page if the user wants to change their password they have to enter their current password, a new password and then their new password again to confirm .
If an Admin user is updating that same user's info they do not have to go through those steps and they can simple just change the password by typing it in. The point here is that there are two separate cases of validation rules on two separate pages that both use the Update() method. Do you validate your forms inside your classes or outside?
I'm still learning .Net and have an ASP.Net app that I'm working on. On this particular page, I need to put a bunch of checkboxes on the side of the page, and the text for each is derived from the database. So I can't just hardcode the checkboxes. I'll have any number of them, and possibly even 0.
I am told that you use a Repeater control for this, but beyond that, am not sure what to do. Can someone show me?
i am unable to figure out some way....so pls if anyone has implemented then do suggest me. i need to have a link on clickign to which i want excel workbook to open (a previously created template) below the link in the form.
how can i do it. i find lot of info on opening excel as an application freshly. i want to open in the form itself. is it feasible or i am just wasting my time searching info for it.