Mavs Final Challenge - Page 4


Thats right... but... it goes.. Cohort > Courses > Results.... so the only thing that wrong is the missing cohort function although if worse comes to worse you can miss the cohort part out and just leave it as courses as it doesn't matter that much really i'm just trying to be perfect
Posted On: Friday 26th of October 2012 07:36:09 AM Total Views:  686
View Complete with Replies

RELATED TOPICS OF ASP PROGRAMMING LANGUAGE




Regex challenge: Match phrase only if outside of an tag

I am working on improving our glossary functionality in a custom CMS that is running with classic ASP (ASP 3.0) on IIS with VBScript code. I am stumped on a regex challenge I cannot solve. Here is the current code: If InStr(ART_ArticleBody, "href") = False then sql="SELECT URL, Term, RegX FROM GLOSSARYDB;" Set rsGlossary = Server.CreateObject("ADODB.Recordset") rsGlossary.open sql, strSQLConn Set RegExObject = New RegExp While Not rsGlossary.EOF URL = rsGlossary("URL") Phrase = rsGlossary("RegX") With RegExObject .Pattern = Phrase .IgnoreCase = true .Global = false End With set expressionmatch = RegExObject.Execute(ART_ArticleBody) if expressionmatch.count > 0 then For Each expressionmatched in expressionmatch RegExObject.Pattern = Phrase URL = ""& expressionmatched.Value & "" ART_ArticleBody = RegExObject.Replace(ART_ArticleBody, URL) next end if rsGlossary.movenext wend rsGlossary.movefirst Set RegExObject = nothing end if Instead of skipping putting glossary links in any article that has an href in it, as the above code does, I would like to change the code to process every article but have the RegEx pattern avoid matching on a glossary entry if the match is inside of an a tag. For example, in italics below is a test example for this regex entry in my DB: ROI|return on investment|investment return Here is a link that uses the glossary term: Info on return on investment. Now, here is the glossary term in plain text, not inside of a link: return on investment. We want to find the third instance of a match but not find the first two because they are both inside of a HTML link. In the above text, if I were processing the article for the glossary entry "ROI|return on investment|investment return" I do not want to match on the first or second occurance that match because they are in an a tag. I need the regex pattern to skip over those matches and just match on any that are not inside of an a tag.
VIEWS ON THIS POST

270

Posted on:

Friday 17th August 2012
View Replies!

check box challenge

I have a database table say; company(id,name, tel, fax, email) problem is there are duplicate records eg 1,bigfoot store, 123, 321, t@t 2,bigfoot convient store, 123, 321, t@t The two records are for the same shop. I would like an ASP and PHP soultion that when a record is searched for by name returns a list of simillar records. It should allow a moderator to select those that are duplicate in checkboxes. The choice is then returned to the database table. A new table is field is then added like; company(id,name, tel, fax, email, code) When a result of duplicate records is selected a unique identifier is given to the records so that the records can be grouped by code, so that subsequent searches are done by code, like; 1,bigfoot store, 123, 321, t@t, a1 2,bigfoot convient store, 123, 321, t@t, a1 The trouble is I have 25 different files that are constantly updated by data cature clerks with lots of duplicates and I want to group these by code without deleting any record. If anyone can make head and tail of this problem, please assist. regards
VIEWS ON THIS POST

204

Posted on:

Tuesday 28th August 2012
View Replies!

Excel programming challenge

Is there a way to accomplish this Formulae exist in an Excel spreadsheet, linked to a Word document (a standard letter that extracts the results from the Excel cells). We want user online to fill in a web-based form, these data to be processed according to formulae in Excel sheet and then a standard document (Word or similarly formatted) is emailed to the person containing just the results from the Excel cells. At no point will the person have access to original Excel or Word files. The Excel and Word documents will change frequently. It is deable if there is a way to simply upload the Excel and Word docs and the online form and all other aspects of the system will change automatically to reflect these changes. 1. Person fills in form 2. Server processes data from that form and generated answers 3. Person is emailed a standard document with the answers in place
VIEWS ON THIS POST

336

Posted on:

Tuesday 28th August 2012
View Replies!

Excel programming challenge

Is there a way to accomplish this Formulae exist in an Excel spreadsheet, linked to a Word document (a standard letter that extracts the results from the Excel cells). We want user online to fill in a web-based form, these data to be processed according to formulae in Excel sheet and then a standard document (Word or similarly formatted) is emailed to the person containing just the results from the Excel cells. At no point will the person have access to original Excel or Word files. The Excel and Word documents will change frequently. It is deable if there is a way to simply upload the Excel and Word docs and the online form and all other aspects of the system will change automatically to reflect these changes. 1. Person fills in form 2. Server processes data from that form and generated answers 3. Person is emailed a standard document with the answers in place
VIEWS ON THIS POST

160

Posted on:

Tuesday 28th August 2012
View Replies!

VBScript - General - Error - Anyone fancy a challenge - i need to solve this issue!

