HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 15th, 2009, 09:31 AM
bazzanoid bazzanoid is offline
Contributing User
Click here for more information.
 
Join Date: Nov 2004
Posts: 153 bazzanoid User rank is Corporal (100 - 500 Reputation Level)bazzanoid User rank is Corporal (100 - 500 Reputation Level)bazzanoid User rank is Corporal (100 - 500 Reputation Level)bazzanoid User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 17 h 33 m 57 sec
Reputation Power: 7
Reloading page as part of script procedure?

Afternoon all,

Is there a way i can get the page to reload as part of a script? Specifically, i have a script that checks VAT numbers for a valid structure, and when it returns true i need it to reload the page and pass a variable in the URL for the subsequent VB to use when building the page....

current coding:

Code:
function testVATNumber () {
  var myVATNumber = document.getElementById('vatnumber').value;
  if (checkVATNumber (myVATNumber)) {
    document.getElementById('vatnumber').value = checkVATNumber (myVATNumber)
    alert ("VAT number is valid");
	document.getElementById('checkvatbutton').style.vi  sibility="hidden"; 
	window.location.href='cartWEIGHT.aspx?continueURL=  <%=request.QueryString("continueURL")%>&VATCalc=N';
	}
  else 
  	alert ("VAT number invalid, please try again");
}
//-->


Hoping someone can help, i'm likely just using the wrong command!!!

Barry

Last edited by bazzanoid : October 15th, 2009 at 09:38 AM.

Reply With Quote
  #2  
Old October 15th, 2009, 10:12 AM
bazzanoid bazzanoid is offline
Contributing User
Click here for more information.
 
Join Date: Nov 2004
Posts: 153 bazzanoid User rank is Corporal (100 - 500 Reputation Level)bazzanoid User rank is Corporal (100 - 500 Reputation Level)bazzanoid User rank is Corporal (100 - 500 Reputation Level)bazzanoid User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 17 h 33 m 57 sec
Reputation Power: 7
Solved! I was going about it the wrong way...

Updated code for reference:

Code:
function testVATNumber () {
  var myVATNumber = document.getElementById('vatnumber').value;
  var pagename = 'cartWEIGHT.aspx?continueURL=<%=request.QueryString("continueURL")%>&VATCalc=N&vatnumber=' + myVATNumber;
  if (checkVATNumber (myVATNumber)) {
    document.getElementById('vatnumber').value = checkVATNumber (myVATNumber)
    alert ("VAT number is valid");
	document.getElementById('checkvatbutton').style.vi  sibility="hidden";
	window.location.href=pagename;
	}
  else 
  	alert ("VAT number invalid, please try again");
}
//-->

Reply With Quote
  #3  
Old October 16th, 2009, 07:26 PM
MEdelman MEdelman is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2009
Posts: 42 MEdelman User rank is Corporal (100 - 500 Reputation Level)MEdelman User rank is Corporal (100 - 500 Reputation Level)MEdelman User rank is Corporal (100 - 500 Reputation Level)MEdelman User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 15 h 58 m 33 sec
Reputation Power: 2
I think it's great when you can solve a problem yourself. Sometimes just the act of explaining something to someone (or composing a question here) is enough to help you (well, me anyway) see the light!

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Reloading page as part of script procedure?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek