|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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");
}
//-->
|
|
#3
|
|||
|
|||
|
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!
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Reloading page as part of script procedure? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|