, hope your all well, p.s. love the support on this site and example code. anyway, im having a slight issue with asp, unfortunately ive brought this site that has been coded in asp for me and i;ve decided to make a change after it was build - duh! anyway, i have a voucher site to show vouchers specific to locations. So each location has an ID against it and the website returns vouchers depending on the ID set - for example from dropdown menu. However, ive decided to make a change to also include a "new vouchers" page - BUT the problem is the page remains to only show vouchers dependent on the ID selected. I actually want it to show all vouchers regardless of the ID. The code that i've narrowed this done to is as follows: Code: When MMColParam4 = "1" is changed to either 2,3 or 4 it only displays the vouchers for this ID. HELP! If anyone wants to see all the code, here you go. Code above is highlighted in red below. Code:
VIEWS ON THIS POST

248

Posted on:

Tuesday 28th August 2012
View Replies!

asp challenge, hidden form fields

i wrote a script in asp/vb script that validates form fields. all works fine, apart from the fact that alerts are being shown against the empty form fields when the page loads the first time so, validation should not be carried out when the page loads the first time. my friend challenged me and said i can achieve this "using a hidden form field or even the submit button" and submitting the page to itself i was more thinking of using session variables or a session cookie, but does anyone know how you could accomplish this using a hidden form field
VIEWS ON THIS POST

195

Posted on:

Tuesday 28th August 2012
View Replies!

For those who like a challenge

Just thought I'd throw this one out there for fun. Say you have 16 numbers (1-16 for simplicities sake) and wanted to display all possible comdinations of 4 using these numbers without repeating any combination of number's i.e. 1,2,3,4 is the same as 4,3,2,1. This might get some brains working
VIEWS ON THIS POST

205

Posted on:

Tuesday 25th September 2012
View Replies!

Resizing Linked Images - A challenge

Hi I've been tasked with the challenge of re-sizing images linked via BBcode on the fly. I have compiled a list of functions that do individual components of this task, but stringing them together has proved, well, a challenge. I discovered this code that will re-size the images, however this will need to be added on an ad-hoc basis, and the fact that the image name appears twice complicates the usual system I used to add the code. Usual way of replacing the code (inside a function): Code: vText = Replace(vText,"[ img ]","") Image resize code: Code: function ImageResize(strImageName, intDeedWidth, intDeedHeight) dim TargetRatio dim CurrentRatio dim strResize dim w, h, c, strType if gfxSpex(strImageName, w, h, c, strType) = true then TargetRatio = intDeedWidth / intDeedHeight CurrentRatio = w / h if CurrentRatio > TargetRatio then ' We'll scale height strResize = "width=""" & intDeedWidth & """" else strResize = "height=""" & intDeedHeight & """" ' We'll scale width end if else strResize = "" end if ImageResize = strResize end Function The rest of the functions used within this can be viewed here. And this function is executed thus: Code: So as you can see my normal Replace code above doesn't work with this. So, I've been working on a new function that will identify the code and try to filter the text to add this fucntion. However I have hit a problem. This is the function I've built (based on the delimiter code from the code bank) Code: function funcImageRezize(vText, oDel1, oDel2) Dim strHtml, arrValues, x, oChangeFrom, oChangeTo arrValues=GetBetween(vText, oDel1, oDel2) For x=0 To UBound(arrValues) oChangeFrom = oDel1 & (arrValues(x)) & oDel2 oChangeTo = "" oNewText = Replace(vText,oChangeFrom,oChangeTo) '(arrValues(x)) Next vText = oNewText end function But you can see the problem, when creating the oChangeTo string it is trying to call the ImageResize function, rather than adding it to string to be executed later (a schoolboy error really). However the question remains, how to add this resize function to the [ img ] tags I am quite unsure on what to do next, and help is much appreciated.
VIEWS ON THIS POST

140

Posted on:

Wednesday 10th October 2012
View Replies!

For those who like a challenge

Just thought I'd throw this one out there for fun. Say you have 16 numbers (1-16 for simplicities sake) and wanted to display all possible comdinations of 4 using these numbers without repeating any combination of number's i.e. 1,2,3,4 is the same as 4,3,2,1. This might get some brains working
VIEWS ON THIS POST

174

Posted on:

Thursday 11th October 2012
View Replies!

Bit of a challenge...

Is it possible to have an asp page that can create a local users account on a Windows 2000 server Any resources on this would be very helpful.
VIEWS ON THIS POST

184

Posted on:

Friday 26th October 2012
View Replies!

A challenge: web service client.

Hi to , I have a problem to retreive data from a web service using classic asp, I tried lot of things with no result. here is the code for my client, can anybody tell me why it doesnt work. Calling a webservice from classic ASP
VIEWS ON THIS POST

216

Posted on:

Friday 26th October 2012
View Replies!

where can i check asp page activity?

iam working on a forum. many users access this forum and post good number of messages. but sometimes i get strange errors like "The system cannot find the file specified. " I suspect this is cuz load factor or may be bad sql statements. how can i check the asp page activity like whether all the objects are closed are still running amount of time a perticlar page is taking to execute under what circunstances does the above error occur early reply appreciated.
VIEWS ON THIS POST

342

Posted on:

Friday 26th October 2012
View Replies!

Need function for finding links on a page

