Looks like you want to use client-side javascript.
<script type="text/javascript" src="../inc/jsfunctions.js
Main Topics
Browse All TopicsI'm back to working with traditional ASP and javascript for the first time in a few years. How do you reference a .js file in an asp page? Mine is not working, although this could have other problems. My code looks like this:
<script language="JavaScript">
<!--#INCLUDE FILE="../inc/jsfunctions.j
function GotoPage(nPageNumber)
{
document.forms.frmAdmin.cm
document.forms.frmAdmin.ac
document.forms.frmAdmin.Ta
document.forms.frmAdmin.su
}
</script>
Im getting an error on this the line with Absolute in it:
if NOT setupRs.EOF then
setupRs.PageSize =nPageSize
maxRecords = cdbl(setupRs.RecordCount)
maxpages=cdbl(setupRs.Page
if cdbl(mypage) > cdbl(maxpages) then
mypage = maxpages
End IF
setupRs.AbsolutePage = mypage
maxrecs=cdbl(setupRs.pages
End IF
I get the Arguments are of the wrong type, are out of acceptable range. . .on setupRS.AbsolutePage. I'm thinking I;ve referenced the .js file wrong, but I'm not sure. Any help is appreciated. I've attached the enitre asp page and the .js file.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
sybe
He is already got the code wrapped within the JavaScript tag.
So, all he needs to do is rename the page with a .asp extension
And then INCLUDE it within the page, and it will work.
I do this all the time, thus the reason why i suggested it the way I did.
If he tries to do it the way you suggested (Which is correct, but not in this case)
It is going to Error-Out, as it is within a
<script language="JavaScript"></scri
Tag.
Carrzkiss
Business Accounts
Answer for Membership
by: carrzkissPosted on 2009-10-22 at 14:42:09ID: 25639372
Cannot be done like this s"-->
sp"-->
sp"--> dGotoPage. value = 'GotoPage'; tion.value = 'goto'; rgetPageNu mber.value = nPageNumber; bmit();
<!--#INCLUDE FILE="../inc/jsfunctions.j
Change the extension of the file to .asp and save as: jsfunctions.asp
And then
<!--#INCLUDE FILE="../inc/jsfunctions.a
Now, run the page
Since you are holding the page within the JavaScript Code, then you just
Need to make a call to it, and this will be like so:
<script language="JavaScript">
<!--#INCLUDE FILE="../inc/jsfunctions.a
function GotoPage(nPageNumber)
{
document.forms.frmAdmin.cm
document.forms.frmAdmin.ac
document.forms.frmAdmin.Ta
document.forms.frmAdmin.su
}
</script>
--------------
Give that a shot and let us know how it works out?
Carrzkiss