?
Solved

I want to use a button to reload an ASP Page

Posted on 2012-03-23
3
Medium Priority
?
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
sammySeltzer earned 2000 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 29

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
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…
Suggested Courses

765 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