I'm looking for an ASP/VBScript function that would accept a string of text, use a regular expression to find all of the links within that text, and output an array of the links with the text that was linked (i.e. between the "a" tags). Does anyone have such a thing Right now I would even settle for just the regular expression pattern. I've done some searching and haven't found what I'm looking for. With some trial and error I could probably create it but I was hoping someone else might be willing to share.
VIEWS ON THIS POST

426

Posted on:

Friday 26th October 2012
View Replies!

error loading ASP page w/Access DB

Hi , I'm relatively new to databases and such...so please bear with me I'm designing a web page for a charity I'm involved with; the page is going to list the parenting programs we offer. Since the programs will change every six months, and I didn't want to keep re-writing a webpage each time, I figured I'd do a basic MS Access 2002 database table and display the info from the database onto the web page using ASP. I should state right now, I know very little about ASP--my very feeble knowledge is from reading beginner tutorials. The database simply has information on our programs such as the program name, dates offered, text description of the program, and building location. There are only about ten programs in the database. (First question--is this the best way to do this Or is there a better way, especially given how small the database is) Everything seemed to be going swimmingly. I entered three programs' worth of data just to test it out, and the ASP web page loaded perfectly. I could even hit "Refresh" and the page would reload without any errors. I noticed the database file size was getting a tiny bit large (500KB, after I had only entered three programs' worth of data!), so I chose to do "Compact and Repair". This lowered the file size to 144KB. I then uploaded the database to the webserver. Now, when I go to the ASP web page, it loads the page without any problems as it did before; but if I *refresh* the page, now it gives me an error: Provider error '80004005' Unspecified error /programs.asp, line 29 Hmmmm. OK, line 29 points to a line of code in my ASP page which reads: adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("APFAprograms.mdb") I usually then have to wait about a minute; then, if I reload the web page a second time, the page loads normally again. I have the sinking feeling I've done something silly, but I don't know enough about all this to figure out what it could be. Does anyone know what I might be doing wrong To see how it looks, feel free to go to http://www.apfa.ca/programs.asp
VIEWS ON THIS POST

272

Posted on:

Friday 26th October 2012
View Replies!

Help -How to post a page automatically when an option is chosen from a drop down list

what I want to do is - the user is presented with a form with a drop down box at the top with two options - Yes or No, If No is selected then the form stays as is and the user can complete the other text boxes. However, if the user selects yes I want the page to refresh with a different set of input boxes. Hope this is clear and would really appreciate any help - Tanks
VIEWS ON THIS POST

353

Posted on:

Friday 26th October 2012
View Replies!

ASP, triggering page when end of year

hi there, i know maybe this topic has been discussed by other member, but i still not understand how is work. i hope can get more detail solution on it. i wan to do a page at the backend,when the date is end of this year(12/31/2007) then will execute the code (such as add the new total leave with the current balance leave automatically without regresh the page or login into the system.) i heard that the MS SQL SERVER got this triggered function, but unfortunately..the MS SQL SERVER hosting that i used(third party) didnt provide this function. i jz can store data in the table and create database..no more others component that i can use. i hope can hear from u all soon coz the problem is urgent.. plz help..
VIEWS ON THIS POST

423

Posted on:

Friday 26th October 2012
View Replies!

how to add/edit MySQL data to existing .asp page

I guess I'll try again in a different forum.
VIEWS ON THIS POST

250

Posted on:

Friday 26th October 2012
View Replies!

How to show my Outlook Express Address book at ASP page

anyone here know how can i show all my addresses in Outlook Express at a ASP Pagei have found a coding that can do it, but i really cannot make it work. Code: Sent Items Display
VIEWS ON THIS POST

363

Posted on:

Friday 26th October 2012
View Replies!

How to print Form results on same page?

Hi all, I have a form of about 14 questions.. I'd like the users to be able to fill out the form, hit submit, and have the questions (premade) and answers (what they actually filled out) printed on the same page below the form.. the user will then copy questions/answers and paste somewhere else.. Is this possible Is it also possible to make the questions some kind of an object so i can display them below the form.. instead of retyping the questions as well
VIEWS ON THIS POST

451

Posted on:

Friday 26th October 2012
View Replies!

Trouble with setting up my ASP pages in IIS7

Aplogies if this isnt the correct forum, my question is IIS related but there isnt an IIS forum and I am using ASP for my web pages , so here goes anyway! Ive recently upgraded to Vista and to IIS7 for managing my web sites. Im having trouble getting some of my site up and running, particularly dynamic sites which run off Access databases and ASP. The error message I get is : "You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server." Ive set the Inernet Guest user account to have permissions to these new folders but its refusing to serve the pages. Ive created a web page detailing the user accounts and permissions Ive set up and a screen print of the error message, link below: http://www.pool-predictions.co.uk/problem.htm Id greatly appreciate any tips/help. Also, what is the 'Physical Path Credentials' bit do under the "Web Sites Defaults" dialogue box Is that something to do with it Also what is an 'Application Pool' Cheers...John
VIEWS ON THIS POST

718

Posted on:

Friday 26th October 2012
View Replies!