Solved

I want to use a button to reload an ASP Page

Posted on 2012-03-23
3
253 Views
Last Modified: 2012-03-23
I have a site that I inherited. Is uses ASP and AJAX.
The page has a field that when changed will impact a calculated value.
There are functions to recalculate each time the page loads.

I could just ask the user to refresh but they get the dialog box "retry etc...."
So I would like to use Onclick to retrieve the same page.
The page needs an argument to return the correct record.

I can't get the correct syntax and could use some help!

The page is accessed in 2 ways so the following gets the record ID:
RecordID = TRIM(request.querystring("id"))   <!-- First try to read the URL -->
IF LEN(RecordID)<1 THEN
  RecordID = TRIM(request.Form("issue"))   <!-- Next try reading from the POST -->
END IF

The button code follows but does nothing
&nbsp;&nbsp;<button type="button" name="Reload" onclick="window.location.href='http://servicetools.corp.com/aim/viewSingleIssue?id='<%=RecordID%>'">Update Calculated Values</button>
0
Comment
Question by:Mswetsky
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
sammySeltzer earned 500 total points
ID: 37757278
Try this:

<button type="button" name="Reload"  Value="Update Calculated Values" onclick="location='http://servicetools.corp.com/aim/viewSingleIssue?id=<%=RecordID%>'">

Open in new window

0
 
LVL 1

Author Closing Comment

by:Mswetsky
ID: 37757367
Thanks for the prompt, excellent, and easy to understand solution
0
 
LVL 28

Expert Comment

by:sammySeltzer
ID: 37757409
Thank you!

And I think that by now you figured out that initial button has to be replaced with input attribute:

<input type="button" name="Reload"  Value="Update Calculated Values" onclick="location='http://servicetools.corp.com/aim/viewSingleIssue?id=<%=RecordID%>'">

Open in new window

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now