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
Solved

I want to use a button to reload an ASP Page

Posted on 2012-03-23
3
254 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
how can i get 4 nd 5 ? 3 31
Html CheckBox obtain Its Value 5 27
jQuery on Submit 4 36
ASP Classic - JavaScript - Get value from form in iFrame and pass to main page. 2 19
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

792 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